ALFMOB-269: Refactor Badge component to use design tokens#93
Open
khoinguyen-mindera wants to merge 4 commits into
Open
ALFMOB-269: Refactor Badge component to use design tokens#93khoinguyen-mindera wants to merge 4 commits into
khoinguyen-mindera wants to merge 4 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors badge styling in SharedUI to source colors and sizing from the generated design-token system (Theme + Primitives), keeping the public modifier APIs unchanged and aiming for no visual differences.
Changes:
- Updates
BadgeViewModifierto useTheme.*semantic colors andPrimitives.Spacing.*sizing tokens. - Updates
BadgeTabViewModifierbadge color/text attributes to useTheme.*semantic colors. - Removes an unused sizing constant and adds inline documentation for remaining literals.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Alfie/AlfieKit/Sources/SharedUI/Components/Indicators/BadgeViewModifier.swift | Migrates badge view colors and sizing from raw primitives/literals to Theme + spacing tokens. |
| Alfie/AlfieKit/Sources/SharedUI/Components/Indicators/BadgeTabViewModifier.swift | Migrates UITabBarItem badge appearance colors to Theme semantic tokens. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket
ALFMOB-269
Summary
BadgeViewModifierandBadgeTabViewModifierstyling from the generated design-token system.Primitives.Colours.*to the semanticTheme.*layer (surfaceBackgroundDestructive/contentContentInvertedPrimary/surfaceBackgroundPrimary), matching the ALFMOB-271 ThemedButton precedent.Primitives.Spacing.*tokens (badge height 16, text padding 4, indicator 12);borderLineWidth/capsuleOffsetXFactorstay literal (no token equivalent, documented inline).badgePaddingconstant.Screenshot