Migrate colors to NewTheme#26
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates UI color usage away from the legacy Theme.color palette and onto the generated NewTheme tokens (LocalTheme.current.primitive.colors), and removes the legacy Theme.color API from the design system.
Changes:
- Replaced
Theme.color.*usages across feature and design system UI withLocalTheme.current.primitive.colors.*. - Updated
Theme()to build a Material3ColorSchemefromNewThemetokens and removedTheme.color(and deleted the legacyColor.ktpalette). - Refactored multiple “type” enums/helpers (e.g., Snackbar/TextField/SearchText/Shimmer/Divider/Loading/Shadow) to resolve colors via composable token lookups.
Reviewed changes
Copilot reviewed 71 out of 71 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| feature/startup/src/main/java/com/mindera/alfie/feature/startup/StartUp.kt | Startup loading background now uses LocalTheme primitive colors. |
| feature/search/src/main/java/com/mindera/alfie/feature/search/SearchOverlay.kt | Migrates overlay icon/text colors to LocalTheme primitives. |
| feature/plp/src/main/java/com/mindera/alfie/feature/plp/ProductListScreen.kt | Updates PLP counter/layout toggle colors to LocalTheme primitives. |
| feature/plp/src/main/java/com/mindera/alfie/feature/plp/filter/RefineSheet.kt | Migrates refine sheet dividers/text/slider/textfield colors to primitives. |
| feature/pdp/src/main/java/com/mindera/alfie/feature/pdp/ProductDetailsUIFactory.kt | Removes Theme color dependency from PDP UI factory swatch fallback. |
| feature/pdp/src/main/java/com/mindera/alfie/feature/pdp/ProductDetailsScreen.kt | Migrates PDP error/name/section colors to primitives. |
| feature/pdp/src/main/java/com/mindera/alfie/feature/pdp/component/ProductDetailsSizeModalPicker.kt | Updates size modal picker colors to primitives. |
| feature/pdp/src/main/java/com/mindera/alfie/feature/pdp/component/ProductDetailsSize.kt | Updates size section colors/borders to primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/theme/Theme.kt | Builds Material3 ColorScheme from LocalTheme primitives; removes Theme.color. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/theme/color/Color.kt | Deletes legacy color palette implementation. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/topbar/TopBar.kt | Migrates top bar color definitions to primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/topbar/custom/LandingHeader.kt | Migrates landing header text colors to primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/tag/Tag.kt | Migrates tag background/divider/icon/text colors to primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/tab/TabPager.kt | Migrates tab row container/indicator/content colors to primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/switch/Switch.kt | Migrates switch track/border/thumb colors to primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/swatch/SwatchGroup.kt | Migrates swatch borders/disabled line colors to primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/state/StateMessage.kt | Migrates state message title/subtitle colors to primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/sortby/SortBySelector.kt | Migrates sort selector border/background to primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/snackbar/SnackbarType.kt | Refactors snackbar colors into composable colorSpec() using primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/snackbar/Snackbar.kt | Uses SnackbarType.colorSpec() for snackbar rendering colors. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/sizingbutton/SizingButtonGroup.kt | Migrates sizing button override colors to primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/shimmer/ShimmerModifier.kt | Resolves shimmer palette via composable token mapping. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/shimmer/ShimmerColors.kt | Refactors shimmer colors to composable resolvedColors() using primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/shimmer/ShimmerBrush.kt | Updates shimmer preview colors to primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/shadow/ShadowType.kt | Removes embedded shadow color from enum values. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/shadow/ShadowExt.kt | Resolves shadow color via LocalTheme in composable modifier extension. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/segmented/SegmentedControl.kt | Migrates segmented control background/indicator/content colors to primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/searchbar/SearchTextType.kt | Refactors search text colors into composable colorSpec() using primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/searchbar/SearchTextField.kt | Uses SearchTextType.colorSpec() to render search text field colors. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/searchbar/SearchBarWithCancel.kt | Migrates cancel button text color to primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/radio/LabeledRadioButton.kt | Migrates radio button colors to primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/productcarousel/ProductCarousel.kt | Migrates carousel action text color to primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/productcard/size/VerticalProductCard.kt | Migrates vertical product card label/text colors to primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/productcard/size/HorizontalProductCard.kt | Migrates horizontal product card text colors to primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/price/Price.kt | Migrates strike-through/sale price colors to semantic/neutral primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/overlay/OverlayLayout.kt | Refactors scrim default color to be resolved from primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/loading/LogoLoading.kt | Migrates logo loading label color to primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/loading/LoadingType.kt | Refactors loading dot colors into composable color() using primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/loading/Loading.kt | Uses composable LoadingType.color() for loading indicators/labels. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/input/TextFieldType.kt | Refactors text field colors into composable colorSpec() using primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/input/TextField.kt | Migrates text field internal colors/animations to primitives + type.colorSpec(). |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/indicator/SliderIndicator.kt | Migrates slider indicator colors (and previews) to primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/indicator/DotsIndicator.kt | Migrates dots indicator colors to primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/gallery/GalleryIndicator.kt | Migrates gallery indicator background/icon/text colors to primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/fullscreen/Fullscreen.kt | Migrates fullscreen close button colors to primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/divider/VerticalDivider.kt | Uses composable DividerType.color() in vertical divider wrapper. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/divider/HorizontalDivider.kt | Uses composable DividerType.color() in horizontal divider wrapper. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/divider/DividerType.kt | Refactors divider colors into composable color() using primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/chip/Chip.kt | Migrates chip text/border/colors to primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/checkbox/LabeledCheckbox.kt | Migrates checkbox fill/border/icon colors to primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/bottomcard/BottomCard.kt | Migrates bottom card background to primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/bottombar/BottomBar.kt | Migrates bottom bar surface/content/indicator colors to primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/badge/IconBadge.kt | Migrates badge colors/borders to semantic/neutral primitives. |
| designsystem/src/main/java/com/mindera/alfie/designsystem/component/accordion/Accordion.kt | Migrates accordion header/content colors (and preview) to primitives. |
| debug/operational/src/main/java/com/mindera/alfie/debug/operational/view/screen/DebugScreenOp.kt | Migrates debug header background to primitives. |
| debug/operational/src/main/java/com/mindera/alfie/debug/operational/view/catalog/screen/SpacingScreen.kt | Migrates spacing visualizer background to semantic success primitive. |
| debug/operational/src/main/java/com/mindera/alfie/debug/operational/view/catalog/screen/SliderIndicatorScreen.kt | Migrates debug slider indicator border color to primitives. |
| debug/operational/src/main/java/com/mindera/alfie/debug/operational/view/catalog/screen/ShapeScreen.kt | Migrates debug shapes screen colors to primitives. |
| debug/operational/src/main/java/com/mindera/alfie/debug/operational/view/catalog/screen/SegmentedControlScreen.kt | Migrates segmented control demo colors to primitives. |
| debug/operational/src/main/java/com/mindera/alfie/debug/operational/view/catalog/screen/SearchPullDownScreen.kt | Migrates demo screen container/card colors to primitives. |
| debug/operational/src/main/java/com/mindera/alfie/debug/operational/view/catalog/screen/ScrollableTabScreen.kt | Migrates tab demo pager background to primitives. |
| debug/operational/src/main/java/com/mindera/alfie/debug/operational/view/catalog/screen/MotionScreen.kt | Migrates motion demo input/container/circle colors to primitives. |
| debug/operational/src/main/java/com/mindera/alfie/debug/operational/view/catalog/screen/LoadingScreen.kt | Migrates loading demo box/border colors to primitives. |
| debug/operational/src/main/java/com/mindera/alfie/debug/operational/view/catalog/screen/FixedTabScreen.kt | Migrates fixed tab demo pager background to primitives. |
| debug/operational/src/main/java/com/mindera/alfie/debug/operational/view/catalog/screen/ElevationShadowingScreen.kt | Migrates elevation shadowing demo card colors to primitives. |
| debug/operational/src/main/java/com/mindera/alfie/debug/operational/view/catalog/screen/DividerScreen.kt | Migrates divider demo backgrounds to primitives. |
| debug/operational/src/main/java/com/mindera/alfie/debug/operational/view/catalog/screen/ColorScreen.kt | Updates color catalog to use primitives and trims removed legacy palettes. |
| debug/operational/src/main/java/com/mindera/alfie/debug/operational/view/catalog/screen/AccordionScreen.kt | Migrates accordion demo text colors to primitives. |
| debug/operational/src/main/java/com/mindera/alfie/debug/operational/view/catalog/CatalogScreen.kt | Migrates debug catalog list item text colors to primitives. |
| debug/operational/src/main/java/com/mindera/alfie/debug/operational/view/analytics/AnalyticsLogScreen.kt | Migrates analytics log dropdown/event text colors to primitives. |
| app/src/main/java/com/mindera/alfie/MainActivity.kt | Migrates system UI bar colors to primitives. |
amccall-mindera
left a comment
There was a problem hiding this comment.
Approving the color migration to NewTheme. Audited the mapping across all 71 files: the neutral and green/red ramps migrate consistently and hex-faithfully (worst case ~1 lightness step), with two sensible collapses (mono600+mono700→neutrals600, mono050+mono100→neutrals100). Theme() now derives the Material color scheme from the tokens (remembered on colors), which also tidies the earlier surface/background concern. The LabeledRadioButton Copilot flag is a non-issue at head (neutrals0 vs neutrals100 are distinct). Only smell is the blue→success/neutral remap in a couple of debug/operational demo screens (no product UI) — left as-is per your call.
Migrate all legacy usage of
Themeto new generated colors inNewTheme.Remove existing
Theme.color.