fix(TabsBar): toggle button now properly expands/collapses tabs bar height#703
fix(TabsBar): toggle button now properly expands/collapses tabs bar height#703Git-HimanshuRathi wants to merge 3 commits intoCircuitVerse:mainfrom
Conversation
…eight Fixes CircuitVerse#269 - Added minHeightStyle class for expanded state with height: auto - Moved overflow: hidden to maxHeightStyle (collapsed state only) - Updated class binding to toggle between styles - TabsBar now properly shows multiple rows when expanded
✅ Deploy Preview for circuitverse ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
WalkthroughThe TabsBar component was refactored to change how conditional CSS classes are applied for height management. The class binding was converted from Vue object syntax to a ternary string approach, and height styling logic was moved from base styles into two new dedicated public-style classes. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/components/TabsBar/TabsBar.vue (1)
88-92: Consider renamingshowMaxHeightfor improved clarity.The variable name
showMaxHeightis slightly counterintuitive: whentrue, the tabs bar is collapsed (applying the height constraint), and whenfalse, it's expanded. A name likeisCollapsedorisMinimizedwould more clearly convey the component's state.This is a minor readability improvement and doesn't affect functionality. The current implementation is correct and consistent throughout the component (lines 5, 50, 88, 91).
🔎 Optional refactor for clearer naming
-const showMaxHeight = ref(true) +const isCollapsed = ref(true) function toggleHeight() { - showMaxHeight.value = !showMaxHeight.value + isCollapsed.value = !isCollapsed.value }Then update line 5:
- :class="[embedClass(), showMaxHeight ? 'maxHeightStyle' : 'minHeightStyle']" + :class="[embedClass(), isCollapsed ? 'maxHeightStyle' : 'minHeightStyle']"And line 50:
- <i :class="showMaxHeight ? 'fa fa-chevron-down' : 'fa fa-chevron-up'"></i> + <i :class="isCollapsed ? 'fa fa-chevron-down' : 'fa fa-chevron-up'"></i>
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/components/TabsBar/TabsBar.vue
🔇 Additional comments (2)
src/components/TabsBar/TabsBar.vue (2)
5-5: Excellent fix for the toggle functionality!The change from conditional object syntax to an explicit ternary ensures that one of the two height classes is always applied. Previously, when
showMaxHeightwasfalse, no height-related class was bound, leaving the tabs bar at its default state. Now it correctly toggles betweenmaxHeightStyle(collapsed) andminHeightStyle(expanded), which is the root cause fix for issue #269.
330-340: CSS classes correctly implement the expand/collapse behavior.The styling changes properly support the toggle functionality:
.maxHeightStyle(collapsed): Fixed at 30px withoverflow: hiddento prevent tabs from wrapping.minHeightStyle(expanded):height: autowithoverflow: visibleallows multiple rows of tabs to displayThe separation of overflow behavior between the two states is well-designed and aligns perfectly with the intended UX described in the PR objectives.
|
Hi @Git-HimanshuRathi, Thanks for raising the PR. It would be great if you could upload screencast with expected behavior of tabs bar after the fix. |
Background InvestigationI initially opened this PR to address Issue #269 (Toggle Button Not Responding). After thorough investigation, I discovered that:
Benefits of This Refactor
Screen.Recording.2026-01-01.at.9.01.14.AM.mov |

Fixes #269
Description
Fixed the TabsBar toggle button that was not responding as expected. The button was changing the chevron icon but failing to expand/collapse the tabs bar height.
Root Cause
The
.maxHeightStyleclass constrained the tabs bar to 30px height, but when toggled off, there was no alternative style defined for the expanded state. The container just remained at its natural height without any visible change.Changes Made
.minHeightStyleclass for expanded state withheight: autooverflow: hiddento.maxHeightStyle(collapsed state only)Before
After
Testing
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.