Skip to content

Conversation

zenoachtig
Copy link
Contributor

@zenoachtig zenoachtig commented Sep 17, 2025

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.
CleanShot.2025-09-17.at.17.43.04.mp4
CleanShot.2025-09-17.at.17.42.05.mp4

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.
Copy link

linear bot commented Sep 17, 2025

Copy link

changeset-bot bot commented Sep 17, 2025

🦋 Changeset detected

Latest commit: e49fe8d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
gitbook Patch

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

Copy link

argos-ci bot commented Sep 17, 2025

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
customers-v2 (Inspect) 👍 Changes approved 5 changed Sep 17, 2025, 4:06 PM
v2-cloudflare (Inspect) 👍 Changes approved 9 changed Sep 17, 2025, 4:12 PM
v2-vercel (Inspect) 👍 Changes approved 6 changed Sep 17, 2025, 4:09 PM

Copy link
Contributor

@Copilot Copilot AI left a 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.

Copy link
Member

@nolannbiron nolannbiron left a comment

Choose a reason for hiding this comment

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

lgtm

@zenoachtig zenoachtig merged commit b8388e5 into main Sep 17, 2025
16 checks passed
@zenoachtig zenoachtig deleted the zeno/rnd-8018-its-not-obvious-that-you-can-scroll-through-site-sections-on branch September 17, 2025 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants