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

Navigation Block: Improve loading state #18482

Closed
shaunandrews opened this issue Nov 13, 2019 · 9 comments
Closed

Navigation Block: Improve loading state #18482

shaunandrews opened this issue Nov 13, 2019 · 9 comments
Labels
[Block] Navigation Affects the Navigation Block [Type] Enhancement A suggestion for improvement.

Comments

@shaunandrews
Copy link
Contributor

shaunandrews commented Nov 13, 2019

When loading the block editor with a Navigation block, there is a brief loading state when fetching the menu items. Currently this loading message is left aligned and has a label that is slightly too large. Also, the "Loading..." message is not vertically aligned to the spinner. Here's a screenshot from the new TwentyTwenty theme:

image

I propose we update the loading message with the following changes:

  • Center the message within the block
  • Show a dashboard border to help indicate the size of the block
  • Add a subtle background color to the block to help indicate the size of the block
  • Add a subtle fade-in/fade-out animation to the new background color to further emphasis it's loading state
  • Reduce the size of the loading label to 13px
  • Add a simple fade-out/fade-in transition from the loading state to the normal state.

Here's a GIF of what it could look like:

Navigation Loading i2

(Its worth noting that the background animation doesn't come through very well in the GIF, but I'd expect a very simple pulse-like animation.)

@shaunandrews shaunandrews added [Type] Enhancement A suggestion for improvement. Needs Design Feedback Needs general design feedback. [Block] Navigation Affects the Navigation Block labels Nov 13, 2019
@shaunandrews shaunandrews added this to the Gutenberg 7.0 milestone Nov 13, 2019
@youknowriad youknowriad removed this from the Gutenberg 7.0 milestone Nov 26, 2019
@karmatosed
Copy link
Member

I think this is good but my only thought is if we have existing loading states let's use those. I don't think we do or if we do we could also see this as a way to improve them.

Just looping in @jasmussen to check my thinking we have no existing state to call on.

@karmatosed karmatosed removed the Needs Design Feedback Needs general design feedback. label Nov 29, 2019
@jasmussen
Copy link
Contributor

Love it, Shaun. I think we can probably start to think about a new spinner design for all of WordPress (😱) — but that could probably a separate thing.

Which brings me to: this is a good design, because it leverages how the existing placeholders look, and this loading state does share DNA with the placeholder state. So, 👍 👍

Depending on how far to take this effort, and given the DNA shared between the Placeholder state and the Loading state, what would the loading state look like, if the placeholder looked as suggested in #18667?

Concepts

@karmatosed
Copy link
Member

Whilst I don't like lot of Facebook stuff, the loading being an actual visual of the thing coming, or 'bars' to me is nicer than a spinner. I wonder if we could use something similar?

@jasmussen
Copy link
Contributor

I've heard that referred to as "skeleton loading". I think it can be nice, I also think it's hard to make generic.

@karmatosed
Copy link
Member

Ah yes, that's the term. I agree it's very hard to be generic. I have a personal preference to avoid loaders that go around as don't scale to multiples and also can cause visual issues for some. However, again it's about finding one that will scale across and work in this case.

@karmatosed
Copy link
Member

Relating to the drop-zone we have this issue to loop back to: #17605

@getdave
Copy link
Contributor

getdave commented Jan 8, 2020

Does this still happen @shaunandrews? I can't replicate.

@shaunandrews
Copy link
Contributor Author

@getdave I can't seem to trigger a loading state. I tried simulating a slow connection with Chrome and couldn't get a loading state to display. Perhaps the current block doesn't have one. Its unclear if one is needed — would there be a scenario when the block would need to show a loading state?

@jasmussen
Copy link
Contributor

There's a very brief loading state with the spinner in the top left, when you first insert the navigation block. I'm not seeing it on page reloads. I think there's a separate effort to look at, to improve the spinner design itself, and which can position it well within all blocks that have a loading state. But specifically to the navigation block, I wonder if we can close this one now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

5 participants