-
Notifications
You must be signed in to change notification settings - Fork 4k
Add ScrollContainer component, use for section tabs #3661
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
Add ScrollContainer component, use for section tabs #3661
Conversation
A container that encapsulates a scrollable area with usability features. - Faded edges when there is more content than the container can display. - Buttons to advance the scroll position. - Auto-scroll to the active item when it's initially active.
🦋 Changeset detectedLatest commit: e49fe8d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
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.
Pull Request Overview
This PR introduces a new ScrollContainer component that provides scrollable areas with enhanced usability features, and refactors the section tabs navigation to use this component for improved user experience.
Key changes:
- Creates a new ScrollContainer component with faded edges, scroll buttons, and auto-scroll functionality
- Refactors SiteSectionTabs to use ScrollContainer instead of basic overflow scrolling
- Updates translations across multiple languages to support the new scroll controls
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
packages/gitbook/src/components/primitives/ScrollContainer.tsx | New component providing enhanced scrollable container with navigation buttons and visual indicators |
packages/gitbook/src/components/SiteSections/SiteSectionTabs.tsx | Refactored to use ScrollContainer and simplified navigation menu structure |
packages/gitbook/src/components/primitives/Button.tsx | Enhanced button styles for better focus and state handling |
packages/gitbook/src/components/Header/Header.tsx | Simplified header layout to use new SiteSectionTabs structure |
packages/gitbook/src/components/Header/SpacesDropdown.tsx | Minor styling adjustment for translation dropdown |
packages/gitbook/src/intl/translations/*.ts | Added translations for scroll button labels across 10 languages |
packages/gitbook/src/components/RootLayout/globals.css | Added max-height for horizontal scrollbars |
.changeset/*.md | Changelog entries for the new features |
Comments suppressed due to low confidence (1)
packages/gitbook/src/components/SiteSections/SiteSectionTabs.tsx:1
- For vertical orientation, the button should be at the bottom but uses 'mt-2' (margin-top). This should be 'mb-2' (margin-bottom) to properly position the button away from the bottom edge.
'use client';
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…croll-through-site-sections-on
…croll-through-site-sections-on
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
A container that encapsulates a scrollable area with usability features.
CleanShot.2025-09-17.at.17.43.04.mp4
CleanShot.2025-09-17.at.17.42.05.mp4