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

[AuButton] deprecate the default loading message #497

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

Windvis
Copy link
Contributor

@Windvis Windvis commented Jul 11, 2024

The default loading message is a footgun. Many projects forget to properly set this which means the default is used, even though it's not a good fit for the context. This is only made worse by the fact that the AuButton component didn't visually display the loading message originally, so a lot of older code doesn't set this message explicitly.

By requiring an explicit loading message this should no longer be an issue.

Migration guide

Simply add a @loadingMessage argument if you are using the @loading argument on a <AuButton> component. To get the exact same result as the current behavior you can use the following code:

- <AuButton @loading={{true}}>Some action</AuButton>
+ <AuButton @loading={{true}} @loadingMessage="Aan het laden">Some action</AuButton>

There are few places where the default loading message makes sense in buttons though, so we recommend evaluating all places where the loading state of the button is used and using a good loading message for the context it is used in.

Closes #495

@Windvis Windvis added the enhancement Used when the PR adds a new feature or enhancement. label Jul 29, 2024
@Windvis Windvis marked this pull request as draft July 30, 2024 11:50
@Windvis Windvis force-pushed the deprecate/button-loading-message branch from 87a3da3 to 4e4be68 Compare July 31, 2024 13:16
@Windvis Windvis marked this pull request as ready for review July 31, 2024 13:16
@Windvis Windvis force-pushed the deprecate/button-loading-message branch from 4e4be68 to 3bf9281 Compare July 31, 2024 13:16
The default loading message is a footgun. Many projects forget to properly set this which means the default is used, even though it's not a good fit for the context.

By requiring an explicit loading message this should no longer be an issue.
@Windvis Windvis force-pushed the deprecate/button-loading-message branch from 3bf9281 to 9250793 Compare July 31, 2024 13:34
@Windvis Windvis merged commit 1f0b8b3 into master Jul 31, 2024
8 checks passed
@Windvis Windvis deleted the deprecate/button-loading-message branch July 31, 2024 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Used when the PR adds a new feature or enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecate the default loading message in the AuButton component
1 participant