Let a theme set the job-search report, and remember the choice (#340) #1082
No reviewers
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo!1082
Loading…
Reference in a new issue
No description provided.
Delete branch "340-report-themes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The report was drawn from one fixed template, so a plugin had no way to
offer a report theme. It is a theme kind now, ThemeKind.REPORT, set on the
report's document kind, and both the PDF the address hands back and the
one the errand files are drawn through themes.template_for.
Today's print template became documents/themes/base_report.html with
plain's stylesheet in plain/report.html, so somebody who never picks a
theme gets the report they always had; classic sets it in its serif. A
report theme is handed plain values built by reports.as_context (the
period, the cadence, what happened, the evidence rows without referrer or
agency, the sources, the industries, the person, the office and the
adviser) and never a model, plus document_language, document_direction,
document_title and csp_nonce. Industries are in the context; neither
shipped theme prints them. The CSV is unchanged.
The report's page offers the theme and the language beside the button.
The theme is remembered per person in the new Profile.document_themes
(JSON per kind; Profile.theme is the light/dark setting), which #341 and
#342 can share; a name nothing answers to draws in plain. The language
starts where a CV's does (profile, then instance) and the whole report,
labels included, is built inside it, by the page and the worker alike.
A GET may ask for either in its query and remembers nothing.
RenderedDocument gains a theme column: the theme that drew a filed report,
CV or letter. The account archive moves to format 77 and carries both
(document_themes in PROFILE_FIELDS, theme in SENT_FIELDS), each read back
as a claim.
Closes #340
Notes for review
ThemeKind.REPORT. Today's report becomes the built-inplainreport theme (the look is unchanged exceptoverflow-wrap: anywhere), andclassicgets one in the classic serif.report_pdferrand both draw throughreports.draw(), with a plain-values context (reports.as_context).Profile.document_themes(JSON, also for #341 and #342). The language isn't remembered.RenderedDocument.theme), for CVs and letters too.accounts 0049is shared with #878.documents 0031_rendereddocument_theme.🤖 Generated with Claude Code
6153ec1b7c5f2adcb0ee5f2adcb0ee696189096e