-
Notifications
You must be signed in to change notification settings - Fork 553
[ENG-2222] Update selection colors #744
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
[ENG-2222] Update selection colors #744
Conversation
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.
Important
Looks good to me! 👍
Reviewed everything up to b7a6878 in 2 minutes and 20 seconds. Click for details.
- Reviewed
182lines of code in2files - Skipped
0files when reviewing. - Skipped posting
4draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. humanlayer-wui/src/App.css:62
- Draft comment:
Added --terminal-selection variables with alpha values. Ensure these colors meet contrast/accessibility guidelines across themes. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
2. humanlayer-wui/src/App.css:755
- Draft comment:
Global ::selection styling using var(--terminal-selection) creates consistency. Consider if it should be placed within an @layer for maintainability. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
3. humanlayer-wui/src/components/ui/input.tsx:11
- Draft comment:
Updated input selection classes now reference var(--terminal-selection) and text-foreground; this aligns well with the global theme styling. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
4. humanlayer-wui/src/App.css:134
- Draft comment:
Typographical note: The hex color code for--terminal-selectionis#f4a2614d, which contains 8 hexadecimal digits. All other color codes in this file are 6-digit hex codes (e.g.,#7b9171). Please verify if the extra digits (i.e., alpha transparency) are intended or if this is a typographical error. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50% The comment suggests there might be a typographical error because the hex code has 8 digits instead of 6. However, 8-digit hex codes are valid CSS - the last 2 digits represent alpha transparency. Looking at the full file, many other themes intentionally use 8-digit hex codes for their selection colors to create semi-transparent selections. This appears to be an intentional pattern, not an error. I could be wrong if there was a specific requirement for this codebase to only use 6-digit hex codes. Maybe there's a technical limitation I'm not aware of. The consistent use of 8-digit hex codes across multiple themes strongly suggests this is intentional design. Text selection typically needs transparency, so using alpha values makes sense. The comment should be deleted. The 8-digit hex code is not a typographical error but an intentional use of alpha transparency that matches the pattern used in other themes.
Workflow ID: wflow_FR4FPTd57uOSMWpR
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
K-Mistele
left a comment
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.
LGTM
Restores the use of the --terminal-selection CSS variable for text selection styling: - Add global ::selection rule in App.css using --terminal-selection - Update input component to use --terminal-selection variable This prepares for adding proper selection colors to theme definitions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Adds theme-accurate selection colors for all 19 themes based on official VS Code theme specifications: - Rose Pine variants: Official VS Code theme colors with appropriate opacity - Tokyo Night variants: Official terminal selection colors from theme - Solarized: VS Code cyan selection (#2AA19899) with transparency - Catppuccin: Overlay2 color (#9399b240) matching editor selection - Gruvbox: bg2 colors for both light and dark variants - Monokai: Original Sublime Text selection color (#49483E) - High Contrast: White (#FFFFFF) for maximum visibility - Custom themes: Research-based colors with appropriate opacity (10-40%) All selection colors follow best practices: - Dark themes: 20-40% opacity for visibility - Light themes: 10-20% opacity to maintain readability - Colors harmonize with each theme's existing palette 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
b7a6878 to
6ded4a1
Compare
What problem(s) was I solving?
Text selection colors in the WUI were using generic accent colors (
selection:bg-accentandselection:text-background) that didn't match the design language of each theme. This resulted in low contrast and poor readability when selecting text, especially across the 16 different themes we support. The selection colors were not cohesive with the rest of the theme's color palette.Related to ENG-2222: Selection colors in app are off/low contrast.
What user-facing changes did I ship?
How I implemented it
Added
--terminal-selectionCSS variable to all 16 themes (humanlayer-wui/src/App.css):#2aa19899(teal with transparency)#eee8d5(base2 from Solarized palette)#f4a2614d(warm orange with transparency)#9399b240(lavender with transparency)#ffffff(pure white for maximum contrast)#fd579933(coral with transparency)#0066cc26(blue with subtle transparency)#504945(neutral gray from Gruvbox palette)#d5c4a1(light gray from Gruvbox palette)#49483e(dark gray from Monokai palette)#ff66001a(orange with transparency)#6e6a8633(iris with transparency)#6e6a8614(iris with lighter transparency)#817c9c26(iris with transparency)#515c7e4d(dark blue-gray with transparency)#6f7bb640(blue-gray with transparency)Created global
::selectionrule that applies the theme-specific selection color:Updated input component (
humanlayer-wui/src/components/ui/input.tsx):selection:bg-accent selection:text-backgroundselection:bg-[var(--terminal-selection)] selection:text-foregroundHow to verify it
Automated Checks
bun run lint(only pre-existing warnings, no new issues)bun run typecheckManual Testing
Test selection colors across themes:
Specific test cases:
Description for the changelog
Fixed text selection colors across all themes. Selection now uses theme-specific colors with proper contrast instead of generic accent colors, improving readability and visual consistency throughout the UI.