AnalogIO / coffeecard_app

Cross-platform coffee card app for Cafe Analog
https://www.cafeanalog.dk/app
MIT License
6 stars 1 forks source link

refactor(ui): add RoundedButton.bright constructor #553

Closed fremartini closed 10 months ago

fremartini commented 10 months ago

This PR reduces code duplication by creating a new constructor to the RoundedButton class, making it usable as a replacement for the following buttons:

  1. the "Resend verification email" button
  2. the button in SplashErrorPage

Beforehand, these two buttons used tedious boilerplate by invoking the Material ElevatedButton; a thing the RoundedButton was supposed to eliminate.

Additionally, files affected this change have been simplified.

closes #508


Co-authored-by: Omid Marfavi 21163286+marfavi@users.noreply.github.com

ghost commented 10 months ago
👇 Click on the image for a new way to code review #### [![Review these changes using an interactive CodeSee Map](https://s3.us-east-2.amazonaws.com/maps.codesee.io/images/github/AnalogIO/coffeecard_app/553/b14ba8d0/408ef92ddc66202e6208174cc4d69e70c246f226.svg)](https://app.codesee.io/r/reviews?pr=553&src=https%3A%2F%2Fgithub.com%2FAnalogIO%2Fcoffeecard_app) #### Legend CodeSee Map legend
codecov[bot] commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

:exclamation: No coverage uploaded for pull request base (main@5278155). Click here to learn what that means.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #553 +/- ## ======================================= Coverage ? 72.74% ======================================= Files ? 134 Lines ? 1596 Branches ? 0 ======================================= Hits ? 1161 Misses ? 435 Partials ? 0 ``` | [Flag](https://app.codecov.io/gh/AnalogIO/coffeecard_app/pull/553/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AnalogIO) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/AnalogIO/coffeecard_app/pull/553/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AnalogIO) | `72.74% <0.00%> (?)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AnalogIO#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

marfavi commented 10 months ago

Check out #555 which would merge into this branch