Skip to content

Conversation

@phoneuooyd
Copy link
Owner

This pull request introduces several improvements and refactorings across the codebase, focusing on database configuration, UI/UX enhancements, localization, and code quality standards. The most significant changes include improvements to the Entity Framework Core setup for better cross-platform support, new navigation and back button logic in the main shell, stricter design and code guidelines, and the addition of a new value converter for UI binding.

Database configuration and migration improvements:

  • Refactored AppDbContext to support both dependency injection and design-time tooling, with platform-specific database paths and a fallback constructor. Improved model configuration, including cascade delete for PlannedMeal and ShoppingListItem, and added enum conversion and default value for Plan.Type. [1] [2] [3] [4] [5]
  • Limited the DesignTimeDbContextFactory to desktop development environments to prevent issues with Android and release builds.
  • Removed the obsolete auto-generated EF Core migration designer file.

UI/UX and navigation enhancements:

  • Changed the PlannerTab in AppShell.xaml to use PlannerListsPage instead of PlannerPage.
  • Added a custom back button handler in AppShell.xaml.cs to show a localized exit confirmation dialog when on the Home tab, and to always navigate back to Home from other locations. Integrated the localization service for dialog strings. [1] [2]

Localization and design guidelines:

  • Updated design and coding guidelines in AGENTS.md to require the use of .resx resource files for translations, always use ThemeService for theme options, and added new rules emphasizing code quality, Clean Architecture, and SOLID principles. [1] [2]
  • Updated the documentation version and last updated date.

Performance and data handling:

  • Updated UI guidelines to recommend batch loading for large data sets instead of pull-to-refresh.

New components and utilities:

  • Added ItemTypeIsRecipeConverter, a value converter for distinguishing between recipe and other item types in UI bindings.

Introduces a refresh function to the FolderAwarePickerPopup, allowing it to reload recipes and folders from services. Also ensures local data is refreshed after the popup closes to maintain synchronization.
Introduced Primary, Secondary, and Tertiary button styles in Styles.xaml for consistent button appearance and state management. Updated AddRecipePage, IngredientFormPage, and PlannerPage to use the new Secondary button style for action buttons. Removed unused gesture recognizer from UniversalListItemComponent.xaml.
-
-
Corrected and improved translations for 'Piece' and its abbreviations in German, Spanish, French, Korean, and default resource files. This ensures more accurate and culturally appropriate unit representations across supported languages.
Replaces custom tab layouts in AddRecipePage.xaml and IngredientFormPage.xaml with a new reusable TabComponent for consistent tabbed navigation. Adds TabComponent.xaml.cs implementing dynamic tab headers and content switching, improving maintainability and UI consistency across pages.
Implemented event handlers for culture changes in AddRecipePage and IngredientFormPage to refresh SimplePicker controls' display text when the app's culture changes. Added a RefreshDisplayText method to SimplePicker and utility methods to traverse the visual tree and update all relevant pickers. This ensures unit labels are updated to reflect the current language/culture.
Updated button styling to use style classes instead of direct color assignments for consistency across popups and pages. Added protection against multiple label additions in CRUDComponentPopup and improved state management for add/edit actions. Removed internal UnitToStringConverter from SimplePicker to allow parent pages to provide localized converters, and updated IngredientFormPage to use a localized unit converter for better language support. Also added a view reset after successful shopping list save in PlannerViewModel.
Adds EnumDisplayExtensions for localized enum display names using DisplayAttribute and resource files. Updates SimplePicker and SimpleListPopup to use these extensions and respond to localization changes via new PickerRefreshRequested event in LocalizationService. Enhances picker display logic to honor current UI culture and improves robustness of localization updates.
got rid of a bad label in the form
Added entries for Gouda cheese, Edam cheese, chicken breast ham, arugula, corn salad, iceberg lettuce, romaine lettuce, and butter lettuce to ingredients.json with nutritional information and translations.
-
-
Introduces multi-ingredient filtering support across recipe-related views and popups. Updates RecipeViewModel, FolderAwarePickerPopup, RecipesPage, and FilterSortPopup to allow users to filter recipes by selected ingredient names in addition to labels and sorting. UI elements and state management for ingredient selection and search are included.
Updated ingredient filtering in FolderAwarePickerPopup and RecipesPage to fetch ingredients from the database via IIngredientService instead of aggregating from recipes. Enhanced FilterSortPopup UI with a two-column grid for labels, a header with a close button, and adjusted scroll areas for better usability.
Adjusted popup width and height constraints for CRUDComponentPopup, FilterSortPopup, and FolderAwarePickerPopup to improve usability and consistency. Added guards in FilterSortPopup and RecipesPage to prevent multiple popups from being opened rapidly. Refactored popup content layouts for better scroll behavior and user experience.
Introduced new resource files and strongly-typed resource classes for CRUDComponentPopup and FilterSortPopup in multiple languages. Extended DataArchivizationPageResources with additional keys and translations to support improved archive management UI and error handling.
Introduces computed DisplayCalories, DisplayProtein, DisplayFat, and DisplayCarbs properties in Ingredient, updating them when relevant fields change. The AddRecipe page now shows nutritional values for the specified quantity and unit, and defaults new ingredients to 100g for immediate feedback. Also localizes the data export button text in SettingsPage and all supported languages.
Replaced English strings with Korean translations in Home, Ingredients, Planner, Recipes, Shopping List, and Tab Bar resource files to provide localized UI for Korean users.
Introduces a UnitWeight property to the Ingredient model, updates database schema and seed data to support it, and adjusts nutritional calculations to account for unit weight, especially for ingredients measured by piece. Also updates AddRecipeViewModel to handle UnitWeight and improves debug logging in seed data loading.
Implemented a localized exit confirmation dialog when the back button is pressed on the HomeTab, using new resource strings for multiple languages. The back button logic was moved from PlannerPage to AppShell for centralized handling.
Introduces an IsEditing property in the ShoppingListDetailViewModel and updates the ShoppingListDetailPage to track when an Entry is being edited. Item state is now saved only after editing is completed, preventing premature saves and improving user experience.
Introduces a 'showApplyButton' parameter to FilterSortPopup, allowing the apply button to be hidden when desired. Updates IngredientsPage and RecipesPage to use this option, and ensures results are returned automatically when the popup closes if the apply button is hidden.
Changed Android build configuration to use AAPT2 and APK format. Updated 'ingredients.json' with new items, modified coconut entry, removed duplicate pita bread, and added various new ingredients with nutritional information.
Introduced a new button at the top of the Data section in SettingsPage to allow users to update or load the ingredients database from ingredients.json. Added the OnUpdateIngredientsClicked handler to confirm the action, perform the update using DI and AppDbContext, and provide user feedback on success or failure.
Introduces a UnitWeight field for ingredients, allowing users to specify the weight of a single piece when the unit is 'Piece'. Updates the ingredient form view model and UI to support this field, including validation and conditional visibility. Adds a method to SeedData to import only missing ingredients from ingredients.json, and updates the settings page to use this method and provide clearer user feedback.
Added Xylitol and Erythritol to ingredients.json with nutritional data. Improved DataArchivizationPage export process by running ZIP and file copy operations on background threads to avoid UI blocking, ensured alerts are shown on the UI thread, and made button texts more robust against null or empty values.
Expanded the sprouts section in ingredients.json with specific types and updated nutritional values. Improved unit selection in IngredientFormViewModel by using a concrete list for picker binding and preventing redundant property updates. Adjusted SettingsPage.xaml to unify button background color styling and apply the MigrationButtonStyle to the data export button.
Replaced nested CollectionViews with BindableLayouts in ShoppingListDetailPage.xaml to prevent scroll conflicts and improve UI performance. Introduced IngredientGroup helper in ViewModels and updated ShoppingListDetailViewModel to support grouped UI rendering. Updated AGENTS.md with new design and code quality guidelines.
Set ItemSizingStrategy to MeasureAllItems in CollectionView to allow items with wrapped titles to grow vertically. Updated code-behind to keep ItemTemplate and ItemsSource in sync at runtime and trigger re-measurement when these properties change, ensuring correct dynamic height behavior.
Dodano zawijanie tekstu, poprawiono wielkość elementów
Set the default planned meals period to 'Today' and dynamically adjust the planned meals panel height based on the selected period. Updated HomePage styles for better readability, reduced font sizes, and improved empty state messaging for planned meals.
Removed maxheight constraint from the How to do text field
Added support for adding new ingredients directly from ingredient selection popups (SearchablePickerPopup and SimpleListPopup) when used in AddRecipe context. Implemented global events and cache invalidation to ensure all relevant view models and pages (AddRecipeViewModel, IngredientsViewModel, IngredientsPage) reflect changes immediately after ingredient add/update/delete. Improved UI thread safety and responsiveness for ingredient list updates, and exposed direct refresh APIs for IngredientsPage. This enhances the user experience by allowing seamless ingredient management without leaving the recipe creation flow.
Subscribe IngredientsViewModel and IngredientsPage to AppEvents.IngredientSaved and AppEvents.IngredientsChangedAsync to ensure the ingredient list is refreshed when changes occur elsewhere in the app. Added HardReloadAsync to force cache invalidation and reload from the database, and updated relevant methods to use it for more reliable data updates.
Introduces manual ordering for folders via a new Order property and migration, with FolderService and RecipeViewModel updated to support drag-and-drop reordering among siblings. Ingredient model and AddRecipePage now support drag-and-drop reordering of ingredients, including UI insert indicators. ShoppingListDetailViewModel and UniversalListItemComponent gain similar reordering logic and drop zones for consistent UX. SeedData ensures existing folders are initialized with sequential Order values.
Introduces a PlanType enum and adds a Type property to the Plan model to distinguish between planners and shopping lists. Updates database schema and migrations to support the new column. Refactors ArchiveViewModel, PlannerViewModel, ShoppingListViewModel, and related views to handle planners and shopping lists separately, including new PlannerListsViewModel and PlannerListsPage. Adds localization resources for the new planner lists page and updates dependency injection and navigation. See MIGRATION_PLAN_TYPE.md for migration and usage details.
Introduced StartListening and StopListening methods in ShoppingListViewModel to subscribe and unsubscribe from global plan change events. Updated ShoppingListPage to call these methods on appearing and disappearing, ensuring the shopping list stays updated and preventing event handler leaks.
Dodano nowe okienko dialogowe
NAdpisz /scal
ale:
-nadal nie dziala poprawne czyszczenie po zapisie
-pokazuje sie tylko jeden plan
Refactored AppDbContext to support both runtime and design-time configuration, including platform-specific database paths. Restricted DesignTimeDbContextFactory to desktop development environments. Removed obsolete and intermediate EF Core migration files, consolidating schema history.
Dodać tylko zapamiętywanie ilosc posilkow/dzien
Działa jak należy - prawie
-
-
teraz fajnie sie zapisuja
@phoneuooyd phoneuooyd merged commit ee8185c into main Nov 12, 2025
1 check failed
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.

1 participant