-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
UI: Improve controls addon #23635
Merged
Merged
UI: Improve controls addon #23635
Changes from 25 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
ea1b224
Improve loading for controls
cdedreuille cc19cff
Merge branch 'next' into charles-update-controls-addon
cdedreuille fd67d96
Made loading works
cdedreuille b6cdb0c
Fix types error
cdedreuille 997abea
Update ControlsPanel.tsx
cdedreuille 2f9ce19
Add Link component
cdedreuille 81d6bd9
Update
cdedreuille 4a717d9
Fix links
cdedreuille 3ed5f7a
Improve Link + Icons
cdedreuille 89ecd7e
Icons are now working :)
cdedreuille 75935b9
Improve Link component
cdedreuille d156fb9
Improve Link
cdedreuille dbd77c8
Merge branch 'next' into charles-update-controls-addon
cdedreuille a3a6327
Improve link
cdedreuille 22cfba6
Update Empty.tsx
cdedreuille 716064c
Remove FakeIcon
cdedreuille f524837
Add hover link when not set up
cdedreuille e5734eb
Update Link.tsx
cdedreuille 90eb841
Fix some icons names
cdedreuille ce53df8
Update DocsPage.stories.tsx
cdedreuille 681cd17
add icons to verdaccio proxy config
ndelangen 1b6eb11
add proper alias for components/experimental
ndelangen 04ab1d2
Remove NoControlWarning
cdedreuille 1423bed
Merge branch 'charles-update-controls-addon' of https://github.com/st…
cdedreuille 6ab4dea
Merge branch 'next' into charles-update-controls-addon
cdedreuille c5f6677
Test
cdedreuille 1b138a9
Cleaning loading state
cdedreuille e206d21
Update ControlsPanel.tsx
cdedreuille fa6d316
Merge branch 'next' into charles-update-controls-addon
cdedreuille df56d8b
Merge branch 'next' into charles-update-controls-addon
cdedreuille f3d2828
Merge branch 'next' into charles-update-controls-addon
cdedreuille 0ed119c
Merge branch 'next' into charles-update-controls-addon
cdedreuille 8a5ce35
Fix the Link style
cdedreuille b22fd14
Add delay to empty state to prevent flickering
cdedreuille File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cdedreuille @JReinhold Can we find a way to make this Link optional? When rendering action props (aka: onChange, onClick, etc.) they have no control, but they're handled by the actions addon. With this change, even though their control should be empty, we render the link on hover.
I have other examples beyond just action props, but ideally I would like to globally disable any "Setup controls" links with a parameter or something similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, the only reason I need
control: { type: null }
on the below argTypes is to prevent the link from rendering on hover in the ArgsTable.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MWhite-22 Thanks for your feedback. I see what you mean but I'm not sure why this links is a problem. Are you using the controls as a tool or as a way to show what props you can edit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use storybook as public interactive docs for our component library.
The default behavior of rendering the link on hover makes it look like our docs are not completed, and we like to be incredibly thorough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a link I can look at? Generally speaking, I think there's a clear distinction between docs and controls. Docs are specifically meant to document your components where controls is more about testing. But I can understand that some users like you can use controls as a way to document your stories. I'll try to think if there's a way to achieve what you need without docs.