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

Overhaul of SBBCheckbox #258

Merged
merged 15 commits into from
Jan 11, 2025
Merged

Overhaul of SBBCheckbox #258

merged 15 commits into from
Jan 11, 2025

Conversation

smallTrogdor
Copy link
Contributor

@smallTrogdor smallTrogdor commented Jan 8, 2025

Maybe this got a little bit bigger than expected 👀

This PR aligns the SBBCheckbox and SBBCheckboxListItem to the design guidelines again, with backward compatibility (users might experience little layout changes).

closes #215

What this PR adds:

  • The SBBCheckbox is painted using a CustomPainter in a check animated fashion as a person would draw it on a piece of paper - it uses the ToggleableStateMixin and the buildToggeable for the logic.
  • The colors of the SBBCheckbox and the SBBCheckboxListItem are aligned to the design specs (including actually respecting some of the colors previously not used (disabled colors)).
  • The boxed variant of the SBBCheckboxListItem is added.
  • The trailingIcon including the button is changed a little bit (see documentation - users might experience this as a small breaking change).
  • The loading variant of the SBBCheckboxListItem is added via a isLoading parameter - this displays an animated BottomLoadingIndicator sweeping through the tile
  • The documentation of the SBBCheckbox and the SBBCheckboxListItem has been revised and completed
  • The semantics have been actually implemented (semanticsLabel on SBBCheckbox), merged with all the semantics of the SBBCheckboxListTile
  • The checkbox page in the example app has been fully updated to show all the variants.

The layout of the SBBCheckbox has been corrected.

This is the design spec:

Screenshot 2024-12-22 at 16 00 46

This was the old implementation with two stacked rounded rectangles:

Screenshot 2024-12-22 at 16 01 24

The new loading indicator:

Screen.Recording.2025-01-08.at.09.23.28.mov

@smallTrogdor smallTrogdor marked this pull request as ready for review January 8, 2025 09:20
@smallTrogdor smallTrogdor requested a review from a team as a code owner January 8, 2025 09:20
Copy link
Collaborator

@VanHoangTran VanHoangTran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great stuff

@smallTrogdor smallTrogdor merged commit 15c8cbd into main Jan 11, 2025
8 checks passed
@smallTrogdor smallTrogdor deleted the feature/checkbox-overhaul branch January 11, 2025 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Review]: Checkbox review
2 participants