Skip to content

fix(ui): stack Tabs content below the tab list - #22

Merged
linkxzhou merged 1 commit into
mainfrom
cursor/fix-tabs-orientation-layout-ba03
Sep 21, 2026
Merged

linkxzhou merged 1 commit into
mainfrom
cursor/fix-tabs-orientation-layout-ba03

Conversation

@linkxzhou

@linkxzhou linkxzhou commented Sep 21, 2026 •

Copy link
Copy Markdown
Owner

Problem

Settings modal tabs rendered side-by-side with content instead of a top tab bar with content below.

Tabs.vue sets data-orientation="horizontal" (the reka-ui convention), but the layout classes used Tailwind’s data-horizontal: variant. That variant matches a boolean data-horizontal attribute, not data-orientation="horizontal", so flex-col never applied. The same mismatch broke TabsList / TabsTrigger underline styles (group-data-horizontal/tabs: / group-data-vertical/tabs:).

Fix

Use selectors that match the existing data-orientation attribute:

  • data-[orientation=horizontal]:flex-col on the tabs root
  • group-data-[orientation=horizontal]/tabs: / group-data-[orientation=vertical]/tabs: on list and trigger

No Settings IA / tab structure changes.

Tests

  • Added ui/src/components/ui/tabs/tabs.test.ts class-string / mount assertions for the orientation selectors.
  • npx vitest run src/components/ui/tabs/tabs.test.ts passes.

Verification

Browser-checked the Settings modal on the running UI:

  • [data-slot=tabs] has data-orientation="horizontal" and computed flex-direction: column
  • Tab list sits above content (stacked: true) on 连接 / 外观 / 模型 / 供应商
  • Clicking tabs updates the panel below the tab bar without flipping to a side-by-side layout
Open in Web Open in Cursor 

Tailwind's data-horizontal: variant looks for a boolean data-horizontal
attribute, but Tabs sets data-orientation="horizontal". Horizontal tabs
therefore never stacked (flex-col), so Settings modal tabs sat beside
content instead of above it.

Co-authored-by: linkxzhou <zhoulv2000@163.com>
@vercel

vercel Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
lessdb Error Error Sep 21, 2026 12:44pm UTC

@linkxzhou
linkxzhou marked this pull request as ready for review September 21, 2026 12:53
@linkxzhou
linkxzhou merged commit 1a56840 into main Sep 21, 2026
2 of 3 checks passed
cursor Bot pushed a commit that referenced this pull request Sep 21, 2026
Resolve PR #20 conflicts by taking main for settings UI (PR #21 modal
merge and PR #22 Tabs orientation already landed) and keeping main's
complete settings-merge plan (SbModal maxWidth/minWidth 900px,
ApiKeyDrawer removal). Drop the superseded AppSettingsPanel in favor
of SettingsPanel.

Co-authored-by: linkxzhou <zhoulv2000@163.com>

This branch had an error being deployed

1 failed deployment
Preview — 4449267e Deployed Sep 21, 2026 by vercel[bot]
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