question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proposal: LoadingButton

See original GitHub issue

Proposal:

A new ProgressButton control that can show the (indeterminate) progress ring next to the ContentPresenter to indicate that a running task.

Progressbutton s

Summary

A button control that can show a progress ring to indicate that the action that is attached to the click event is processed. The Fluent UI toolkits has this control already:(https://fluentsite.z22.web.core.windows.net/components/button/definition?showCode=false&showRtl=false&showTransparent=false&showVariables=false#states-loading)

Rationale

The ProgressBar and ProgressRing are great to show the user that the application is doing something. Often, these tasks (that show the progress) are attached to a specific user action, such as clicking a button. Writing the XAML to include both a e.g. ProgressRing and button can be a pain and we see a lot of different implementations of this, resulting in additional inconsistency across apps.

  • Making it easier for developers to show to the user that a user invoked action is running in the control they just clicked.
  • Creates better UX harmonization across applications if developers adopt the same pattern.

Scope

Capability Priority
Should inherit default button behavior Must
Should work with all default ButtonStyles (e.g. RevealButtonStyle or AccentButtonStyle Must
A property to indicate that the (e.g. IsLoading) Must
When the IsLoading property = true, the ProgressRing should be shown Must
When the IsLoading property = true, the button should be in the disabled state Must

Important Notes

XAML: <LoadingButton Content="Send message" IsLoading="True" />

Example visual from the Fluent UI toolkit:

Progressbutton

Great examply by @mdtauk of the update button in the Microsoft Store:

image

Open Questions

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:8
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

15reactions
mdtaukcommented, Apr 5, 2020

Could I also suggest that there be a transition between the Loading states of this button.

Loading Buttons Quick animated mockup.

Things I am thinking about:

  • Transitioning between the Pre-loading | Loading | Loaded states
  • Text Strings/Content for each of those three states
  • Handling button sizing so each string and the ProgressRing can fit
  • Possibly add a value property and a determinate state for the ProgressRing (when it is added to the control)
8reactions
mdtaukcommented, Apr 5, 2020

And can it please replace this button, so we have some consistency image

Read more comments on GitHub >

github_iconTop Results From Across the Web

LoadingButton API - Material UI
LoadingButton API. API reference docs for the React LoadingButton component. Learn about the props, CSS, and other APIs of this exported module.
Read more >
material-ui/packages/mui-lab/src/LoadingButton ...
MUI Core: Ready-to-use foundational React components, free forever. It includes Material UI, which implements Google's Material Design.
Read more >
How to Create Loading Spinner Button in ReactJS
The loading spinner button is simply a ReactJS component that lets you show an ongoing process. The event triggers when the user clicks...
Read more >
How do you changed the loading text color and ...
So I'm using this import LoadingButton from '@mui/lab/LoadingButton';. I want to have a different background colour and text colour than the ...
Read more >
Accessible loading button variant (#1044) · Issues
Proposal. Create a separate loading button variant that doesn't rely on the disabled button's CSS properties or semantics.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found