Skip to content

feat: honor parameters[paramKey].disable on addon panels#889

Merged
dannyhw merged 10 commits into
storybookjs:nextfrom
Mathbl:mathbl/feat/support-panel-disabling
Jun 2, 2026
Merged

feat: honor parameters[paramKey].disable on addon panels#889
dannyhw merged 10 commits into
storybookjs:nextfrom
Mathbl:mathbl/feat/support-panel-disabling

Conversation

@Mathbl

@Mathbl Mathbl commented May 11, 2026

Copy link
Copy Markdown
Contributor

Closes #888.

What this changes

React Native Storybook now honors parameters[paramKey].disable, the standard Storybook convention for hiding individual addon panels per story.

  • A panel whose paramKey matches story.parameters[paramKey].disable === true is filtered out of the addons tab list.
  • If every registered panel is filtered out for the current story, the entire addons UI is hidden (mobile bottom-bar toggle + desktop sidebar).
  • If the currently-selected tab disappears, the first remaining panel is selected.

Before this PR, every panel rendered for every story regardless of parameters. This brings parity with web Storybook.

How to test

Run examples/expo-example (iOS or Android dev client) and add a story with parameters: { controls: { disable: true } }. The Controls tab should be hidden for that story. Disable every panel for a story to verify the whole addons UI hides. Same with EXPO_PUBLIC_LITE_UI=true for the lite UI.

@Mathbl Mathbl requested a review from dannyhw as a code owner May 11, 2026 14:56
@changeset-bot

changeset-bot Bot commented May 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5232382

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

This PR includes changesets to release 9 packages
Name Type
@storybook/react-native-ui Minor
@storybook/react-native-ui-lite Minor
@storybook/react-native Minor
@storybook/react-native-ui-common Minor
@storybook/react-native-theming Minor
@storybook/addon-ondevice-actions Minor
@storybook/addon-ondevice-backgrounds Minor
@storybook/addon-ondevice-controls Minor
@storybook/addon-ondevice-notes Minor

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

@dannyhw

dannyhw commented May 13, 2026

Copy link
Copy Markdown
Member

thanks @Mathbl I will review soon, appreciate your hard work :)

@dannyhw

dannyhw commented Jun 1, 2026

Copy link
Copy Markdown
Member

sorry again for the delay I will get to this soon I promise, been quite a busy month

@dannyhw dannyhw merged commit 092e9f0 into storybookjs:next Jun 2, 2026
1 check passed
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.

Honor parameters[paramKey].disable for addon panels

2 participants