Skeleton Loading States #448
-
The Spinner component is useful for showing that sections of a page are loading, but there are some reasons why skeleton loading states could possibly provide better UX than Spinners (I won't list them, there's enough articles on Google for that). But the main point I would say is to "bring placeholders closer to their content." Examples: |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
Thank you @vnguyen94! Personally, I'm in favor of this feature. Let's keep this discussion open and solicit demand for it so we can consider how we may prioritize it. It may also be a good contribution. I believe @GiantRobots has some examples he'd like to add too |
Beta Was this translation helpful? Give feedback.
-
Those mostly show some skeleton ui's with cards/tables. We have 3 loaders for SG the fragment loader, the SG loader, and the table loader each with differing rules on how to implement them located in the styleguide http://styleguide.sendgrid.com/loaders.html I think it helps a lot in the feeling that you navigated instead of throwing a large "page" loader instead of the skeleton pages. It can also help with reflow issues. Some of the issues we've experienced around them however include scopes/flags/user perms on a feature that show the skeleton outline and then we use a card to indicate they don't have access to the feature. That experience can be jarring at times but we normally have to deal with it because of race conditions for when http requests normally resolve. |
Beta Was this translation helpful? Give feedback.
-
There's some interesting conversation about how applications load their data in the react docs https://reactjs.org/docs/concurrent-mode-suspense.html#traditional-approaches-vs-suspense I think we use the More fun thoughts from the suspense doc.
Using the suspense api will eventually allow us to pull the loading parts of our components out and decide where the barriers are. We may want to provide insight on how to handle the various application loads users of the library will encounter to keep our UI eventually consistent |
Beta Was this translation helpful? Give feedback.
-
@GiantRobots @vnguyen94 Referencing prior art, would something like Chakra UIs skeleton component fit the use cases you are thinking? |
Beta Was this translation helpful? Give feedback.
@GiantRobots @vnguyen94 Referencing prior art, would something like Chakra UIs skeleton component fit the use cases you are thinking?
https://chakra-ui.com/skeleton