fix(web): stop session row from shifting on hover#1319
Merged
Conversation
The session row swapped the relative time for the kebab on hover using display:none, which dropped the time from layout and appended the kebab at the end. Because the time is variable-width (2h / 5m / just now) and the kebab is a fixed 26px, the right region reflowed: status badges shifted and the title's truncation changed, causing visible jitter. Place the time and kebab in one inline-grid cell (grid-area:1/1) and swap them via visibility instead, so the slot width stays max(time width, 26px) across hover. The badges and title no longer reflow. Documented in the design system (section 07 Session row) as a trailing action slot rule.
🦋 Changeset detectedLatest commit: a1a9aba The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue
No linked issue — small sidebar polish fix.
Problem
Hovering a session row in the sidebar made the row reflow: the status badges (Answer / Approve / Stopped) shifted sideways and the session title's truncation changed by a few characters, producing visible jitter. It was most noticeable on rows carrying a pending badge.
Root cause: on hover the row used
display:noneto remove the relative time and appended the kebab (⋯) at the end. The time is variable-width (2h/5m/just now…) while the kebab is a fixed 26px, so the right-hand region changed width between rest and hover.What changed
inline-gridcell (grid-area: 1/1) and swap them withvisibilityinstead ofdisplay:none. The slot width is nowmax(time width, 26px)in both states, so the right region's total width is constant across hover — badges and the title no longer reflow.visibility-over-display:nonerationale.Verified with a side-by-side interactive demo (rest vs. hover, with layout boxes showing the badge/title stay put);
check:styleandtypecheckpass.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update. — No user-facing CLI doc change; the in-repo design system is updated in this PR.