Skip to content

feat(app): add global text size setting and meal plan calendar export #5

Open
rjmlaird wants to merge 8 commits into
oliexdev:mainfrom
rjmlaird:main
Open

feat(app): add global text size setting and meal plan calendar export #5
rjmlaird wants to merge 8 commits into
oliexdev:mainfrom
rjmlaird:main

Conversation

@rjmlaird

Copy link
Copy Markdown

Summary

This PR adds a global text size preference for the app and a weekly meal plan export to calendar. It also wires the new settings into app startup, updates the theme to respect the selected scale, and adds the Android file-sharing plumbing needed for .ics export.

What changed

Text size

  • Added a new TextScale setting stored locally in DataStore.
  • Exposed the setting through SettingsRepository, ThemeViewModel, and SettingsViewModel.
  • Updated OpenCookTheme to apply the chosen text scale on top of the system font scale.
  • Added a new settings row and dialog so users can choose Normal, Large, or Extra large text.
  • Added localized strings and unit tests for text-scale parsing and behavior.

Meal plan export

  • Added .ics export support for the visible weekly meal plan.
  • Created IcsExport to generate RFC 5545 calendar output with one all-day event per planned day.
  • Added IcsShare plus a FileProvider so the export can be shared safely through Android.
  • Added a calendar export action to the meal plan screen.
  • Added localized strings and unit tests for export formatting, escaping, and UID stability.

Notes

  • The text size setting is device-local and not synced.
  • The calendar export is a one-shot file export, not a live subscription feed.

Testing

  • Verified TextScale persistence and fallback behavior with unit tests.
  • Verified .ics generation with tests for empty weeks, date ranges, escaping, and CRLF line endings.
  • Manually checked that the settings screen exposes the new text size option and that meal plan export triggers a share intent.

Files touched

  • MainActivity.kt
  • SettingsRepository.kt
  • ThemeViewModel.kt
  • SettingsViewModel.kt
  • SettingsScreen.kt
  • Theme.kt
  • MealPlanScreen.kt
  • IcsExport.kt
  • IcsShare.kt
  • AndroidManifest.xml
  • file_paths.xml
  • strings.xml
  • strings-de.xml
  • TextScaleTest.kt
  • IcsExportTest.kt

This was referenced Jul 20, 2026
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