Skip to content

Refactor tabs components: switch to ui tabs, make tabs controlled, update styling and exports#2720

Open
felixkrrr wants to merge 2 commits intomainfrom
codex/linear-mention-lfe-8927-tabs-components-background-should-r9j3ah
Open

Refactor tabs components: switch to ui tabs, make tabs controlled, update styling and exports#2720
felixkrrr wants to merge 2 commits intomainfrom
codex/linear-mention-lfe-8927-tabs-components-background-should-r9j3ah

Conversation

@felixkrrr
Copy link
Contributor

Motivation

  • Align components with the new fumadocs-ui/components/ui/tabs entrypoint and update tab behavior and styles to match the design tokens and new API.
  • Provide consistent controlled-tab semantics and small API wrappers for MDX usage so Tabs.Tab and TabsContent render with the correct background styles.

Description

  • Updated imports to use fumadocs-ui/components/ui/tabs and adjusted several files to consume that API (components/LangTabs.tsx, components/docs/tabs-client.tsx, components/docs/tabs.tsx).
  • Converted LangTabs to a controlled FumadocsTabs usage via value and onValueChange, replaced key/defaultValue pattern, and wired selection persistence through the existing external store; also cleaned up formatting and minor logic/formatting changes (try/catch braces, useMemo formatting, cn usage).
  • Updated tab list and trigger classNames to new tokenized classes (e.g. fd-* classes) and simplified trigger rendering; preserved scroll-restoration logic and external-store syncing behavior.
  • In components/docs/tabs-client.tsx improved state derivation for controlled vs internal values, minor formatting and trigger active color adjustments.
  • Added wrapper components Tab and TabsContent in components/docs/tabs.tsx that apply !bg-card and re-exported Tabs with Tab attached (Object.assign(FumadocsTabs, { Tab })) and exported TabsList/TabsTrigger for MDX compatibility.

Testing

  • Ran TypeScript typecheck with tsc --noEmit which completed successfully.
  • Ran the project build with pnpm build which succeeded without errors.
  • Ran the test suite with pnpm test and all automated tests passed.

Codex Task

@vercel
Copy link

vercel bot commented Mar 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
langfuse-docs Ready Ready Preview, Comment Mar 26, 2026 10:18am

Request Review

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Mar 26, 2026
@github-actions
Copy link

@claude review

@dosubot dosubot bot added documentation Improvements or additions to documentation enhancement New feature or request labels Mar 26, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: be0077098a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex documentation Improvements or additions to documentation enhancement New feature or request size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant