-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Better addon apis & devkits for addons #6759
Merged
Merged
Conversation
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
…deleting them This DOES NOT set them to the URL, they are STILL REMOVED as always from main URL.
…e matches if the name AND type match, it's very likely the same knob, checking the value was slower & caused and issue for me when loading the value from url the first time. Open to other solutions too.
# Conflicts: # addons/backgrounds/src/containers/BackgroundSelector.tsx # addons/knobs/package.json # addons/knobs/src/KnobManager.js # addons/knobs/src/components/Panel.js # lib/ui/src/components/preview/preview.js
# Conflicts: # addons/backgrounds/src/containers/BackgroundSelector.tsx # lib/api/src/modules/addons.ts
shilman
approved these changes
May 16, 2019
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.
Looks great. Left a bunch of comments inline, none of them particularly crucial other than the documentation issues, which I believe is what this is supposed to address.
Are you ok with delaying merge until after 5.1 ships?
# Conflicts: # examples/official-storybook/package.json
# Conflicts: # docs/yarn.lock
# Conflicts: # .teamcity/OpenSourceProjects_Storybook/buildTypes/OpenSourceProjects_Storybook_Bootstrap.kt # docs/src/pages/addons/writing-addons/index.md # docs/yarn.lock # examples/official-storybook/package.json # lib/ui/src/containers/preview.js # package.json
This was referenced Jan 15, 2021
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue: creating addons is too complicated
What I did
With some new apis based on react hooks, this can be made much easier!
Our addons in the monorepo have grown to quite some complexity over time, because of backwards compatibility, feature creep of just because of "shit happens".
Because of this, it can be hard to point to one of our addons as an example on how to write addons.
This PR introduces "devkits", which are like tiny featureless addons that demonstrate a particular variant/type of addon.
We could move those devkits into their own repo as well, to make it easier for users to begin development of their own addon.