Skip to content

Conversation

zenoachtig
Copy link
Contributor

@zenoachtig zenoachtig commented Sep 15, 2025

Simplifying the section tabs menu in anticipation of the new site section group headers.

  • Refactor SiteSectionTabs to be solely responsible for the whole secondary nav bar, simplifying composition and layout
  • Fix animation/rendering issues of site section group popover
  • Use <Button> to show section tabs, giving us better and more consistent active and focus states
  • Fix RND-7178

Examples

CleanShot.2025-09-15.at.18.26.22.mp4

Notice the bad sizing transition at the beginning, which isn't there in the new version

CleanShot.2025-09-15.at.18.26.58.mp4
CleanShot.2025-09-15.at.18.28.31.mp4
CleanShot.2025-09-15.at.18.27.51.mp4

Copy link

linear bot commented Sep 15, 2025

Copy link

changeset-bot bot commented Sep 15, 2025

🦋 Changeset detected

Latest commit: 16ea929

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 15, 2025

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

Build Status Details Updated (UTC)
customers-v2 (Inspect) 👍 Changes approved 7 changed Sep 17, 2025, 3:19 PM
v2-cloudflare (Inspect) 👍 Changes approved 24 changed Sep 17, 2025, 3:26 PM
v2-vercel (Inspect) 👍 Changes approved 31 changed Sep 17, 2025, 3:22 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 refactors the site section tabs to simplify the component composition and fix animation/rendering issues with the site section group popover. The refactor consolidates the SiteSectionTabs component to manage the entire secondary navigation bar and improves styling consistency.

  • Simplifies SiteSectionTabs to handle the full secondary nav bar layout and composition
  • Replaces custom tab styling with Button component for better consistency and focus states
  • Fixes viewport positioning and animation issues for section group dropdowns

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/gitbook/src/components/primitives/Button.tsx Adds focus and open state styling for blank variant buttons
packages/gitbook/src/components/SiteSections/SiteSectionTabs.tsx Major refactor to consolidate navigation layout and use Button components
packages/gitbook/src/components/RootLayout/globals.css Adds max-height for horizontal scrollbars
packages/gitbook/src/components/Header/SpacesDropdown.tsx Adjusts padding for translations dropdown styling
packages/gitbook/src/components/Header/Header.tsx Simplifies header layout by delegating to refactored SiteSectionTabs
.changeset/spicy-boats-change.md Adds changeset for the refactor

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@zenoachtig zenoachtig merged commit b85eccd into main Sep 17, 2025
16 checks passed
@zenoachtig zenoachtig deleted the refactor-section-tabs branch September 17, 2025 15:27
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