-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
Page: Use browser native scrollbars for the main page content #82919
Conversation
c767bb7
to
ae9a5ad
Compare
90ca002
to
fc5627b
Compare
color: theme.v1.palette.blue95, | ||
}), | ||
cards: css({ | ||
overflowX: 'auto', |
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.
The actual change here is from overflow-x: scroll
to overflow-x: auto
to prevent the scroll bars from showing when there's no overflow.
6066da0
to
f92815d
Compare
This comment was marked as resolved.
This comment was marked as resolved.
|
@joshhunt are there doc changes needed for this or should we remove the docs label? |
@derek-cadzow No. I believe it got auto-tagged with it due to the addition of the feature toggle. |
This PR removes the
<CustomScrollbar />
component from the main<Page />
, to prefer using platform default scrollbars. This behaviour is controlled via thebetterPageScrolling
feature toggle, which is enabled by default.As raised in #80429, there's now cross-browser support for customising the native browser scrollbar in a limited and declarative manner. However, I believe there is little need to customise the scroll bar at at least the page level - we should defer to doing less and preferring platform defaults.
This PR adds a new 'FlaggedScrollbars' interim component that wraps grafana-ui's CustomScrollbars, or uses a
NativeScrollbars
component when the toggle is enabled. The goal is to later removeFlaggedScrollbars
andNativeScrollbars
, and just scroll the document body element.Part of #80429
Screenshots
On Windows, Chrome does not use 'overlay' scroll bars, so they used to get CustomScrollbars. Firefox does use overlay scroll bars, is it never used CustomScrollbars, and should see no change through this
Regular tall page
Non-scrolling page
Small dashboard without scroll bars
Large dashboard with scroll bars