Storybook: Replace implicit actions with explicit ones #70589
Storybook: Replace implicit actions with explicit ones #70589im3dabasia wants to merge 2 commits intoWordPress:trunkfrom
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
t-hamano
left a comment
There was a problem hiding this comment.
Thanks for the PR! All of the components appear to have been refactored appropriately.
It looks like the following three have not yet been updated; they need to be addressed as well, right?
|
Thanks for this work @im3dabasia! Feel free to also revert 7bfce92 which I believe will also effectively close #67834 (kudos to @t-hamano for bring it up). |
|
Thanks for the feedback,
|
This PR is to remove fields that will be deprecated in the future in story definitions. I don't think it matters if the component itself is deprecated or not. |
|
Hey @im3dabasia 👋 Checking in on this pull request, would you be able to make the changes @t-hamano mentioned relating to the |
|
I will close this PR in favor of #73502. |
What?
Closes #60660
Replaces implicit action args (matched via
argTypesRegex) with explicitfn()spies from@storybook/testin stories. Some components had there stories updated in this PRWhy?
Storybook 8 removes support for implicit action args via argTypesRegex. Explicit fn() spies are now the recommended approach for better testing, portability, and future-proofing.
How?
Updated stories that were relying on argTypesRegex to instead use explicit actions.
Testing Instructions
npm run storybook:dev.