-
Notifications
You must be signed in to change notification settings - Fork 128
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
feat(components): migrate LoadingButton to TypeScript #584
Conversation
Codecov Report
@@ Coverage Diff @@
## feature/button-enums #584 +/- ##
=======================================================
Coverage ? 93.38%
=======================================================
Files ? 145
Lines ? 2343
Branches ? 657
=======================================================
Hits ? 2188
Misses ? 128
Partials ? 27 |
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/sumup-oss/circuit-ui/fna3syt5d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typescript components are coming to life 👏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌
4504974
to
38e6feb
Compare
feature/button-enums HEAD
BREAKING CHANGE: The LoadingButton's exit animations have been removed. An action's success or error result should be communicated outside the button.
feature/typescript-loading-button
8fa477b
to
b2e9d19
Compare
🎉 This PR is included in version 2.0.0-alpha.15 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@connor-baer I'm seeing this now on #600. What do we plan to provide as a fallback for the transitions? Considering consumers will have to do it. Is this planned in the Design System? (Feedbacks in general). The dashboard already has a "toast" system. But that wouldn't work for some contexts such as Modals (considering the backdrop styles) I know we compose feedback with some components available, my question is more on the design system side and not component library |
@fernandofleury As I wrote in the PR description:
How the action result is displayed depends on the context, for example, it could be a message next to the button, a tooltip, or a toast message. It should be visible for at least 3 (5?) seconds and should not block the button from being blocked again (that's why displaying the result inside the button is a bad idea). |
🎉 This PR is included in version 2.0.0-beta.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Relates to #582.
Purpose
The LoadingButton had some complicated state logic to enable the small exit animations. A quick search revealed that these animations are only used once in the SumUp dashboard and partner portal. I decided that it's too much code for little benefit, plus an action's success or error result should be communicated outside the button.
Approach and changes
👀 Live preview
dark
andactive
props have been removed. The spinner uses thecurrentColor
CSS value for its color, so it adapts automatically. This brings it in line with @sumup/icons.Definition of done