Repository navigation
docs(matrix): align the DOCX column with the code and map report subjects to rows - #1014
Merged
Merged
Conversation
…report subject to its row The DOCX column of the capability matrix had drifted from the export. The ServiceLoader row said discovery was n/a, though DocxBackendProvider is registered as a SemanticBackendProvider. The convenience row said the backend is named rather than discovered, though buildDocx, writeDocx and toDocxBytes find it. The table-cell direction row said a cell's textAnchor reaches no cell, though it is written as w:vAlign and w:jc. A rectangle's side border is a filled bar, not a line. The lost corner radius and a gradient-only drawing are named in the report, not only logged. A chip's left padding goes in the fill of a chip right before it. Marks follow the legend: a capability the report names a loss for is⚠️ , not ✅; viewer preferences, which reach the export, are ❌; the outline is⚠️ , since bookmark levels become HeadingN styles. New: a row for a node kind of the caller's own, and a table mapping every subject DocxExportReport emits to its severity, what the file holds instead and its row. The DOCX recipe no longer lists the corner radius as left undone.
…d; complete the subject severities A shape or path painted only with a gradient is dropped at its own node kind in a table cell as anywhere else; only one with an outline is the table's drawing, whose cell drawing note names the gradient. The subject table gives timeline rail and cell drawing their DROPPED case (nothing carries them on a page no paragraph is written on), adds the clipped <kind> fallback, the notes a node's kind carries for a hidden drawing, an anchor with no bookmark and a page reference written as a number, and the unmeasured overlapping layer. The recipe says the corner radius is logged once per export, as the matrix does.
…cover The table's cell drawing note lists a gradient among what it does not carry, whatever the cell draws; the drawing subject's DROPPED case is for shapes no node owns; a dropped node's note carries its anchor's missing bookmark too.
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.
Why
docs/architecture/backend-capability-matrix.mdis the stated source of truth for what each backend can do. Its DOCX column had drifted from the code. Some rows were false: DOCX ServiceLoader discovery was marked n/a, thoughDocxBackendProvideris registered, and the table-cell direction row said a cell'stextAnchorreaches no cell. Some ✅ marks sat on capabilities the export reports losses for. And nothing listed the subjectsDocxExportReportnames, so a caller reading a note could not find the row that explains it.Each DOCX row was checked against the code: its mark, every class, method and report subject it names, and its load-bearing claims, each at the call site or by the test that pins it. Measurements of what Word and LibreOffice do are not code and were left as they stand.
What changed
Docs only:
docs/architecture/backend-capability-matrix.md, one bullet ofdocs/recipes/docx-export.md, and a CHANGELOG entry.DocxBackendProvider, resolved bySemanticBackendProviders.forFormat. Pinned byDocxSessionExportTest#theProviderIsFoundOnTheClasspath.DocumentSessionconvenience row named onlysession.export(new DocxSemanticBackend(...)). It now namesbuildDocx/writeDocx/toDocxBytesonDocumentSessionandMultiSectionDocument, and theMissingBackendExceptionthey raise when the backend is absent. These methods take a default backend, so they have no report sink and write live dates; the Deterministic output row now says so too.applyVerticalAnchorwritesw:vAlignand the paragraph getsw:jc; seeDocxCellAnchorTest#eachAnchorMapsToItsWordAlignment. The Table rows row now adds that a top anchor writes now:vAlign, since top is Word's default.DocxDrawings.edge), not a line;corner radius), not only logged once.DROPPEDat its node's kind, in a table cell as anywhere (DocxRuleTest#aDividerPaintedOnlyWithAGradientIsDroppedAndNamed,DocxCarriedWithoutReportTest#aShapeComposedInACellPaintedOnlyWithAGradientIsDroppedForThat), not only logged. The SPI list gainsrequiresResolvedLayout().DocxInlineBackgroundTest#twoChipsSideBySideAreSpacedByBothTheirPaddings). It is read from the runs, not the lines.w:cantSplit, not four.DocxTimelineRailscomes last, and gives it back to a timeline's entry rows.HeadingNstyles, from which Word builds its Navigation Pane.DocumentNodewith its ownNodeDefinition), per backend. The DOCX cell is pinned byDocxReportedLossesTest#anUnknownNodeKindIsReportedWithWhatIsLostWithIt; the PDF and PPTX cells by their backends'Builder.addHandlerand theUnsupportedNodeCapabilityExceptionan unhandled payload throws.report.add/set/insert/replace/addTosite inrender-docx, the subject resolved where it is a constant, a ternary or a node's kind.corner radius).Verification
At the head
ba69bdd37:clean verifyas CI runs it — 5904 tests, 0 failures, 4 skipped — the four JDK 17 knowledge checks, core javadoc with 0 warnings, then install and the examples tests (93, 0 failures,CommittedAssetDriftTestincluded)../mvnw -B -ntp test -pl :graph-compose-core "-Dtest=com.demcha.documentation.*Test"ran 30 classes and 172 tests, with 0 failures. This includesDocumentationLinkGuardTest, which checks the new in-page anchor../mvnw -B -ntp test -f qa/pom.xml "-Dtest=DocumentationExamplesTest,DocumentationSnippetCompileTest"ran 12 + 6 tests, with 0 failures.