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

Addon-docs: Don't error in React when there's no prepareForInline #8415

Merged
merged 3 commits into from
Oct 14, 2019

Conversation

shilman
Copy link
Member

@shilman shilman commented Oct 14, 2019

Issue: #6706

What I did

The inline rendering contributed in #7929 was actually a breaking change for users who had manually configured their docs setup.

Also removed the storyFn call in React default prepareForInline, which can have implications to React hooks. (Should this be a separate PR?)

How to test

Manually configure an app without prepareForInline with and without the change

@vercel
Copy link

vercel bot commented Oct 14, 2019

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/storybook/monorepo/3s4o1edll
🌍 Preview: https://monorepo-git-6706-inline-warning.storybook.now.sh

@shilman shilman requested a review from Aaron-Pool October 14, 2019 13:05
@shilman shilman added this to the 5.3.0 milestone Oct 14, 2019
@Aaron-Pool
Copy link
Contributor

Won't this still lead to a potentially confusing warning for react users with manual configuration? Because they don't actually need to do anything.

Would it be better to just check if the framework is react, and skip the error check if it is? Because, other than react cases, every framework will legit broken if they have specified inline but not provided a prepare for inline hook, yeah?

@shilman shilman changed the title Addon-docs: Warn only when prepareForInline isn't set Addon-docs: Don't error when prepareForInline isn't set in React Oct 14, 2019
@shilman shilman changed the title Addon-docs: Don't error when prepareForInline isn't set in React Addon-docs: Don't error in React when there's no prepareForInline Oct 14, 2019
@shilman shilman requested a review from tmeasday October 14, 2019 13:57
@Aaron-Pool
Copy link
Contributor

Sweet, LGTM now 👍

@shilman shilman merged commit 4550adc into next Oct 14, 2019
@shilman shilman deleted the 6706-inline-warning branch October 14, 2019 15:27
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.

2 participants