Repository navigation
feat(ui): add appearance="buttons" to TabBar and rename "main" to "tabs" - #2081
Conversation
…#2028) - Add appearance="buttons" for a pill-style segmented control - Add appearance="tabs" as new canonical name (replaces "content") - Keep appearance="content" as deprecated functional alias with console.warn - Preserve appearance="main" as default (unchanged) - Add CSS tokens for buttons appearance in theme.css and global.css - Hide deprecated tabStyle prop from Storybook Controls Signed-off-by: MartinS-git <info@eyepic.de>
🦋 Changeset detectedLatest commit: 884a115 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
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 |
|
…nct variant - Default changes from "main" to "tabs" - "main" is now a deprecated alias of "tabs" with console.warn - "content" remains a distinct style variant (no longer deprecated) - Update stories, tests, and changeset accordingly Signed-off-by: MartinS-git <info@eyepic.de>
Signed-off-by: MartinS-git <info@eyepic.de>
There was a problem hiding this comment.
🟡 Changes recommended
Disabled items retain an interactive hover state, and the new visual branches lack effective regression assertions.
3 open findings
What changed in this PR
Adds the buttons TabBar appearance while introducing tabs as the default and deprecating main.
Changes:
- Adds segmented-button styling and theme tokens.
- Preserves deprecated TabNavigation compatibility.
- Adds stories, tests, and release notes.
| File | Description |
|---|---|
.changeset/tabbar-appearance.md |
Documents the minor release. |
packages/ui-components/src/theme.css |
Adds TabBar button theme tokens. |
packages/ui-components/src/global.css |
Adds corresponding global tokens. |
packages/ui-components/src/index.ts |
Exports the deprecated appearance type. |
packages/ui-components/src/components/TabBar/TabBar.component.tsx |
Adds appearances, defaults, styling, and warnings. |
packages/ui-components/src/components/TabBar/TabNavigation.deprecated.tsx |
Preserves the legacy default appearance. |
packages/ui-components/src/components/TabBar/TabBar.stories.tsx |
Documents all appearance variants. |
packages/ui-components/src/components/TabBar/TabBar.test.tsx |
Tests appearance selection and warnings. |
packages/ui-components/src/components/TabBarItem/TabBarItem.component.tsx |
Adds button and content item styling. |
packages/ui-components/src/components/TabBarItem/TabBarItem.test.tsx |
Tests item appearance classes. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Signed-off-by: MartinS-git <info@eyepic.de>
franzheidl
left a comment
There was a problem hiding this comment.
I have left two comments re things I think we should improve, no blockers though.
|
Also, the parent element that supplies the background color appears to be block level and consume all the available horizontal space. This needs to be chnaged to only cover the horizontal space that is actually needed by the button-like elements. |
- Fix double warning: TabNavigation no longer triggers the appearance="main" deprecation warning. useEffect now checks the raw appearance prop. - Rename internal *Tabs* variables to *Content* to match the appearance they style. - Add jn:w-fit to buttons appearance so it no longer spans full container width. - Reorder appearance control options in stories: tabs -> content -> buttons. Signed-off-by: MartinS-git <info@eyepic.de>
Signed-off-by: MartinS-git <info@eyepic.de>
Signed-off-by: MartinS-git <info@eyepic.de>
…es in TabBar Swap bracket-value classes for standard Tailwind utilities with identical computed CSS: rounded-sm, p-0.5, py-3.5, px-6.25, px-2.5, py-1.75. Signed-off-by: MartinS-git <info@eyepic.de>


Closes #2028.
Summary
appearance="buttons"toTabBar, a pill-style segmented control for pre-defined filter use cases like inDataGridappearance="main"toappearance="tabs"."tabs"is now the default.appearance="main"keeps working as a deprecated alias and emits aconsole.warnon first use. Switch toappearance="tabs".appearance="content"remains a distinct style variant with a shared bottom border (unchanged)buttonsappearance totheme.cssandglobal.cssStorybook
TabsAppearance,ButtonsAppearance,ContentAppearanceMainAppearance, now showing the deprecated"main"variant with a deprecation notetabStyleprop hidden from Storybook Controls (table: { disable: true }). It is a deprecated backwards-compat alias forTabNavigationand not intended for direct use. Useappearanceinstead.Notes
The
appearance="buttons"variant has previously been prototyped as a standalone component in PR #2020. That PR should be closed and its branch deleted once this one is merged.tabStyleandTabNavigationare marked deprecated in code and can be removed in a future major release once no consumers depend on them.