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

Develop with storybook #2882

Merged
merged 9 commits into from
Oct 13, 2021

Conversation

mradenovic
Copy link
Contributor

I have noticed that Storybook was removed recently. When I checked the code and how it was implemented I understand why.

This approach should improve the following:

  • Move workflow description to root README so it is easier to find.
  • Current workflow described in How to test changes locally is complicated (as described here) and possibly broken. Storybook workflow should work out of the box.
  • All the components, including those in gatsby example are hot reloading when the source is changed.

Since Google Maps Script can be loaded only once, load it in a
global decorator for all components.
By resolving @react-google-maps/api from source, any changes made
to source will reflect in storybook stories, both for core
components and gatsby examples.
- Handle loading status
- Use type script in config file to avoid invalid parameters
- Update README
@mradenovic mradenovic marked this pull request as ready for review October 11, 2021 20:51
@mradenovic
Copy link
Contributor Author

Hi @JustFly1984, this should be quick and easy to test. Let me know what do you think before I invest more time 😃

@JustFly1984
Copy link
Owner

@mradenovic I will look into your PR this week.

Copy link
Owner

@JustFly1984 JustFly1984 left a comment

Choose a reason for hiding this comment

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

lgtm

@JustFly1984 JustFly1984 merged commit ef2453a into JustFly1984:develop Oct 13, 2021
@mradenovic mradenovic deleted the develop-with-storybook branch October 13, 2021 03:31
@JustFly1984
Copy link
Owner

@mradenovic There is very minimal maintenance of storybook.

I see that a lot of dependencies are not supporting react@17, hence will prevent us from easy react@18 support in the future, or require to dig into storybook itself, which could be an unpaid nightmare.

warning "@storybook/addon-actions > @storybook/api > @reach/[email protected]" has incorrect peer dependency "[email protected] || 16.x || 16.4.0-alpha.0911da3".
warning "@storybook/addon-actions > @storybook/api > @reach/[email protected]" has incorrect peer dependency "[email protected] || 16.x || 16.4.0-alpha.0911da3".
warning "@storybook/addon-actions > @storybook/api > @reach/router > [email protected]" has incorrect peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0".
warning "@storybook/addon-essentials > @storybook/[email protected]" has unmet peer dependency "@storybook/components@^6.3.0".
warning "@storybook/addon-essentials > @storybook/[email protected]" has unmet peer dependency "@storybook/core-events@^6.3.0".
warning "@storybook/addon-essentials > @storybook/[email protected]" has unmet peer dependency "@storybook/theming@^6.3.0".
warning " > [email protected]" has unmet peer dependency "webpack@>=2".
warning "@storybook/addon-essentials > @storybook/addon-docs > @storybook/core > @storybook/[email protected]" has unmet peer dependency "webpack@*".

@mradenovic
Copy link
Contributor Author

I see what you mean. I checked the storybook repo and there is an issue about this which they are trying to resolve. I would keep it while it works.

What would be the other workflow to hot reload components while you work on them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants