Skip to content

fix: improve UI scaling when sidebar width is reduced (#2678) #5917

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

roomote[bot]
Copy link

@roomote roomote bot commented Jul 18, 2025

Closes: #2678

This PR addresses UI scaling issues when the primary sidebar width is reduced by implementing several responsive improvements:

Key Changes:

  • Settings View: Adjusted compact mode threshold from 500px to 600px for earlier activation when space is constrained
  • Mode Selector: Improved text truncation in dropdowns using better Tailwind CSS classes (truncate, min-w-0, max-w-[40%])
  • Chat Text Area: Enhanced API configuration dropdown responsiveness with proper flex and overflow handling
  • Global CSS: Added responsive utilities for narrow containers, better text overflow handling, and container queries

Implementation Details:

  • Used ResizeObserver-based responsive design patterns already established in the codebase
  • Applied consistent min-w-0 classes to prevent flex items from overflowing
  • Maintained existing VSCode theme integration and styling patterns
  • Added CSS utilities that can be reused across other components

Testing:
Manual testing performed across various sidebar widths (300px-600px range) to verify proper responsive behavior and text truncation in all affected UI components.


Important

This PR improves UI scaling for narrow sidebars by adjusting compact mode thresholds, enhancing text truncation, and adding responsive utilities across components and CSS.

  • Behavior:
    • Adjust SettingsView compact mode threshold from 500px to 600px for earlier activation.
    • Improve text truncation in ModesView dropdowns with Tailwind CSS classes.
    • Enhance ChatTextArea API configuration dropdown responsiveness.
  • CSS:
    • Add responsive utilities for narrow containers in index.css.
    • Improve text overflow handling and container queries in index.css.
  • Implementation:
    • Use ResizeObserver for responsive design in SettingsView.
    • Apply min-w-0 classes to prevent flex item overflow in ChatTextArea and ApiConfigManager.

This description was created by Ellipsis for 670cd67. You can customize this summary. It will automatically update as commits are pushed.

- Adjust Settings View compact mode threshold from 500px to 600px for earlier activation
- Improve text truncation in mode selector dropdowns with better Tailwind classes
- Enhance chat text area API config dropdown responsiveness with min-w-0 classes
- Add responsive CSS utilities for narrow containers and better text overflow handling

Fixes #2678
@roomote roomote bot requested review from mrubens, cte and jr as code owners July 18, 2025 18:54
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. UI/UX UI/UX related or focused labels Jul 18, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 18, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Jul 21, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Jul 21, 2025
@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Changes Requested] in Roo Code Roadmap Jul 21, 2025
@daniel-lxs
Copy link
Collaborator

@MuriloFP

It seems like this didn't fix the issue completely
image

image

Can you take a look?

MuriloFP added 2 commits July 24, 2025 16:39
- Add CSS rules to prevent checkbox squeezing with min-width and flex-shrink properties
- Fix profile selection edit icon layout by wrapping buttons in flex-shrink-0 container
- Add min-w-0 to flex containers to allow proper text truncation
- Add responsive CSS adjustments for settings view in narrow containers
- Ensure icon buttons maintain their size and don't get cut off
- Add CSS rules to prevent VSCode checkbox squeezing across all settings pages
- Fix trash icon being cut off in profile selection by adjusting button spacing
- Add min-width constraints to icon buttons to maintain visibility
- Implement responsive CSS utilities for containers under 400px width
- Add specific selectors for VSCode checkbox components to ensure proper sizing
- Reduce gap between profile action buttons and add margin separation
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Jul 24, 2025
@MuriloFP
Copy link
Collaborator

@daniel-lxs I've addressed the issues you mentioned. Here's what I fixed:

Checkbox Squeezing Issue

  • Added CSS rules to prevent VSCode checkboxes from being squeezed in narrow sidebars
  • Applied flex-shrink: 0 and min-width: fit-content to checkbox containers
  • Added specific selectors for all settings pages to ensure consistent behavior

Profile Selection Icons Issue

  • Fixed the trash icon being completely cut off by adjusting the button layout
  • Reduced gap between buttons from gap-1 to gap-0.5 for better space utilization
  • Added min-w-[32px] to each icon button to maintain minimum width
  • Wrapped the button group in a flex-shrink-0 container to prevent compression

Additional Improvements

  • Added responsive CSS utilities for containers under 400px width
  • Implemented overflow handling for extreme narrow cases (< 350px)
  • Ensured all icon buttons (add, edit, trash) remain visible and clickable

The UI elements should now properly adapt to narrow sidebar widths without being squeezed or cut off. All tests are passing.

@daniel-lxs daniel-lxs moved this from PR [Changes Requested] to PR [Needs Prelim Review] in Roo Code Roadmap Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR - Needs Preliminary Review size:L This PR changes 100-499 lines, ignoring generated files. UI/UX UI/UX related or focused
Projects
Status: PR [Needs Prelim Review]
Development

Successfully merging this pull request may close these issues.

Some UI elements don't fit in the width and/or aren't scaled correctly
4 participants