-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
fix: Allow ToC to scroll independently of page content #7754
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
base: main
Are you sure you want to change the base?
fix: Allow ToC to scroll independently of page content #7754
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
lg:top-16 | ||
lg:max-h-[calc(100vh-4rem)] |
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.
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.
On it
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.
Adding pb-12
kinda fixed the issue. The issue no longer persists, if there are any problems please let me know.
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.
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.
I don't think it did. Is changing the max height even needed at all?
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.
@avivkeller
Video Preview
It is need to give the sticky scroll to the wrapper, without it the ToC section scrolls in parallel to the main section
I have also fixed the issue where the metabar was too small.
Lighthouse Results
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #7754 +/- ##
==========================================
+ Coverage 74.85% 75.08% +0.22%
==========================================
Files 98 98
Lines 7895 7914 +19
Branches 200 196 -4
==========================================
+ Hits 5910 5942 +32
+ Misses 1984 1971 -13
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Can you please check the visual regression: https://www.chromatic.com/test?appId=64c7d71358830e9105808652&id=6829e0dcf23a597de1aee02b |
@avivkeller I did make some changes, although I do not know how to test it. Can you let me know how can I test the chromatic diffs? |
Check your storybook against the most recent |
The issue is probably because of the added padding |
I have removed the additional also, I was talking about this specific link that you sent, how can I obtain it for the latest build? This thing was pretty helpful because of the comparative visuals.
|
I think the chromatic diff is showing up because of sticky scroll bar, and in order to make sure the MetaBar isn't too small, I had changed the max-height to give some scrolling space to the wrapper in the MetaBar |
Description
Fixed the issue of the Table of Contents (ToC) being statically positioned. The ToC now scrolls to the top under the heading instead of being sticky. Adjustments were made to ensure it blends seamlessly with the article layout at
/en/download/package-manager/all
fixes: #7740
Files Changed
packages/ui-components/Containers/MetaBar/index.tsx
packages/ui-components/Containers/MetaBar/index.module.css
Validation
Verified that the ToC no longer remains sticky and is correctly positioned beneath the article heading.
Confirmed visual alignment for larger screens
No regressions observed in MetaBar behavior
Video
ToC.Fix-1747407308773.mp4
Related Issues
fixes: #7740
Check List
I have read the Contributing Guidelines and made commit messages that follow the guideline.
I have run
pnpm format
to ensure the code follows the style guide.I have run
pnpm test
to check if all tests are passing.I have run
pnpm build
to check if the website builds without errors.I've covered newly added functionality with unit tests if necessary.