feat: add client-side PDF, PowerPoint and Markdown export - #72
Conversation
- Install pptxgenjs@4.0.1 for client-side PPTX generation - Add exportPDF() (window.print) and exportPPTX(lang) in src/data/export.js - Add ExportMenu dropdown component in src/components/ExportMenu.jsx - Mount ExportMenu in AppHeader next to the language selector - Add NL/EN/FR i18n strings for the export feature - Add @media print CSS to hide chrome when printing to PDF - Add 8 tests covering exportPDF, exportPPTX (all languages), and ExportMenu Closes #19
|
🔍 Preview deployed: https://2bc2c95b.grip-visualizer.pages.dev Updated: Fri, 19 Jun 2026 08:59:22 GMT |
|
@copilot The PDF export is not that useful as it is now. I like the PPTX export:
|
- Add PrintDocument component: screen-hidden, one full page per measure (title, summary, guidance why/do/don't, Microsoft mapping + docs URLs, standards mapping + controls), revealed only via @media print - Rework exportPDF to use the PrintDocument instead of printing the view - Expand PPTX slides to a two-column layout carrying the same full detail - Mock writeFile in the PPTX test; remove accidental GRIP-Visualizer.pptx artifact and gitignore *.pptx - Re-scope three App tests to the detail aside (labels now repeat per page)
Done in 28de4a7 (latest commit).
|
|
@copilot resolve the merge conflicts in this pull request |
…powerpoint-export # Conflicts: # src/App.jsx
Resolved the merge conflict with |
|
@copilot This is super cool! Can you also add a Markdown export please that includes all that info that we now have in PDF and PPTX too? |
Added a Markdown export in the latest commit. It's now the third option in the Export dropdown and produces a single |
Adds PDF, PPTX and Markdown export of the GRIP → Microsoft mapping directly in the browser — no data leaves the client. All three formats produce one fully-detailed page/slide/section per GRIP measure.
Approach
PDF — a screen-hidden
PrintDocumentcomponent (always mounted) renders one full page per GRIP measure; a@media printstylesheet hides the interactive app and reveals only this document, so "Save as PDF" yields a measure-per-page deck (with a cover page) rather than the on-screen view.exportPDF()delegates towindow.print().PPTX — uses
pptxgenjs(4.0.1, no known vulnerabilities) to programmatically build a.pptxin-browser:Markdown —
exportMarkdown(lang)builds a single.mddocument with one section per GRIP measure and triggers a client-side download via aBlob(no dependency, no data leaves the browser).Each page (PDF), slide (PPTX) and section (Markdown) carries the complete measure detail shown in the app: title, summary, type/basis/tier, practical guidance (why / do / don't), the Microsoft mapping with documentation URLs, the standards mapping with the "why" and control references, and further-reading references.
UI
ExportMenudropdown added toAppHeadernext to the language selector — accessible (ARIAmenu/menuitemroles, Escape to close, outside-click dismiss), spinner shown during PPTX generation. The dropdown offers PDF, PowerPoint and Markdown options.i18n
exportLabel,exportPdf,exportPptx,exportMarkdown,exportPdfAria,exportPptxAria,exportMarkdownAriaadded to all three locales (NL/EN/FR) insrc/i18n/strings.js.Tests & housekeeping
exportPDF,exportPPTX(all locales),exportMarkdown(all locales + full-detail content), theExportMenucomponent (including the Markdown option), and thePrintDocumentfull-detail rendering; the PPTX test mockswriteFileand the Markdown test mocksURL.createObjectURL/clickso generation never touches disk.GRIP-Visualizer.pptxartifact and gitignored*.pptx.asidesince section labels now repeat per print page.main(self-assessment mode), keeping both thePrintDocumentandAssessmentScorecardintegrations insrc/App.jsx.