-
-
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
Add URL query param feature #6601
Conversation
This pull request is automatically deployed with Now. Latest deployment for this branch: https://monorepo-git-add-addon-contextsurl-q.storybook.now.sh |
Sorry for some drastic files movement, but I think this can make the source code easier to follow... And I quickly add 2 tests to cover the new pure functions. I think the feature is good to go. Let me see if we can push this addon to Angular community as the next. 💪 |
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.
Looking great @leoyli 👏
I wonder if there are some types & patterns of this that would be useful for other addons as well (e.g. the createAddonDecorator
) @ndelangen @tmeasday
@shilman, I believe there are some pattern that potential can be further extracted to make cross framework addon development a breeze. I would be happy to share or draft a post to discuss on it. So far it seems each addon came up its unique way (and I came up with my own... but hope people think this could be easy to understand and follow). |
I guess many people starts to get /Volumes/Data/GitHub/storybook/addons/info/src/components/types/ArrayOf.js
1:1 error Unused eslint-disable directive (no problems were reported from 'import/no-cycle')
/Volumes/Data/GitHub/storybook/addons/info/src/components/types/ObjectOf.js
1:1 error Unused eslint-disable directive (no problems were reported from 'import/no-cycle')
/Volumes/Data/GitHub/storybook/addons/info/src/components/types/OneOfType.js
1:1 error Unused eslint-disable directive (no problems were reported from 'import/no-cycle')
/Volumes/Data/GitHub/storybook/addons/info/src/components/types/PrettyPropType.js
1:1 error Unused eslint-disable directive (no problems were reported from 'import/no-cycle')
/Volumes/Data/GitHub/storybook/addons/info/src/components/types/Shape.js
1:1 error Unused eslint-disable directive (no problems were reported from 'import/no-cycle') |
@leoyli I just pushed a fix for the linting error. Hopefully it passes CI. 🙏 |
@leoyli BTW can you create an issue in the storybook repo and reference that instead using the |
@shilman, do you mean open an issue for the linting error or copy the original issue into this repo?! |
@leoyli copy the original issue into this repo |
…g, and package.json
d8ca8e0
to
d66aa30
Compare
Codecov Report
@@ Coverage Diff @@
## next #6601 +/- ##
==========================================
+ Coverage 40.67% 40.69% +0.02%
==========================================
Files 633 633
Lines 8674 8686 +12
Branches 620 624 +4
==========================================
+ Hits 3528 3535 +7
- Misses 5057 5061 +4
- Partials 89 90 +1
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## next #6601 +/- ##
=========================================
+ Coverage 40.67% 40.7% +0.03%
=========================================
Files 633 633
Lines 8674 8687 +13
Branches 620 625 +5
=========================================
+ Hits 3528 3536 +8
- Misses 5057 5062 +5
Partials 89 89
Continue to review full report at Codecov.
|
@leoyli build failed in
|
@shilman, learned a lesson on |
Going to merge it since CD/CI are happy and all my paranoid checks and bug hunting have been done! 💪 |
Related to #6602. |
Issue: #6602
What I did
serializers
.How to test
Story running under default contexts
Story running under preselected contexts set by URL query params
Known bugs
addon-knob
.api.setQueryParams({ contexts: null })
: nothing happened, but based on the doc this query param should be removed.Will file issues later to track it.