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

UI: Instant-on manager #12707

Merged
merged 32 commits into from
Oct 30, 2020
Merged

UI: Instant-on manager #12707

merged 32 commits into from
Oct 30, 2020

Conversation

ghengeveld
Copy link
Member

@ghengeveld ghengeveld commented Oct 8, 2020

Issue: #12702

What I did

This implements an instant-on manager UI by bundling a prebuilt manager with the Storybook package, as well as caching a locally built manager. The cache gets busted whenever a change is made to manager.js or the webpack config (typically via main.js). There's also a --no-manager-cache flag which disables caching and ignores the prebuilt manager. The prebuilt manager is also used when building a static Storybook, assuming all criteria are met.

▶️ Watch the demo

How to test

  • Run start-storybook against a vanilla, newly installed Storybook which only has addon-links and addon-essentials installed. It will say "Using prebuilt manager" and skip building the manager (see the startup message, it won't mention the manager build time).
  • Run build-storybook against the same Storybook, and notice it will use the prebuilt manager here as well.
  • Run start-storybook against any other Storybook. The first time it will build the manager as normal. Then kill and run start-storybook again. Now it will say "Using cached manager" and work the same as above.

The --no-manager-cache flag should be added to the docs.

To do

  • Refactor the dev server for readability / maintainability
  • Start the browser as soon as the manager is ready
  • Show an appealing and useful UI as the preview builds
  • Use prebuilt when creating a static build
  • Setup our publish pipeline to prebuild the manager before publishing

@ghengeveld ghengeveld changed the title Create, use and publish a prebuilt manager Instant-on manager UI Oct 9, 2020
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.

This is looking great. How do we publish this as part of the release? Is that a separate PR or an addition to this one?

@shilman shilman changed the title Instant-on manager UI UI: Instant-on manager Oct 30, 2020
@shilman shilman merged commit db9b0bd into next Oct 30, 2020
@shilman shilman deleted the 12702-instant-on-manager branch October 30, 2020 15:32
@shilman shilman mentioned this pull request Oct 30, 2020
@ghengeveld
Copy link
Member Author

🚀

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.

3 participants