Skip to content

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

Open
Mathbl wants to merge 1 commit into
storybookjs:nextfrom
Mathbl:mathbl/feat/support-panel-disabling
Open

feat: honor parameters[paramKey].disable on addon panels#889
Mathbl wants to merge 1 commit into
storybookjs:nextfrom
Mathbl:mathbl/feat/support-panel-disabling

Conversation

@Mathbl
Copy link
Copy Markdown

@Mathbl Mathbl commented May 11, 2026

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
Copy link
Copy Markdown

changeset-bot Bot commented May 11, 2026

🦋 Changeset detected

Latest commit: 7021be7

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

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

1 participant