Skip to content

New themes #2239

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

Merged
merged 47 commits into from
May 25, 2025
Merged

New themes #2239

merged 47 commits into from
May 25, 2025

Conversation

tuxpizza
Copy link
Collaborator

@tuxpizza tuxpizza commented Apr 30, 2025

Issue Number (if Applicable): Fixes #

Description

This PR revamps Cake Wallet’s theming system by migrating from a custom theme extension based approach to a fully Material 3 (M3) compliant theming system. The goal is to simplify maintenance, improve consistency, and leverage Flutter’s built‑in Material 3 color tokens and patterns.

Please include a summary of the changes and which issue is fixed / feature is added.

Pull Request - Checklist

  • Initial Manual Tests Passed
  • Double check modified code and verify it with the feature/task requirements
  • Format code
  • Look for code duplication
  • Clear naming for variables and methods
  • Manual tests in accessibility mode (TalkBack on Android) passed

OmarHatem28 and others added 11 commits April 1, 2025 03:41
Foundation, Theme Data Refactor, and First Extension Cleanup Batch.

This commit completes the first major phase of migrating to Material 3 theming by setting up the foundations for material 3 integration and begins the initial migration, removing custom theme extensions, updating theme data, and refactoring all relevant widget and page theming to use Material 3’s built-in color and typography tokens.

These changes:
- Lays the groundwork for Material 3 theming by restructuring the app’s theme configuration to use Material 3’s ColorScheme and TextTheme as the primary sources of color and typography throughout the app.
- Refactors the core theme config files by removing legacy custom color roles ensuring all color definitions now map directly to Material 3’s role.
- Begins the first batch migration of custom theme extensions (InfoTheme, PlaceholderTheme, KeyboardTheme, PinCodeTheme) and updates all affected widgets and pages to use Material 3 color and typography tokens instead of the custom properties.
- Cleans up the codebase by deleting the files of the initial set of migrated extensions and eliminating all related imports and usages.
This change:
- Updates the themes README.md file to reflect the current structure and give more information based on the first major phase that was completed.
@Blazebrain Blazebrain marked this pull request as draft May 16, 2025 15:32
@Blazebrain Blazebrain self-assigned this May 16, 2025
Blazebrain and others added 16 commits May 18, 2025 11:26
Deleting previous theme extensions
Another batch of migrations from existing extensions
Third Migration batch for theme extensions
Final Migration batch for previous theme extensions
This change:
- Adds new set of hero images
- Modifies the core structure for the themes
- Add missing color tokens to the theme classes
- Adds a CustomThemeColor class for custom color tokens
- Modifies the themelist to have a fall back for previous theme implementation
- Adds localization for some texts
- Modifies the flow for loading the theme on app start
- Add a WidgetsBindingObserver that listens for changes in the device theme and updates the app theme when there is a change
- Registers the themeStore as a Singleton for codebase wide use
This change:
- Migrates UI flows across the app to the new themes
- Confirms styling and typography of components across the app uses the new themes
- Remove instances of Palette use
- Switch TextStyles across the app to use theme text styles
This change:
- Syncs and fixes conflicts
- Cleans up duplicate text and localizations
This change:
- Adjusts bottomsheets styling and removes duplicate close button
- Removes more themedata extensions from the previous implementation
- Update menu colors
- Update padding/divider size for cards
- Fix navigation dock shadow
- Update wallet screen colors
Blazebrain and others added 5 commits May 23, 2025 17:34
This change:
- Adds gradient backgrounds to the dashbaord and balance cards.
- Migrates the input fields across the app to BaseTextFormFields.
- Removes dependence of input fields on individual styling, focusing instead on using theme defined InputDecoration styling with adjustments on individual components where needed.
- Applies new theme styling to BaseTextFormField, AddressTextField and CurrencyAmountTextField.
- Fix nagivation_dock shadow
- Minor fixes
This change:
- Adds a fallback to CurrencyAmountTextField, AddressTextField, and BaseTextFormField, allowing them use the previous theme styling.
- Adds localization for new texts
Comment on lines 67 to 68
// TODO: remove this once the theme is tested
await store.themeStore.setTheme(store.themeStore.currentTheme);
Copy link
Contributor

Choose a reason for hiding this comment

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

is this TODO still valid?

Blazebrain and others added 15 commits May 24, 2025 02:28
This change:
- Refactors theme loading logic to handle backup restore edgecase
- Refreshes the theme based on the user saved preference during restore from backup flow
Test new icons for navigation_dock.dart
Fix swap icon clipping
Fix some text colors
Add more hero images
Fix info box CTA colors
Fix sync indicator colors
Update dark theme colors (minor)
Update crypto_balance_widget.dart icon
This change:
- Fixes issue with themeMode resetting to system mode when app is restarted causing a UI glitch
- Updates theme checks from `currentTheme.type == ThemeType.dark` to `currentTheme.isDark` for consistency
- Adjusts UI components to use the theme directly from the themeStore
Copy link
Contributor

Choose a reason for hiding this comment

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

can be updated later to just make a helper function that decide which pageRoute to use and just call this function with the page as the parameter

Copy link
Contributor

@OmarHatem28 OmarHatem28 left a comment

Choose a reason for hiding this comment

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

just the comment left above, @Blazebrain please handle it in a separate branch

@OmarHatem28 OmarHatem28 marked this pull request as ready for review May 25, 2025 20:11
@OmarHatem28 OmarHatem28 merged commit df88914 into main May 25, 2025
4 checks passed
@OmarHatem28 OmarHatem28 deleted the new-themes branch May 25, 2025 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants