Skip to content

Honor parameters[paramKey].disable for addon panels #888

@Mathbl

Description

@Mathbl

Describe the bug
React Native Storybook does not honor parameters[paramKey].disable, the standard Storybook convention for hiding an addon panel per story. Every registered panel renders for every story regardless of the story's parameters.

On web Storybook the same parameter hides the matching tab.

To Reproduce

  1. In any React Native Storybook project (10.3.x), add a story that disables a panel via its paramKey:

    export const NoControls: Story = {
      parameters: { controls: { disable: true } },
      args: { label: 'Hi' },
    };
  2. Run Storybook on device or simulator.

  3. Open the addons panel for NoControls.

  4. The Controls tab is still rendered (expected: hidden).

Same is true for any panel addon that declares a paramKey (e.g. notes, actions, custom addons). Disabling every panel for a story does not hide
the addons UI either — the mobile bottom-bar toggle and the desktop addons column remain visible with empty tabs.

Expected behavior
Match web Storybook:

  1. A panel whose paramKey matches story.parameters[paramKey].disable === true is filtered out of the tab list.
  2. If every panel is filtered out, the addons UI is not rendered (mobile toggle button + desktop sidebar both hidden).
  3. If the currently-selected tab gets filtered out, selection falls back to the first remaining panel instead of showing an empty state.

System:

storybook:               ^10.3.5
@storybook/react-native: ^10.3.1
react-native:            0.81.6
react:                   19.1.4
platform:                iOS + Android (Expo SDK 54)

Happy to open a PR if needed.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions