Skip to content

feat(ui): add appearance="buttons" to TabBar and rename "main" to "tabs" - #2081

Merged
MartinS-git merged 9 commits into
mainfrom
tabBar-appearance
Oct 14, 2026
Merged

MartinS-git merged 9 commits into
mainfrom
tabBar-appearance

Conversation

@MartinS-git

@MartinS-git MartinS-git commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Closes #2028.

Summary

  • Adds appearance="buttons" to TabBar, a pill-style segmented control for pre-defined filter use cases like in DataGrid
  • Renames appearance="main" to appearance="tabs". "tabs" is now the default.
  • appearance="main" keeps working as a deprecated alias and emits a console.warn on first use. Switch to appearance="tabs".
  • appearance="content" remains a distinct style variant with a shared bottom border (unchanged)
  • Adds the required CSS tokens for the buttons appearance to theme.css and global.css

Storybook

  • New stories: TabsAppearance, ButtonsAppearance, ContentAppearance
  • Updated story: MainAppearance, now showing the deprecated "main" variant with a deprecation note
  • tabStyle prop hidden from Storybook Controls (table: { disable: true }). It is a deprecated backwards-compat alias for TabNavigation and not intended for direct use. Use appearance instead.

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.

tabStyle and TabNavigation are marked deprecated in code and can be removed in a future major release once no consumers depend on them.

…#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-bot

changeset-bot Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 884a115

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@cloudoperators/juno-ui-components Minor
@cloudoperators/juno-app-doop Patch
@cloudoperators/juno-app-greenhouse Patch
@cloudoperators/juno-app-heureka Patch
@cloudoperators/juno-app-supernova Patch
@cloudoperators/juno-app-template Patch
@cloudoperators/juno-messages-provider 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

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-14 15:45 UTC

@MartinS-git MartinS-git changed the title feat(TabBar): add appearance="buttons" and rename "content" to "tabs" feat(ui): add appearance="buttons" to TabBar and rename "content" to "tabs" Oct 12, 2026
…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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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.

Comment thread packages/ui-components/src/components/TabBarItem/TabBarItem.component.tsx Outdated
Comment thread packages/ui-components/src/components/TabBar/TabBar.test.tsx
@MartinS-git
MartinS-git marked this pull request as ready for review October 12, 2026 08:54
@MartinS-git
MartinS-git requested review from a team and franzheidl as code owners October 12, 2026 08:54
Signed-off-by: MartinS-git <info@eyepic.de>
@franzheidl franzheidl changed the title feat(ui): add appearance="buttons" to TabBar and rename "content" to "tabs" feat(ui): add appearance="buttons" to TabBar and rename "main" to "tabs" Oct 12, 2026
franzheidl
franzheidl previously approved these changes Oct 13, 2026

@franzheidl franzheidl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have left two comments re things I think we should improve, no blockers though.

Comment thread packages/ui-components/src/components/TabBar/TabBar.component.tsx
@franzheidl

Copy link
Copy Markdown
Member

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>
franzheidl
franzheidl previously approved these changes Oct 14, 2026
Comment thread packages/ui-components/src/components/TabBar/TabBar.test.tsx Outdated
…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>
@MartinS-git
MartinS-git merged commit 2c6a280 into main Oct 14, 2026
24 checks passed
@MartinS-git
MartinS-git deleted the tabBar-appearance branch October 14, 2026 15:45
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.

[Task](ui): implement TabBar appereance="buttons"

4 participants