Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixes #242 (an action appears in the controls tab as an invalid control type) #246

Conversation

lauriharpf
Copy link
Contributor

Issue: #242

What I did

In the controls panel, filter out the non-control args so that e.g. actions do not incorrectly get shown in the controls tab.

How to test

Use the ActionButton -> Basic example in the example app under /examples/native:

Run it with the changes in this branch as-is

The Controls tab shows the control and does not (incorrectly) show the action:

with-fix.mov

Run it without the changes in ControlsPanel.tsx

The Controls tab shows both the control and (incorrectly) the action:

without-fix.mov
  • Does this need a new example in examples/native? no, in my opinion adjusting the existing example (as is done here) is sufficient
  • Does this need an update to the documentation? no, not in my opinion

…an invalid control type).

In the controls panel, filter out the non-control args so that e.g. actions do not incorrectly get shown in the controls tab.
@lauriharpf lauriharpf requested a review from dannyhw as a code owner July 28, 2021 13:25
Copy link
Member

@dannyhw dannyhw left a comment

Choose a reason for hiding this comment

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

Looks great 👍

@dannyhw
Copy link
Member

dannyhw commented Jul 28, 2021

From watching your video I realised we really need to update the ui for actions on android 😅

@dannyhw dannyhw merged commit 8e0a89f into storybookjs:next-6.0 Jul 28, 2021
dannyhw pushed a commit to raychanks/react-native that referenced this pull request Feb 7, 2022
…lid control type (storybookjs#246)

In the controls panel, filter out the non-control args so that e.g. actions do not incorrectly get shown in the controls tab.
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.

2 participants