Repository navigation
fix(app): improve contrast and elevation for selection quote toolbars - #61330
Realmagnum wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Thanks for the change. It's small and on target, but one part doesn't work as described and the two toolbars end up different. I checked it by reading the CSS cascade; I couldn't run the desktop app here.
Public API: unchanged.
- Dark-mode border colour only applies to the terminal toolbar. The timeline override in
index.cssis inside@layer components, so the Tailwind utilityborder-v2-border-border-base(utilities layer) beats it, and the timeline toolbar keepsborder-basein dark mode. The terminal'squote.cssis injected as an unlayered<style>, so it does getborder-strong. See the inline comments. - Double outline: both
--v2-elevation-raisedand--v2-elevation-floatingalready draw a 0.5px ring. A 1px border on top gives two outlines. Consider dropping one of them, e.g. keep the shadow ring and just raise the background tobg-layer-02. #61329 was triaged as a design request, so maintainers may have a view on the look. - The screenshot in the description is the same image as the one in #61329. Could you add real before/after screenshots of both toolbars in light and dark mode?
| [data-color-scheme="dark"] [data-component="timeline-quote"] { | ||
| background-color: var(--v2-background-bg-layer-01); | ||
| background-color: var(--v2-background-bg-layer-02); | ||
| border-color: var(--v2-border-border-strong); |
There was a problem hiding this comment.
This rule is inside @layer components, but the border-v2-border-border-base class on the toolbar is a Tailwind utility (utilities layer). A later layer wins whatever the specificity, so this border-color never applies and the timeline toolbar keeps border-base in dark mode. The terminal toolbar's quote.css is unlayered, so it does get border-strong, and the two toolbars no longer match. One fix: set the dark border on the element itself, e.g. [[data-color-scheme=dark]_&]:border-v2-border-border-strong, as runtime/plugin/mobile.tsx does for its background. Then drop the CSS override.
| role="toolbar" | ||
| aria-label={language.t("session.quote.actions")} | ||
| class="fixed z-50 flex items-center gap-0.5 rounded-[8px] p-0.5 shadow-[var(--v2-elevation-raised)]" | ||
| class="fixed z-50 flex items-center gap-0.5 rounded-[8px] border border-v2-border-border-base p-0.5 shadow-[var(--v2-elevation-floating)]" |
There was a problem hiding this comment.
--v2-elevation-floating (like raised) already includes a 0 0 0 0.5px ring, so adding a 1px border draws a second outline right next to it. It also makes the toolbar 2px larger than before. Unless the double edge is intended, use either the border or the shadow ring. The same applies to gui-plugins/src/terminal/quote.tsx.
|
Good catch! Updated the PR to drop the redundant 1px border and instead rely on the built-in |
There was a problem hiding this comment.
Both earlier points are fixed. With the border classes and overrides gone, the layer conflict and the double outline are both resolved. In dark mode both toolbars now use the bg-layer-02 background and the elevation-floating shadow, so they match. I found nothing else to flag. I checked by reading the code; I couldn't run the desktop app here.
Public API: unchanged.
Could you add before/after screenshots of the quote toolbar in dark mode? The old screenshot was the one from the issue.


Issue for this PR
Closes #61329
Type of change
What does this PR do?
In dark mode, the floating quote toolbar (
timeline-quoteandterminal-quote) blends directly into the transcript and code blocks because it usesbg-layer-01with shallowelevation-raisedshadow.This PR improves its visibility:
bg-layer-01tobg-layer-02.elevation-raisedtoelevation-floating(matching menus and other floating popovers, relying on its built-in0 0 0 0.5pxoutline ring without adding extra borders or altering element dimensions).How did you verify your code works?
elevation-floatingshadow ring and matching surface elevation across both surfaces.Screenshots / recordings
Checklist