Skip to content

fix: Table of contents - make tabs of horizontal mode configurable and scrollable#1286

Merged
arkadiy93 merged 2 commits into
mainfrom
fix/extendTableOfContentsProps
May 13, 2026
Merged

fix: Table of contents - make tabs of horizontal mode configurable and scrollable#1286
arkadiy93 merged 2 commits into
mainfrom
fix/extendTableOfContentsProps

Conversation

@arkadiy93
Copy link
Copy Markdown
Contributor

Azure DevOps links

User story

Copilot AI review requested due to automatic review settings May 13, 2026 09:16
Copy link
Copy Markdown
Contributor

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 updates the TableOfContents horizontal mode to allow configuring tab scrolling behavior via forwarded scroll-related props, and adjusts styles/stories to demonstrate and support scrollable horizontal tabs.

Changes:

  • Add tabsProps (scroll-related) support for TableOfContents when mode="horizontal".
  • Hide overflow for the horizontal TOC container to better constrain tab layout.
  • Refactor Tabs prop typing by extracting TabsScrollProps, and extend Storybook coverage with a new scrollable horizontal story.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/organisms/TableOfContents/TableOfContents.types.ts Removes the unused TableOfContentsMode type file.
src/organisms/TableOfContents/TableOfContents.tsx Adds tabsProps forwarding for horizontal mode and updates public props typing.
src/organisms/TableOfContents/TableOfContents.styles.ts Constrains horizontal layout via overflow: hidden.
src/organisms/TableOfContents/TableOfContents.stories.tsx Updates story typing/args and adds a new HorizontalScrollable story.
src/molecules/Tabs/Tabs.types.ts Extracts TabsScrollProps and reuses it via interface extension.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/organisms/TableOfContents/TableOfContents.tsx
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 100% (🎯 100%) 17399 / 17399
🔵 Statements 100% (🎯 100%) 17399 / 17399
🔵 Functions 100% (🎯 100%) 1278 / 1278
🔵 Branches 100% (🎯 100%) 4447 / 4447
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/organisms/TableOfContents/TableOfContents.styles.ts 100% 100% 100% 100%
src/organisms/TableOfContents/TableOfContents.tsx 100% 100% 100% 100%
Generated in workflow #2315 for commit e98bd42 by the Vitest Coverage Report Action

@arkadiy93 arkadiy93 marked this pull request as ready for review May 13, 2026 09:58
@arkadiy93 arkadiy93 requested a review from a team as a code owner May 13, 2026 09:58
Copilot AI review requested due to automatic review settings May 13, 2026 09:58
Copy link
Copy Markdown
Contributor

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

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

Comment thread src/organisms/TableOfContents/TableOfContents.tsx
Comment thread src/organisms/TableOfContents/TableOfContents.styles.ts
@arkadiy93 arkadiy93 requested a review from yunarch May 13, 2026 10:16
@arkadiy93 arkadiy93 merged commit 3e0d868 into main May 13, 2026
15 checks passed
@arkadiy93 arkadiy93 deleted the fix/extendTableOfContentsProps branch May 13, 2026 10:29
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.

3 participants