fix: mirror Expand layout in Collapse split-button group#242
Conversation
The labeled main button now triggers collapse-one-level (conservative) and the icon-only add-on triggers collapse-all, matching the Expand group's convention. Fixes CatholicOS#208. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Collapse split-button group in the entity tree toolbar is reordered to align with the Expand group's layout: the left labeled button now performs the conservative one-level action, and the right icon-only button performs the all-levels action. ChangesCollapse Split-Button Layout Alignment
🎯 1 (Trivial) | ⏱️ ~3 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Problem
Closes #208.
The Collapse split-button group had the opposite layout from the Expand group:
ChevronDown→ expand one levelChevronsDown→ expand allChevronsRight→ collapse allChevronRight→ collapse one levelChevronRight→ collapse one levelChevronsRight→ collapse allA user who learned "labeled button = conservative one-step action" from the Expand group would accidentally collapse the entire tree on first click of Collapse.
Fix
Swapped the
onClickhandlers, icons, andaria-labelattributes in the Collapse group so both split-button clusters follow the same convention: labeled main button = one step, icon-only add-on = all levels.Testing
aria-labelon each button matches its actionLanguagePicker.test.tsxunrelated to this change)🤖 Generated with Claude Code
Summary by CodeRabbit