Feature #21003
closedImprove guidelines around loading indicators and status messages
Added by Peter Amstutz 11 months ago. Updated 4 months ago.
Description
Update the GUI coding guidelines
Updated by Peter Amstutz 11 months ago
- Target version changed from Development 2023-10-11 sprint to Development 2023-10-25 sprint
Updated by Peter Amstutz 10 months ago
- Target version changed from Development 2023-10-25 sprint to Development 2023-11-08 sprint
Updated by Peter Amstutz 10 months ago
- Target version changed from Development 2023-11-08 sprint to Development 2023-11-29 sprint
Updated by Stephen Smith 9 months ago
Here's a sample guideline for loading indicators, mostly codifies what we already have but the important things are the recent decision to not use the page spinner for background / partial page updates and a reminder not to use toasts to notify when an action is starting:
Loading indicator use-case guidelines¶
Page Navigation¶
- Navigation between pages should be indicated using
progressIndicatorActions.START_WORKING
andprogressIndicatorActions.STOP_WORKING
to show the global top-of-page pulser - Only the initial load or refresh of the full page (eg. triggered by the upper right refresh button) should use this indicator. Partial refreshes should use a more local indicator.
- Refreshes of only one section of a page should only show its own loading indicator in that section
- Full page refreshes where the location is unchanged should avoid using the initial full-page spinner in favor of the top-of-page spinner, with updated values substituting in the UI when loaded
User Actions¶
- Form submissions or user actions should be indicated by both the
progressIndicatorActions.START_WORKING
and by enabling the spinner on the submit button of the form (if the action takes place through a form AND if the form stays open for the duration of the action in order to show errors). If the form closes immediately then the page spinner is the only indicator. - Toasts should not be used to notify the user of an in-progress action but only completion / error
Lazy-loaded fields¶
- Fields that load after the main view should use a spinner/pulser icon while loading - if the request for extra data fails, a placeholder icon should show with a hint (text or tooltip) indicating that the data failed to load.
- Open question: Should fields that show one value but update with more info (eg uuid that gets updated with a name) show a loading indicator? Or only fields that would be empty otherwise?
- (Suggested loading indicator for inline fields: https://mhnpd.github.io/react-loader-spinner/docs/components/three-dots)
And here are a few places where I found toasts being used to indicate an in progress action:
- Add/remove favorites
- Add/remove public favorites
- Remove process
Updated by Peter Amstutz 9 months ago
- Target version changed from Development 2023-11-29 sprint to Development 2024-01-03 sprint
Updated by Peter Amstutz 8 months ago
- Target version changed from Development 2024-01-03 sprint to Development 2024-01-17 sprint
Updated by Peter Amstutz 7 months ago
- Target version changed from Development 2024-01-17 sprint to Development 2024-01-31 sprint
Updated by Peter Amstutz 7 months ago
- Target version changed from Development 2024-01-31 sprint to Development 2024-02-14 sprint
Updated by Peter Amstutz 7 months ago
- Status changed from New to In Progress
- Subject changed from Improve guidelines around loading indicators and status messages to Improve guidelines around loading indicators and status messages
Updated by Peter Amstutz 6 months ago
- Target version changed from Development 2024-02-14 sprint to Development 2024-02-28 sprint
Updated by Peter Amstutz 6 months ago
- Target version changed from Development 2024-02-28 sprint to Development 2024-03-13 sprint
Updated by Peter Amstutz 6 months ago
- Target version set to Development 2024-03-13 sprint
- Tracker changed from Idea to Feature
Updated by Peter Amstutz 5 months ago
- Target version changed from Development 2024-03-13 sprint to Development 2024-03-27 sprint
Updated by Peter Amstutz 5 months ago
- Target version changed from Development 2024-03-27 sprint to Development 2024-04-10 sprint
Updated by Peter Amstutz 5 months ago
We haven't implemented this anywhere, but when a navigation action happens, I would like to experiment with putting a semi-opaque overlay that blocks clicks (but possibly allows scrolling?) over the main panel to indicate the previous contents are not available while the new contents are being loaded. This would prevent confusion (especially when navigating between projects) about what is the correct contents in situations where the old content remains visible while the new content is loaded -- while avoiding the flicker that would happen with clearing the data table contents while loading.
On the other hand, when the URL bar doesn't change, the old content should remain visible while the new content is loading (keeping current behavior).
Open question: Should fields that show one value but update with more info (eg uuid that gets updated with a name) show a loading indicator? Or only fields that would be empty otherwise?
What about a delayed loading indicator? A field that is pending update would show the existing value (or stay blank) for the first 3-5 seconds, but if the value still isn't ready after 3-5 seconds, the loading indicator shows up. This would reduce flicker in the case where the load quickly, while still signaling to the user that something is happening in situations where it's being slow.
This could be used for navigation as well -- delay applying an opaque layer for 3-5 seconds for situations where navigation is quick, to minimize flicker.
Let me know what you think of these ideas. Otherwise, go ahead and add the guidelines to the WB2 user interface guidelines and resolve the ticket.
I added a follow-up story to go through and make loading indicators behave consistently: #21634
Updated by Peter Amstutz 5 months ago
- Target version changed from Development 2024-04-10 sprint to Development 2024-04-24 sprint
Updated by Stephen Smith 4 months ago
- Status changed from In Progress to Resolved