feature: PDF export options dialog (root place, depth, layout, theme grouping) #30

Merged
Gilles merged 1 commit from feature/pdf-export-options into main 2026-11-02 12:02:50 +00:00
Owner

Closes #29

What

  • New PdfExportOptionsDialog opened by every PDF export button (version, current state, spec extract) before the job is created: start place (indented place-tree picker; locked on the spec's place for an extract), max depth (empty = unlimited), tree / by-place layout, group by theme. Mentions the always-included table of contents, and warns when the project resolves to a custom PDF template.
  • api/exports.ts: PdfExportOptions sent with createPdfExportJob / createCurrentStatePdfExportJob / createSpecPdfExportJob (the latter always sends root_place: null); PdfExportJob gains the four fields; previewPdfTemplate takes layout/groupByTheme.
  • Template editor (Gestion > Export PDF): documents the new context variables (export, places, themes, toc, anchors/links) and can preview each layout/grouping.
  • MSW mocks mirror the backend serializer's checks (root_place in the project and never with spec, max_depth >= 0, known layout).

Depends on

thierryade/backend#42 for the options to have any effect. Merging this one first is harmless (DRF ignores the unknown fields), but backend first is the natural order.

Tests

91/91 Vitest (5 new: options sent from the dialog, negative depth refused, cancel exports nothing, custom-template warning, locked place + depth on a spec extract; existing export tests now go through the dialog). pnpm build (vue-tsc) clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CrK5Cbdm97HrbhC9wPMLyu

Closes #29 ## What - New `PdfExportOptionsDialog` opened by every PDF export button (version, current state, spec extract) before the job is created: start place (indented place-tree picker; locked on the spec's place for an extract), max depth (empty = unlimited), tree / by-place layout, group by theme. Mentions the always-included table of contents, and warns when the project resolves to a custom PDF template. - `api/exports.ts`: `PdfExportOptions` sent with `createPdfExportJob` / `createCurrentStatePdfExportJob` / `createSpecPdfExportJob` (the latter always sends `root_place: null`); `PdfExportJob` gains the four fields; `previewPdfTemplate` takes `layout`/`groupByTheme`. - Template editor (Gestion > Export PDF): documents the new context variables (`export`, `places`, `themes`, `toc`, anchors/links) and can preview each layout/grouping. - MSW mocks mirror the backend serializer's checks (root_place in the project and never with spec, max_depth >= 0, known layout). ## Depends on thierryade/backend#42 for the options to have any effect. Merging this one first is harmless (DRF ignores the unknown fields), but backend first is the natural order. ## Tests 91/91 Vitest (5 new: options sent from the dialog, negative depth refused, cancel exports nothing, custom-template warning, locked place + depth on a spec extract; existing export tests now go through the dialog). `pnpm build` (vue-tsc) clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01CrK5Cbdm97HrbhC9wPMLyu
feature: PDF export options dialog (root place, depth, layout, theme grouping)
All checks were successful
ci / unit (pull_request) Successful in 1m5s
ci / publish (pull_request) Has been skipped
2c666578ec
Every PDF export button now opens an "Options d'export" dialog
(PdfExportOptionsDialog): start place picked from the place tree
(locked on the spec's place for a spec extract), max depth, tree or
by-place layout, theme grouping; a custom-template warning when one
applies. The options travel with the job (api/exports.ts,
PdfExportOptions), mirrored in the MSW mocks with the backend's own
validation. The template editor lists the new context variables and
previews each layout/grouping.

Closes #29

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CrK5Cbdm97HrbhC9wPMLyu
Author
Owner
<!-- argus-link-bot:thierryade/frontend --> 📊 [Rapports Argus pour cette PR](https://reports.stationmyr.net/thierryade/frontend/pr/30)
Gilles merged commit 637e88fecb into main 2026-11-02 12:02:50 +00:00
Gilles deleted branch feature/pdf-export-options 2026-11-02 12:02:50 +00:00
Sign in to join this conversation.
No description provided.