Skip to content

feat(filinq): build office-charts-and-images - #2188

Open
rubenvdlinde wants to merge 2 commits into
developmentfrom
quality/build-office-charts-and-images
Open

rubenvdlinde wants to merge 2 commits into
developmentfrom
quality/build-office-charts-and-images

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Builds openspec/changes/office-charts-and-images.

Tasks done

  • 1.1 OfficeChartFiller: ${chart:key} becomes a native Word chart (bar → column, horizontal bar → bar, line, pie) via TemplateProcessor::setChart(), built from charts.key = {type, data, options} and validated by the shared ChartDataNormalizer. Bad or missing context leaves the [chart error: …] marker and a warning; the 20-charts cap matches the Twig path.
  • 1.2 OfficeImageFiller: ${image:key} reads images.key (a file id, or {fileId, width, height}) through TemplateImageResolver as the generating user and places it with setImageValue() at the declared size. Unreadable files and WebP (not placeable in DOCX) leave the [image unavailable: …] marker and a warning.
  • 1.3 Fixture tests/sample-documents/chart-template.docx with ${chart:bezwaren}, ${image:logo}, a row-cloning table and a block.
  • 2.1 Office section in docs/features/template-charts.md.

Tasks left

  • 2.2 e2e office generation: the office render path (office-template-authoring 2.3) is not on development, so no office generation can run yet. The fillers are wired into that path when it lands (one call each in its pre-pass).

Tests

  • tests/unit/Service/OfficeTemplateChartTest.php (6 tests, incl. testSetChartCapabilityPinned) and tests/unit/Service/OfficeTemplateImageTest.php (5 tests).
  • Unit suite before: 7288 tests green; after: 7299 tests, 0 failures (6 skipped, as before).
  • php -l, phpcs, phpstan clean on the new classes.

Generated by Claude Code

Office chart and image fillers for ${chart:key} and ${image:key}, a
fixture DOCX, unit tests and the office section of the template-charts
docs. The fillers are called from the office render path once
office-template-authoring 2.3 lands.

Assisted-by: ClaudeCode:claude-opus-5-5
…skip ci]

REQ-DDTCH-003 and REQ-DDTCH-008 live in the office-charts-and-images delta
until it is archived, not yet in openspec/specs/template-charts/spec.md.

Assisted-by: ClaudeCode:claude-opus-5-5

This branch has not been deployed

No deployments
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