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

Vue: map args correctly in CSF3 implicit render function #18209

Merged
merged 3 commits into from May 16, 2022

Conversation

yannbf
Copy link
Member

@yannbf yannbf commented May 12, 2022

Issue: N/A

What I did

The implicit render function was not being exported nor props from components that are defined via @Prop were correctly passed to the component. Both of these things are now fixed!

How to test

  • Is this testable with Jest or Chromatic screenshots?
  • Does this need a new example in the kitchen sink apps?
  • Does this need an update to the documentation?

If your answer is yes to any of these, please make sure to include it in your PR.

@nx-cloud
Copy link

nx-cloud bot commented May 12, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 58f38f2. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@yannbf
Copy link
Member Author

yannbf commented May 12, 2022

Thank you so much for catching this bug @kylesuss!

@shilman shilman changed the title Vue: fix implicit render function Vue: Fix implicit render function May 14, 2022
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

@yannbf any idea why CI is broken?

@yannbf
Copy link
Member Author

yannbf commented May 16, 2022

@yannbf any idea why CI is broken?

Funny enough the default render function was wrong, but still worked. I changed it to the correct way, which is by passing Object.keys(argTypes) to props rather than the actual args. The way Vue2 sb renders stories is... curious. Hehe

Should be good now!

@yannbf yannbf force-pushed the fix/vue-default-render-fn branch from 8e0175e to 58f38f2 Compare May 16, 2022 10:08
@yannbf yannbf changed the title Vue: Fix implicit render function Vue: map args correctly in CSF3 implicit render function May 16, 2022
@yannbf yannbf requested a review from shilman May 16, 2022 11:34
@yannbf yannbf merged commit fb4f6dc into next May 16, 2022
@yannbf yannbf deleted the fix/vue-default-render-fn branch May 16, 2022 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants