-
Notifications
You must be signed in to change notification settings - Fork 0
UI goes on #79
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
UI goes on #79
Conversation
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
Introduced UnitToLocalizedStringConverter and resource files for unit localization in both English and Polish. Updated HomeViewModel to use localized unit abbreviations and improved the recipe details dialog to include both ingredients and preparation steps. Modified ShoppingListDetailPage to display localized unit names in pickers and labels. Added a new menu_book.png image resource.
Introduced theme selection support with AppTheme enum, ThemeService, and related interfaces. Updated SettingsViewModel and SettingsPage to allow users to choose between system, light, and dark themes, persisting the preference. Added converters for theme and culture localization, expanded resource files with localized theme and language names, and improved SettingsPage layout and localization for database operations.
Introduces user-selectable font family and font size options throughout the application. Adds FontService and related models, updates PreferencesService for font persistence, and extends SettingsViewModel and SettingsPage to allow users to change font settings. Updates styles and localization resources to support dynamic font changes.
Introduces support for multiple color themes, including new models (AppColorTheme, ThemeColors), converters, and service methods for theme management. Updates settings UI to allow users to select a color theme, persists the preference, and dynamically applies the selected palette throughout the app. Localization resources and styles are updated to support the new feature.
Replaced static and AppThemeBinding color references with DynamicResource bindings for primary and secondary theme colors across XAML views and styles. Updated BoolToColorConverter to support dynamic theme color resolution and added new segment button color logic. Adjusted Android color resources to neutral defaults for runtime theming. This enables runtime theme changes and improves consistency across light and dark modes.
Refactored ThemeService to use dynamic resources for button and tab bar colors, ensuring better contrast and accessibility. Updated styles and XAML pages to use theme-aware background colors. Simplified ThemeService API and improved color contrast logic for buttons and tab bars. Fixed RecipesPage to avoid continuous pull-to-refresh state.
Introduces a range of new custom font families and weights to the app, updating the AppFontFamily enum, MauiProgram font registrations, and FontSettings mappings accordingly. Converters and styles are updated to use dynamic resources for font family and size, enabling user customization and consistent font usage across controls.
Introduces an IEventBus service for decoupled ViewModel communication, enabling ViewModels to publish and react to data change events (e.g., recipe or plan updates). Updates constructors and logic in AddRecipeViewModel, HomeViewModel, PlannerViewModel, RecipeViewModel, and ShoppingListViewModel to use the event bus. Adds cleanup logic to HomeViewModel and HomePage to prevent memory leaks. Also adds and configures Android theme and color resources for Material Design 3, including light and dark themes, and updates the AndroidManifest to use the new theme.
Replaces IEventBus-based ViewModel communication with a static AppEvents class for plan change notifications. Refactors ViewModels to remove IEventBus dependencies and update event handling accordingly. Improves ThemeService with enhanced color contrast logic for better accessibility, especially for TabBar and button text. Updates color resources and AppShell to use new dynamic TabBar color keys.
Refactored theme color logic to use dynamic resources for Shell background and title colors. Enhanced ThemeService to ensure better contrast and readability for TabBar and Shell title colors, especially in light and monochrome themes. Updated Colors.xaml to define new Shell color resources.
Introduces UpdateSystemBars to IThemeService and implements platform-specific system bar (status/navigation) color updates in ThemeService for Android. AppShell now calls this method on startup and when appearing to ensure system bars reflect the current theme. Minor code cleanups and comments were also added.
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.
This pull request introduces significant improvements to theming, localization, and font customization in the Foodbook app. The changes add dynamic theme and font resource support, enhance localization for theme and language selection, and refactor several converters to use dynamic resources, improving maintainability and user experience.
Theming and Font Customization Enhancements:
AppFontFamily,AppFontSize, etc.) toApp.xamlfor runtime font customization, and ensured these are set by a newFontService.App.xaml.csto initialize and apply saved theme, color theme, and font settings at startup usingIThemeServiceandIFontService. Added robust error handling for initialization.App.xaml.csto load saved theme, color theme, and font settings from preferences with fallbacks and debug logging.AppShell.xamlto use dynamic theme resources for background and text colors, improving visual consistency across themes.AppShell.xaml.cs, added logic to update system bars (status/navigation bar colors) on startup and when the shell appears, ensuring UI matches the selected theme.Localization Improvements:
AppThemeToLocalizedStringConverter,AppColorThemeToLocalizedStringConverter, andCultureCodeToLocalizedNameConverterto provide localized display names for theme, color theme, and language selections in the UI. [1] [2] [3]Refactoring and Converter Improvements:
BoolToColorConverterand related converters to use dynamic color resources from the application’s resource dictionary, supporting theming and improving code maintainability. Simplified and modernized converter logic for better readability and consistency.