-
-
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
Proposal for withX api change #1524
Conversation
ADD withKnobsV2 & withNotes
Is this true? Wouldn't
I'm not 100% convinced polymorphising the API is a great idea, but I'm also not convinced Also- don't you have a plan around a totally different API for knobs? Should we just wait for that? |
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.
Echoing @tmeasday 's comment, I think withKnobsV2
could be a crime against humanity, and I want to go on record to say don't merge until we've had a chance to discuss. Don't have a counter-proposal yet, but going to try to chat with @tmeasday matter later tonight, since I know we want to get a release out soon. 👍
A third idea here: Perhaps we can export a single symbol ( (cf webpack [This would require core storybook changes however]. |
I thought of this as well.. But we can't:
The thing we don't want to do at this stage |
I'll transform this into a new proposal this evening, hopefully we can agree it 😃 |
Codecov Report
@@ Coverage Diff @@
## release/3.2 #1524 +/- ##
===============================================
- Coverage 20.54% 20.49% -0.06%
===============================================
Files 241 241
Lines 5227 5222 -5
Branches 638 645 +7
===============================================
- Hits 1074 1070 -4
+ Misses 3672 3652 -20
- Partials 481 500 +19
Continue to review full report at Codecov.
|
So please please review this, I hope you like this proposal better @storybooks/team |
@danielduan maybe you'd like to pitch in here? |
I'm not sure if I am in favor of this one either. This seems to solve our architecture issue to a certain extent but it doesn't improve the user experience. On the usability side, it's very tedious that we have all these Also, it doesn't seem like withSmartKnobs is included in our example app, maybe that should be something as well? |
If you're not a fan of: But I think this is something that's separate from/larger then this PR I wonder if we're looking for a perfect solution and backing ourselves in a corner: Can't change the existing (inconsistent) api, which is similarly names to what we current have but want to change in functionality. |
5d75f7b
to
45d05bf
Compare
45d05bf
to
93414cd
Compare
@ndelangen closing this because it got superceded by #1527 |
Issue: #1383
One of the blockers for 3.2 release is the issue of
addonKnobs
andaddonNotes
.We want to change the fundamental nature of how the addons work, but in a non-disruptive gradual way. We need to, to support more addons for more libraries/frameworks.
Previously
addonX
was introduced, but after some discussion we agreed this was not the right way forward. We'd like to continue with the phrasing ofwithX
. However cannot simply detect which api the user is expecting.What I did
I introduced a
with
export for 2 addons.If you like this idea, we can work towards making all addons have this.
How to test
run install, bootstrap, test
run vue example and view knobs and notes
run react example and view knobs and notes