Skip to content

Conversation

@alisonjoseph
Copy link
Member

Closes #4683

Changelog

New

Changed

  • Rename all instances of unstable in demos to preview

Copy link
Contributor

@Kritvi-bhatia17 Kritvi-bhatia17 left a comment

Choose a reason for hiding this comment

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

The PR looks good to me, Alison!
One small thing I wanted to discuss: while reviewing this PR, I noticed that the feature flag in the toggle applies to both sizes. This isn’t coming across well in the live demo because we currently have a size prop in Storybook instead of separate stories for the two different sizes.

Do you think there’s a possible workaround for that? Would removing the default from the live demo for the feature flag story help, or could we create two separate stories in Storybook so it reflects better in the live demo as well?

image

@alisonjoseph
Copy link
Member Author

alisonjoseph commented Jan 8, 2026

@Kritvi-bhatia17 We would need to create two different stories in order to show in the live demo. So I suppose we would need to decide if thats something we want to do here. We don't really do this for most other components/props.

@Kritvi-bhatia17
Copy link
Contributor

We don't really do this for most other components/props.

Yeah, you’re right. Generally, we use size as a prop rather than creating another story. So I think the devs can decide whether the toggle without the feature flag should simply have a size prop instead of two different stories if that isn't a breaking change, which would also solve the problem. Alternatively, we could add two stories within the toggle with the feature flag.

@alisonjoseph
Copy link
Member Author

alisonjoseph commented Jan 14, 2026

@Kritvi-bhatia17 You're able to toggle the small size prop currently in the storybook.
https://react.carbondesignsystem.com/?path=/story/components-toggle-feature-flag--toggle&args=size:sm
Screenshot 2026-01-14 at 7 27 29 AM

Am I good to merge this PR in? I think this should be ok, if we want to add anything in the future we can do that.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Toggle] add the feature flag toggles to the live demo as options in the menu

3 participants