Skip to content

Hide controls if they are disabled using the built-in includeConditionalArg function#714

Merged
dannyhw merged 6 commits intostorybookjs:nextfrom
daviegourevitch:issue-711/hide-conditional-args
Apr 26, 2025
Merged

Hide controls if they are disabled using the built-in includeConditionalArg function#714
dannyhw merged 6 commits intostorybookjs:nextfrom
daviegourevitch:issue-711/hide-conditional-args

Conversation

@daviegourevitch
Copy link
Copy Markdown
Contributor

Issue: #711

What I did

I call the pre-existing function includeConditionalArg for each arg in on-device-controls and only render them if their condition is met.

How to test

I added a story to the example storybook called HiddenControls that lets you test the normal use-case of having "advanced" controls

Comment thread packages/ondevice-controls/src/ControlsPanel.tsx Outdated
@dannyhw
Copy link
Copy Markdown
Member

dannyhw commented Apr 16, 2025

Hey this looks good, thanks for the pr 🙏 . Unfortunately I'm a bit unavailable for about a week so I'm not able to fully test but I really appreciate it.

I will get this tested and merged as soon as I can.

@daviegourevitch
Copy link
Copy Markdown
Contributor Author

Perfect, thanks so much!

@dannyhw
Copy link
Copy Markdown
Member

dannyhw commented Apr 26, 2025

made a slight adjustment to get the value from a function call

@dannyhw dannyhw merged commit ec36808 into storybookjs:next Apr 26, 2025
@daviegourevitch
Copy link
Copy Markdown
Contributor Author

Thank you!!! :D

@daviegourevitch daviegourevitch changed the title Hide controls if they are disabled using the built-in includeConditionalArg functoin Hide controls if they are disabled using the built-in includeConditionalArg function Apr 29, 2025
@dannyhw
Copy link
Copy Markdown
Member

dannyhw commented Apr 30, 2025

Of course, thanks for providing the 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.

2 participants