Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Prevent body from scrolling #7326

Merged
merged 1 commit into from
Jan 18, 2024
Merged

Conversation

2metres
Copy link
Contributor

@2metres 2metres commented Jan 16, 2024

User-Facing Changes
None

Description
Resolves bug where window frame scrolls when tooltip is present inside PlotPanel

@@ -183,8 +190,10 @@ export default function PlaybackControls(props: {
<RepeatAdapter play={play} seek={seek} repeatEnabled={repeat} />
<KeyListener global keyDownHandlers={keyDownHandlers} />
<div className={classes.root}>
<Scrubber onSeek={seek} />
<Stack direction="row" alignItems="center" flex={1} gap={1} overflowX="auto">
<div className={classes.scrubberWrapper}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of adding a wrapper here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So that the scrollbar appears outside the padded container instead of inside.

Before
Screen Shot 2024-01-17 at 1 47 46 pm

After
Screen Shot 2024-01-17 at 1 47 15 pm

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It allows the scrubber to remain full width while the other elements scroll

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m confused — I thought the point of the overflow:hidden was to disable scrolling. Why is there still a scrollbar?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've disabled scrolling on the body but we still allow scrolling on the playback bar controls

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My gut feeling would be that we don't want to allow scrolling on the playback bar since it's part of the app "chrome" that is supposed to remain fixed. I think it could make more sense to start wrapping or hiding the controls if they don't fit. (However I also don't think we have any particularly strong goals right now about making this work nicely on tiny screens?)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how to make this work in chrome (it seems to limit the width when I use the dev tools in responsive mode) but in Safari this is a pretty weird experience, especially since the buttons scroll but the scrubber does not:

Screen.Recording.2024-01-17.at.4.28.07.PM.mov

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since the buttons scroll but the scrubber does not

The scrubber is position sticky and full width and we are not truncating it. The buttons scrolling has been the behavior since we redsigned the playback bar ages ago. I guess the hope is that we at least make the content accessible even if it's not an ideal UX

@2metres 2metres requested a review from jtbandes January 17, 2024 03:48
@defunctzombie
Copy link
Contributor

LR: visually does the good stuff

@2metres 2metres merged commit 2a6cf53 into main Jan 18, 2024
14 checks passed
@2metres 2metres deleted the 2metres/FG-6183-oveflow-scrolling branch January 18, 2024 23:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants