Repository navigation
feat: redesign the menu and shopping PDF exports - #69
Merged
Merged
Conversation
The menu PDF and the shopping PDF each set their own sizes and grays, so the two files looked unrelated. pdf_theme.dart now holds one teal accent (the default seed color of the app), the A4 page, a footer with "Page X of Y", a section banner, and a small badge. A footer names the document and the page, so a loose printed page still says where it belongs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Before, week 2 broke in the middle of its table, the bullet list of ingredients took a lot of height, and a cook meal looked the same as a leftovers meal. Now: - Each week and the recipe section start on a new page. - A cook note is bold teal, a leftovers note is gray italic, and a legend under the title explains both. - Each recipe shows its facts as chips and its ingredients in a grid of two columns. The header and the grid stay on one page. - Each step shows a teal number, then its times, then the ingredients that it uses, on separate lines. No information is lost: every value of the old PDF is still printed. The text reader of the shopping tests moves to test/helpers, so the menu tests can count pages and read drawn text too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Before, every product line was an underlined blue link, the trip title
was a bare "now", and the meal lines were long sentences. Now:
- Each trip starts on a new page, with a banner that numbers the trip
and counts its items ("Trip 1 of 3: now", "65 items").
- Each ingredient has a box to tick, and its amount sits on the right.
- Product rows start with the packs to buy. The best product carries a
green "Recommended" badge, and "Freeze on arrival" is a blue badge.
- "Needed for" is a small striped table: when, dish, amount.
- An ingredient with no store product says so, and a line under the
title explains how to read the page.
No information is lost: every value of the old PDF is still printed.
The meals table stays a separate page widget, so a staple with 80 meal
lines still continues over two pages.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
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.
Both PDF exports get a clearer layout, and no information is lost. Every value of the old PDFs is still printed. A human approved the design from before/after previews built with the bundled default recipes and menu.
Menu PDF
Shopping PDF
Both
lib/theme/pdf_theme.dartholds the shared colors (the teal of the app seed color), the page, a "Page X of Y" footer, a section banner and a badge.test/helpers/pdf_bytes_reader.dart, so the menu tests can count pages and read drawn text too.Tests
flutter analyzeis clean, and the format check passes.Out of scope
€or½). A bundled font would fix this, but the tests read drawn text in a way that only works with the built-in font. This needs its own PR.🤖 Generated with Claude Code