Skip to content

Conversation

@roomote
Copy link
Contributor

@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

Improves UI scaling for narrow sidebars by adjusting compact mode threshold, enhancing text truncation, and adding responsive CSS utilities.

  • Behavior:
    • Adjusted compact mode threshold in SettingsView.tsx from 500px to 600px for earlier activation.
    • Improved text truncation in ModesView.tsx and ApiConfigManager.tsx using Tailwind CSS classes like truncate, min-w-0, and max-w-[40%].
    • Enhanced ChatTextArea.tsx dropdown responsiveness with min-w-0 class.
  • CSS:
    • Added responsive utilities in index.css for narrow containers, text overflow handling, and container queries.
    • Ensured checkbox and button elements maintain size and visibility in narrow layouts.
  • Testing:
    • Manual testing across sidebar widths (300px-600px) to verify responsive behavior and text truncation.

This description was created by Ellipsis for bb941c1. 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 cte, jr and mrubens 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
Member

@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
Contributor

@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
@daniel-lxs
Copy link
Member

@roomote-agent check my latest review and address the suggestions, commit the changes to this PR, do not create a new one

@roomote
Copy link
Contributor Author

roomote bot commented Jul 25, 2025

Hi @daniel-lxs, I see your review comments. I will address the following issues:

  1. Remove the duplicate .dropdown-container class definition in webview-ui/src/index.css (line 577)
  2. Replace the RTL direction hack in ModesView.tsx with a proper text-align approach for better accessibility

Working on these changes now.

@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Changes Requested] in Roo Code Roadmap Jul 25, 2025
- Removed duplicate .dropdown-container class definition in index.css (line 577)
- Replaced RTL direction hack with proper text-align approach in ModesView.tsx for better accessibility
@roomote
Copy link
Contributor Author

roomote bot commented Jul 25, 2025

Hi @daniel-lxs, I have successfully addressed both review suggestions:

Fixed duplicate .dropdown-container class - Removed the duplicate definition at line 577 in webview-ui/src/index.css
Replaced RTL direction hack - Updated ModesView.tsx to use textAlign: "right" instead of direction: "rtl" for better accessibility

The changes have been committed to this PR branch (commit bb941c1) and all CI checks are passing. The code is ready for your review!

@daniel-lxs daniel-lxs moved this from PR [Changes Requested] to PR [Needs Prelim Review] in Roo Code Roadmap Jul 27, 2025
@daniel-lxs
Copy link
Member

Closing since the CSS seems complicated and I can't notice any noticeable improvements, feel free to reopen if someome wants to work on this a bit more.

@daniel-lxs daniel-lxs closed this Jul 28, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 28, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Prelim Review] to Done in Roo Code Roadmap Jul 28, 2025
@elianiva
Copy link
Contributor

elianiva commented Jul 29, 2025

Hi @daniel-lxs, I would like to improve on this a bit more (in a separate PR, of course), the dropdown has annoyed me too for a while.
Would be nice if you can give me the green flag to start working on this 🙂

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

Archived in project

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

5 participants