-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Horizontal settings tabs #2878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Horizontal settings tabs #2878
Conversation
|
|
Hello @dlab-anton, Thank you for your contributions! After reviewing the pull request, it seems that the changes related to prompt variable interpolation (in Please consider creating a separate pull request for the prompt variable interpolation changes. Let me know if you have any questions or need further assistance. Best regards, |
| ) | ||
|
|
||
| // Store direct DOM element refs for each tab | ||
| const tabRefs = useRef<Record<SectionName, HTMLButtonElement | null>>({} as any) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider replacing the as any cast with a more precise type (e.g., Partial<Record<SectionName, HTMLButtonElement>>) for stronger type-safety.
| const tabRefs = useRef<Record<SectionName, HTMLButtonElement | null>>({} as any) | |
| const tabRefs = useRef<Partial<Record<SectionName, HTMLButtonElement>>>({}) |
This comment was generated because it violated a code review rule: mrule_QkEwsCio7v34DaCF.
The main difference is with horizontal tabs navigation is always present; so difference in navigation speed and discoverability. Because on the mobile settings layout you need to go 'Back' to see Settings list. |
Agreed. Though I'm thinking (could be wrong here) most people use Roo Code as as narrow sidebar (as you said) taking up very little real horizontal real estate. If most of the options end up in the overflow menu, then you haven't saved many clicks. Also thinking ahead to when we might have searchable settings, like Android and iOS both currently have. One question: I haven't checked out your branch yet, but if you're all the way on the 'right' end of things (say, About Roo Code) how do you get back to the 'left' end? Is the toolbar horizontally scrollable? Overall I think I really like this PR and I think it's a great first step to wrangling the settings nightmare — I want to fast-track this if there are no usability problems! Are there any personal concerns with it you'd bring up? |
Very good points. It is true horizontal tabs may only show ~2 to 6 tabs at a time on average, which is less than 50% the total. If we define most narrow viewpoint at around 50 chars in the text field. Then, it shows about two tabs at a time: We can compare this with vertical tabs. On vertical tabs you have good persistence and discoverability. Collapsed mode to icons + tooltips may be an acceptable compromise for narrow screens. Compare to mobile settings drill-down: While the drill-down pattern is effective for mobile or very narrow views, Roo Code primarily targets VS Code on desktop. Many desktop users configure their sidebar with sufficient width to easily accommodate vertical tabs. In this common scenario, vertical tabs offer superior usability due to direct, one-click switching between sections, which is more efficient for desktop workflows than the two-step 'Back-and-select' process of drill-down. Prioritizing this faster navigation makes vertical tabs the better fit for our desktop users.
If we are only talking about UI elements I believe either tabs or drill-down can accommodate search well.
Yes the horizontal tabs have an auto-scroll centering, so you can navigate by clicking on the edge buttons (my preference) or you can use mouse-wheel.
My personal concerns are that the code may carry technical debt due to it being generated with Roo, for example I need to edit tests. |
|
@sachasayan After consideration I would like to pivot to vertical tabs, there are some trade-offs but I think vertical tabs has max benefit for max users in this case. I'm very much open to feedback still. |
|
I'm going to close this pull and focus on vertical tabs instead: #2914 |
|
@dlab-anton Love the deep dive here. Thanks for doing this. Agreed, vertical tabs seems much better. I still think the way to go is going to end up an iOS-style settings area but that's on me to explore, and I think this is a great improvement. |



Context
I understand there is work ongoing to refactor Settings into a pop-out tab which may be awesome. In the mean-time I wanted to push this to mull over.
To improve Settings information presentation, I chose to implement horizontal tabs. Such a separation of concerns is especially good for new users. For advanced users this should also speed up navigation.
The challenge is primarily to go vertical or horizontal tabs. However here I am specifically avoiding a left-column layout which would clash with VS Code's own Activity Bar, resizable panels, and dev preference for maximizing horizontal space. Since these tabs can overflow in narrow sidebars, I enabled standard horizontal scrolling via mouse wheel and trackpad gestures but hid the native scrollbar using CSS for a cleaner look. To enhance navigation, clicking a tab now triggers an instant auto-scroll (behavior: 'auto') that reliably centers the active tab; This makes it very quick for advanced users to reach the right tab. Finally, I kept the "More" dropdown as an alternative quick-access method for all settings sections but repositioned it into a standard / more coherent UI pattern.
Tab Navigation Structure:
Scrolling Mechanisms:
Overflow Menu:
Implementation
Technical Implementation
The tabs are implemented using the following approach:
Component Structure:
Scrolling Implementation:
Auto-Centering Logic:
Implemented using DropdownMenu component
Styling:
How to Test
Important
Implement horizontal tabs in settings with auto-scrolling, mouse wheel support, and overflow handling.
SettingsView.tsxusingTabList,TabTrigger, andTabContent.Tab.tsxto includeTabListandTabTriggercomponents with selection logic.SettingsView.tsxto manage active tab state and handle unsaved changes.SettingsView.test.tsxfor tab navigation, unsaved changes dialog, and dropdown menu.styles.tsfor tab styling and scrollbar hiding.settings.jsonfor new tab labels and tooltips.This description was created by
for 02ee4b7. You can customize this summary. It will automatically update as commits are pushed.