Skip to content
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

docs: add information about @storybook/preview-api useArgs hook #22590

Merged
merged 23 commits into from
Oct 2, 2023
Merged

docs: add information about @storybook/preview-api useArgs hook #22590

merged 23 commits into from
Oct 2, 2023

Conversation

jonthenerd
Copy link
Contributor

@jonthenerd jonthenerd commented May 17, 2023

Provide example for those migrating from v6 to v7 and were previously using the @storybook/client-api useArgs hook

Deals with (but likely isn't 100% relevant to) #12006

What I did

Added documentation to the seemingly relevant place with information about how to use the useArgs hook from within a story

How to test

N/A these are docs. However, it would be best to test this within an actual component to ensure the docs are right. I have within my own v7 storybook.

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
  • Make sure to add/update documentation regarding your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Maintainers

  • If this PR should be tested against many or all sandboxes,
    make sure to add the ci:merged or ci:daily GH label to it.
  • Make sure this PR contains one of the labels below.

["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]

@jonniebigodes jonniebigodes self-assigned this May 17, 2023
@jonniebigodes jonniebigodes added documentation patch:yes Bugfix & documentation PR that need to be picked to main branch labels May 17, 2023
@jonthenerd
Copy link
Contributor Author

jonthenerd commented May 17, 2023

Alright. This is ready. Updated the code to avoid the eslint and storybook errors reported, with the minimal fix needed (disabling one line for eslint). I think this is the best that can be done until there is some help or answer on #22593

@jonthenerd
Copy link
Contributor Author

Aligned code block with answer in #22593 . This PR is good to go for review :)

Copy link

@akashchouhan16 akashchouhan16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Copy link
Contributor

@jonniebigodes jonniebigodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonthenerd, thanks for taking the time to put together this pull request and improve the documentation. Appreciate it. I left one item for you to look into.

Let me know once you've addressed it and we'll take it from there.

Have a great week.

Stay safe

docs/writing-stories/args.md Outdated Show resolved Hide resolved
@jonthenerd jonthenerd requested a review from jonniebigodes June 16, 2023 20:19
jonthenerd added 10 commits July 4, 2023 23:00
Provide example for those migrating from v6 to v7 and were previously using the @storybook/client-api useArgs hook
Removed remnant of template method. Shoudl be GTG now.
Made changes to code block to ensure that it will pass eslint rule `react-hooks/rules-of-hooks`
Copy link
Contributor

@jonniebigodes jonniebigodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonthenerd left a couple of items for you to look at when you're able. Let me know once you've addressed them and we'll take it from there. Sounds good?

docs/snippets/react/page-story-args-within-story.js.mdx Outdated Show resolved Hide resolved
docs/writing-stories/args.md Outdated Show resolved Hide resolved
@kasperpeulen kasperpeulen removed the patch:yes Bugfix & documentation PR that need to be picked to main branch label Aug 9, 2023
@jonthenerd jonthenerd requested a review from kylegach as a code owner August 11, 2023 14:56
@jonthenerd
Copy link
Contributor Author

Working on this again. This is NOT ready for review yet. Will update when it is.

@jonniebigodes
Copy link
Contributor

@jonthenerd no problem whatsoever; ping me when you're ready, and I'll be more than glad to take another look at it. Sounds good?

@jonthenerd
Copy link
Contributor Author

jonthenerd commented Aug 11, 2023

@jonniebigodes think it's ready to go. Give it a whirl please :)

FYI - I'm used to leaving the comment threads unresolved and letting the original reviewer resolve them to ensure they've been addressed as desired. Please resolve them if you think they are, or let me know to resolve them and I will. Everybody's different.

@jonniebigodes jonniebigodes added the ci:docs Run the CI jobs for documentation checks only. label Aug 12, 2023
@jonthenerd
Copy link
Contributor Author

@jonniebigodes this is ready for re-review

@jonthenerd
Copy link
Contributor Author

@jonniebigodes , perhaps you're on vacation? @akashchouhan16 is there someone else who should review?

@jonniebigodes
Copy link
Contributor

@jonthenerd sorry for the radio silence. I was away for some time off, but I haven't forgotten about this. If you don't mind, I'll check it on Monday and if nothing arises, I'll gladly merge it.

Hope you have a fantastic weekend.

Stay safe

@jonthenerd
Copy link
Contributor Author

@jonthenerd sorry for the radio silence. I was away for some time off, but I haven't forgotten about this. If you don't mind, I'll check it on Monday and if nothing arises, I'll gladly merge it.

Hope you have a fantastic weekend.

Stay safe

Sounds good @jonniebigodes . Hope your time off was restful.

Copy link
Contributor

@jonniebigodes jonniebigodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonthenerd, as promised, I've checked the pull request, and all is good on my end. Once again, thanks for taking the time to help us improve the documentation with this fantastic contribution. Appreciate it 🙏 !

I'll get it in once the checklist clears.

Hope you have a fantastic week.

Stay safe

@jonniebigodes jonniebigodes merged commit c1b33d8 into storybookjs:next Oct 2, 2023
8 of 9 checks passed
@github-actions github-actions bot mentioned this pull request Oct 2, 2023
20 tasks
@jonthenerd jonthenerd deleted the patch-1 branch October 24, 2023 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:docs Run the CI jobs for documentation checks only. documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants