Repository navigation
refactor: replace nested ternaries in LinkToggle and ThemePanel - #21
sauce-base merged 1 commit into
Conversation
|
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Update label and sync-state expressions resources/js/vue/components/LinkToggle.vue, resources/js/vue/components/ThemePanel.vue |
stateLabel uses explicit branches for its existing tooltip props and translation fallbacks. The group and sidebar sync-state calculations use `allOn |
Priority:
Estimated code review effort: 1 (Trivial) | ~3 minutes
Change: Refactor
Merge Risk: 
Minimal · up to a6895
-
No actionable merge-blocking issue remains; the refactor is ready to merge.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.



Summary
LinkToggle.vue: the tooltip label uses early returns instead of a nested ternary.ThemePanel.vue: the linked state of a colour group (all on, all off, mixed) is nowallOn || (allOff ? false : null), in two places.Same behaviour; it follows the frontend rule against nested ternaries.
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit