FE-1715: Stop the embedded playback bar showing a scrollbar on hover - #9718
Open
claude[bot] wants to merge 1 commit into
Open
claude[bot] wants to merge 1 commit into
claude[bot] wants to merge 1 commit into
Conversation
The preview's playback controls sit in a wrapper that declares `overflow-x: auto` so a narrow embed can scroll the row sideways. Setting overflow on one axis makes the other compute to `auto` too, and a toolbar button's hover scale counts towards the scrollable area, so the bar showed a vertical scrollbar while the pointer rested on one.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
PR SummaryLow Risk Overview The horizontal scroll wrapper for narrow embeds now sets Reviewed by Cursor Bugbot for commit cf30e80. Bugbot is set up for automated code reviews on this repo. Configure here. |
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.
Requested by Ciaran Morinan · Slack thread
🌟 What is the purpose of this PR?
FE-1715. The playback bar in the embedded Petrinaut preview shows a vertical scrollbar while the pointer rests on one of its buttons.
Before: you move the pointer onto the Play button in an embedded preview's playback bar, and a thin vertical scrollbar appears down the inside of the bar's right edge. It stays for as long as the pointer is on the button and goes when you move away. Whether it appears at all depends on the reader's platform: macOS draws overlay scrollbars and shows nothing, while Windows and most Linux draw a classic scrollbar that takes up space and is plainly visible. The same happens on the reset and settings buttons.
After: the bar looks the same on every platform whether or not the pointer is on a button. A narrow embed still scrolls the row sideways to reach the controls at the end of it.
How: the row of controls sits in a wrapper that declares
overflow-x: auto, so a narrow embed can scroll sideways. Setting overflow on one axis makes the other axis compute toautoas well, so the wrapper scrolls vertically too.ToolbarButtonscales to1.1on hover, and a transformed child counts towards a scroll container's scrollable area even though the transform takes no layout space, so the wrapper gains about 1.6px of scrollable height for as long as the pointer is on a button. Declaringoverflow-y: hiddenleaves the sideways scrolling in place and stops the vertical scrollbar.SimulationControlsis shared with the editor's bottom toolbar, but the scrolling wrapper is not. The editor's toolbar has no scroll container around its row, so it never had the scrollbar and this change does not reach it.Prior art: FE-1233 fixed the same class of problem in the bottom panel.
🔗 Related links
🔍 What does this change?
overflow-y: hiddentoplaybackControlsScrollStylein the preview's playback controls.@hashintel/petrinaut.Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
The bar is one row of controls with nothing below it, so clipping the vertical axis removes nothing a reader could reach. The hovered button's scaled box already sat outside the wrapper on both the top and the bottom edge; the rendering is unchanged.
🛡 What tests cover this?
None. The behaviour is a computed CSS value in a Panda style object, which the unit tests do not render.
❓ How to test this?