-
-
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
Fix for issue 5932, adding default options to action(s) #6438
Conversation
This pull request is automatically deployed with Now. Latest deployment for this branch: https://monorepo-git-fork-lfdanlu-issue-5932.storybook.now.sh |
@@ -29,67 +28,66 @@ describe('Action', () => { | |||
}); | |||
}); | |||
|
|||
// TODO: This functionality is removed, unsure if to add back or remove |
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.
I saw that this test was commented out and covers the exact functionality that I was re-adding via this pull. Couldn't find the old implementation nor the reasoning for it's removal so if this was removed for a specific reason I would appreciate a pointer.
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.
Scratch that found the pull (#4086), but it is quite a large one so I'm still unable to glean the reason for the initial removal. Gonna change my implementation to mirror how user provided config options were merged with the config supplied by configureActions
)
Codecov Report
@@ Coverage Diff @@
## next #6438 +/- ##
==========================================
- Coverage 41.04% 41.03% -0.02%
==========================================
Files 613 613
Lines 8454 8454
Branches 378 378
==========================================
- Hits 3470 3469 -1
Misses 4929 4929
- Partials 55 56 +1
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## next #6438 +/- ##
==========================================
+ Coverage 40.44% 41.03% +0.58%
==========================================
Files 637 613 -24
Lines 8759 8454 -305
Branches 639 378 -261
==========================================
- Hits 3543 3469 -74
+ Misses 5118 4929 -189
+ Partials 98 56 -42
Continue to review full report at Codecov.
|
@ndelangen I not certain how to assign reviewers, is it supposed to be an automatic process? |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Fix for issue 5932, adding default options to action(s)
Issue: #5932
Apologies for any missteps, first time doing a pull for a open source project :).
What I did
I noticed that both
action
andactions
defaulted their options to{}
, hence the reported issue. To remedy this, I importedconfig
fromconfigureActions.ts
and set it as the new default for ActionOptions.How to test
To test, you can play around with the “with text” and “with some emoji” stories in the cra-kitchen-sink example story (https://github.com/storybooks/storybook/tree/next/examples/cra-kitchen-sink).
Sample test flow:
clearOnStoryChange: true
configureActions
.Additional testing scenarios can be done by adding
configureActions
with various settings in theconfig.js
of the cra-kitchen-sink storybook.If your answer is yes to any of these, please make sure to include it in your PR.