refactor(OneChip): promote from experimental to stable#3846
refactor(OneChip): promote from experimental to stable#3846eliseo-juan wants to merge 3 commits intorefactor/storybook-sidebar-reorganization-2from
Conversation
There was a problem hiding this comment.
Pull request overview
Promotes components’ Storybook status from experimental to stable and removes the runtime experimental warning wrapper from their public exports.
Changes:
- Removes
experimentalComponent()wrapping fromChip(OneChip) andF0BigNumberexports. - Updates Storybook
tagsto["autodocs", "stable"]for OneChip, F0Heading, and F0BigNumber stories.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/react/src/components/OneChip/index.tsx | Removes experimental wrapper and exports Chip directly. |
| packages/react/src/components/OneChip/index.stories.tsx | Marks Chip stories as stable. |
| packages/react/src/components/F0Heading/stories/Heading.stories.tsx | Marks Heading stories as stable. |
| packages/react/src/components/F0BigNumber/index.tsx | Removes experimental wrapper from F0BigNumber export. |
| packages/react/src/components/F0BigNumber/stories/F0BigNumber.stories.tsx | Marks BigNumber stories as stable. |
| layout: "centered", | ||
| }, | ||
| tags: ["autodocs", "experimental"], | ||
| tags: ["autodocs", "stable"], |
There was a problem hiding this comment.
Chip is now promoted to stable, but this Storybook file still lacks the required Snapshot story (using withSnapshot({})) that renders the meaningful variants for Chromatic. Please add a Snapshot story so the component has baseline visual coverage like other stable components.
| @@ -122,7 +121,4 @@ const _Chip = ({ | |||
| ) | |||
| } | |||
|
|
|||
There was a problem hiding this comment.
After removing the experimentalComponent wrapper, the exported component's React name will come from _Chip, which shows up as _Chip in React DevTools/Storybook docs. Consider setting _Chip.displayName = "Chip" (or defining the component as function Chip(...)) so the stable export has a clean, user-facing name.
| _Chip.displayName = "Chip" |
| * @experimental This is an experimental component use it at your own risk | ||
| */ | ||
| export const Chip = experimentalComponent("Chip", _Chip) | ||
| export const Chip = _Chip |
There was a problem hiding this comment.
Now that Chip is being promoted to stable, please ensure its clickable container meets button semantics for assistive tech. The implementation uses a clickable <div>; it should include an appropriate role (e.g. role="button") and relevant ARIA (and ideally use a <button> for the main interactive element) so it is announced and behaves correctly for screen readers.
| export const F0BigNumber = withDataTestId( | ||
| experimentalComponent<typeof F0BigNumberCmp>("F0BigNumber", F0BigNumberCmp) | ||
| ) | ||
| export const F0BigNumber = withDataTestId(F0BigNumberCmp) |
There was a problem hiding this comment.
The PR title/description focuses on promoting OneChip only, but this PR also changes F0BigNumber (removes experimentalComponent) and updates Storybook tags for F0Heading/F0BigNumber. Please update the PR description (and/or title) to reflect the additional components being promoted to stable, so reviewers and release notes don’t miss these API/status changes.
📦 Alpha Package Version PublishedUse Use |
🔍 Visual review for your branch is published 🔍Here are the links to: |
Coverage Report for packages/react
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
Summary
tags: ["autodocs", "experimental"]→tags: ["autodocs", "stable"]inindex.stories.tsxexperimentalComponent()wrapper from theChipexport@experimentalJSDoc commentimport { experimentalComponent } from "@/lib/experimental"Changes
packages/react/src/components/OneChip/index.tsx— stabilized exportpackages/react/src/components/OneChip/index.stories.tsx— updated tags tostable