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

feat(ui, components): style the loader with the design-system #9249

Merged

Conversation

alexandre-lelain
Copy link
Contributor

@alexandre-lelain alexandre-lelain commented Dec 26, 2019

Issue: #9127

What I did

How to test

You can either open the preview deploy and test that the Loader's style is following this one, or checkout the branch, build the project and run the official storybook.

What it looks like

styled_loader

@vercel
Copy link

vercel bot commented Dec 26, 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/26q8yhhyb
✅ Preview: https://monorepo-git-fork-alexandre-lelain-feat-designloader.storybook.now.sh

@domyen
Copy link
Member

domyen commented Dec 27, 2019

Thanks @alexandre-lelain, I'll piggy back on this to add some theming support 🙏

@domyen
Copy link
Member

domyen commented Dec 27, 2019

I found a regression where the loading spinner shows up in cases that it's not supposed to.

This shouldn't appear in the App:default story.
image

The App:default, Preview:no tabs, and Preview:with tabs should not render the Loader. This build in Chromatic is where it was originally accepted (by mistake).

The only stories that should be affected by the Loader work are the ones @alexandre-lelain added App:loading state and Loader:infinite state.

Can you take a look at why Loader is being rendering in the other components and update the stories if needed? 🙏

@domyen domyen self-requested a review December 27, 2019 20:07
domyen
domyen previously requested changes Dec 27, 2019
Copy link
Member

@domyen domyen left a comment

Choose a reason for hiding this comment

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

See comment #9249 (comment)

@domyen domyen assigned alexandre-lelain and unassigned domyen Dec 28, 2019
@alexandre-lelain
Copy link
Contributor Author

The fact the Loader is being displayed on those stories is "expected" - just like the placeholders for the stories' names on the left.

The Loader relies on the same core logic as the stories' names placeholders. It will be displayed automatically when the UI is in loading state (ie after page has loaded, when the stories' JS bundles are being fetched).

Maybe we can override this in the stories, but I'm not sure we can do this without adding some code in the components' sources - which, in my opinion, will add potential source of errors.

@domyen
Copy link
Member

domyen commented Dec 29, 2019 via email

@alexandre-lelain
Copy link
Contributor Author

Alright, I'll see how I can mock the loader in those cases 👍

@alexandre-lelain
Copy link
Contributor Author

Hey @domyen I pushed some changes to hide the Loader when needed.

However it seems I cannot update the chromatic snapshots from my machine (the scripts/test.js crashes) - I suspect it's because I'm on Windows (I have nodejs@10.16.3).

But you can see that the loader was hidden correctly in the App:default story.

@domyen
Copy link
Member

domyen commented Jan 2, 2020 via email

@ndelangen ndelangen self-assigned this Jan 8, 2020
@ndelangen
Copy link
Member

LGTM
Screenshot 2020-01-08 at 15 14 29

@ndelangen ndelangen dismissed domyen’s stale review January 8, 2020 18:08

It's been corrected

@ndelangen ndelangen merged commit 4da0260 into storybookjs:next-6.0.0 Jan 8, 2020
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.

4 participants