Skip to content

Global text-size setting and a weekly meal-plan calendar export#4

Closed
rjmlaird wants to merge 6 commits into
oliexdev:mainfrom
rjmlaird:main
Closed

Global text-size setting and a weekly meal-plan calendar export#4
rjmlaird wants to merge 6 commits into
oliexdev:mainfrom
rjmlaird:main

Conversation

@rjmlaird

Copy link
Copy Markdown

What changed
This patch adds two user-facing features: a global text-size setting and a weekly meal-plan calendar export. It also wires the app startup, theme, settings UI, and Android file-sharing pieces together so both features work end to end.

Why
The text-size setting makes recipe steps easier to read while cooking, and it scales text across the whole app without changing layout spacing. The calendar export gives users a simple way to turn a planned week into an  .ics  file they can share with a calendar app.

How it works
Text size is stored locally in DataStore as a device-only preference, exposed through the settings view models, and applied in  OpenCookTheme  by multiplying the ambient font scale. The meal-plan export builds an RFC 5545  .ics  file for the visible week, writes it to cache, and shares it through a  FileProvider -backed  ACTION_SEND  intent.

Files touched

  • MainActivity.kt  now passes the stored text scale into the app theme.
  • SettingsRepository.kt  and  ThemeViewModel.kt  add the persisted text-size state.
  • SettingsScreen.kt  adds the new settings row and picker dialog.
  • Theme.kt  applies the scale at the composition level.
  • MealPlanScreen.kt ,  IcsExport.kt ,  IcsShare.kt ,  AndroidManifest.xml , and  file_paths.xml  implement the calendar export flow.
  • TextScaleTest.kt  and  IcsExportTest.kt  cover the new behavior.

How to test

  1. Open Settings and change the text size; confirm the app text updates immediately.
  2. Open Meal Plan, generate a week, then tap the calendar export action.
  3. Confirm the exported file can be shared into a calendar app and imports as all-day events.
  4. Run the unit tests for  TextScale  and  IcsExport .

Notes

  • Text size is local to the device and intentionally not synced with household data.
  • The calendar export is a one-shot file export, not a live subscription feed.

@rjmlaird rjmlaird closed this Jul 19, 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