-
Notifications
You must be signed in to change notification settings - Fork 132
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
Allocate space for scrollbar in sitenav and pagenav #2491
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2491 +/- ##
=======================================
Coverage 51.14% 51.14%
=======================================
Files 124 124
Lines 5359 5359
Branches 1152 1152
=======================================
Hits 2741 2741
Misses 2328 2328
Partials 290 290 ☔ View full report in Codecov by Sentry. |
Thanks for the work @jingting1412! I took a look at I am good with having a blank space here (next to the sitenav) while hovering not sure how others think |
Hmm does this mean that the scrollbar will be present even if the site-nav components' height is small and doesn't need a scrollbar? |
The space allocated for the scrollbar will always be there yes but the scrollbar will only appear when it overflows. The behaviour is the same as
|
I see. Thanks for the explanation! |
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.
LGTM except for that diagram thing! Would need to fix the other issue first but I think this can be merged in first
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.
Ongoing issue due to #2498
What is the purpose of this pull request?
Overview of changes:
#2217
Changed the property value of
overflow-y
of the.nav-component
toscroll
to allocate space to the scrollbar as discussed here so that its appearance and disappearance doesn't cause the icon in the nav bar to shift.Since this change is to
.nav-component
, both the sitenav and pagenav is affected.Since the change is to the
main.css
file of the default template, all the othermain.css
files also have to be updated. Currently there isn't a way to automatically update the file after a MarkBind upgrade (#1961), so if this change is accepted, there has to be release note for current users to update theirmain.css
file.Anything you'd like to highlight/discuss:
overflow-y: overlay
is a legacy value alias foroverflow-y: auto
according to the mdn docs here, which unfortunately still causes the moving of the content from what I can see.The overlay value of the overflow CSS property overall is being deprecated and standardised as the scrollbar-gutter property, but I see that its not really supported on Safari browser. If anyone wants me to look into using this property instead, or any other alternatives, I'll be happy to try it out.
Previous behaviour:
Screen.Recording.2024-04-03.at.12.56.40.AM.mov
Current behaviour:
Screen.Recording.2024-04-03.at.12.57.56.AM.mov
Testing instructions:
Serve the docs using
markbind serve -d
, collapse all sections of the siteNav, open the sections one by one until the scrollbar appears. Ensure that when the scrollbar appears, the icons doesnt shift.Proposed commit message: (wrap lines at 72 characters)
Allocate space for scrollbar in nav components
Checklist: ☑️
Reviewer checklist:
Indicate the SEMVER impact of the PR:
At the end of the review, please label the PR with the appropriate label:
r.Major
,r.Minor
,r.Patch
.Breaking change release note preparation (if applicable):