Repository navigation
docs(docx): give render-docx a package-info and say what the Word export does today - #1019
Merged
Merged
Conversation
…ort does today render-docx's one package had no package-info, so its package page had no overview. The DocxSemanticBackend class Javadoc still said the export ignores fixed-layout concerns (no pagination, no chrome). Core's semantic package-info, overview.md and streaming.md still said the Word writer works without the layout graph. The 2.5 export reads the resolved layout. It writes headers and footers, page backgrounds and native Word charts, and it returns an export report. - render-docx: a package-info for document.backend.semantic.docx. It has no package-level @beta: the package is Stable, and its 2.5 additions are @beta one element at a time, as docs/api-stability.md lists them. - DocxSemanticBackend: the class Javadoc says what the export writes, what it reads from the layout, and what an export without a layout leaves out. It also says how charts are written, where the report goes, and what deterministic output promises. - DocxSemanticBackend.offerASeat: a shape is anchored in the paragraph that can place it at the smallest offset, not the first one, as DocxDrawingAnchors already says. - DocxBackendProvider: how ServiceLoader finds it, and that the backend it creates has no report sink and writes live dates. - core: the semantic package-info and SemanticBackend.requiresResolvedLayout say what a semantic backend may read from the layout. ClipPolicy says what the DOCX backend does with a clip. - docs: overview.md, package-map.md, canonical-legacy-parity.md and streaming.md drop the same stale claims. package-map no longer calls the semantic package Experimental.
… layout, and name the public types
- DocxSemanticBackend and the docx package-info: without a layout,
drawings are left out and named in the report, and page backgrounds,
which only the layout carries, are left out with no note. The panel
page-break sentence is gone: those pieces come from authored breaks.
- package-info: the {date} caveat on deterministic output, and the public
types are the backend with its Builder, the report with its Note and
Severity, and the provider.
- overview.md: the diagram gains the edge from the resolved layout to the
DOCX backend, and the prose names everything it reads from the layout,
not only measurements.
- canonical-legacy-parity.md: a configured backend comes from builder().
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
render-docxhas one package,document.backend.semantic.docx, and it had nopackage-info.java, so its package page had no overview. The descriptions of the Word export elsewhere predate 2.5:DocxSemanticBackendclass JavadocrequiresResolvedLayout()returnstrueand the export reads line heights, column widths and drawing positions from the layout (DocxLayoutMetrics.of). It writes headers, footers, page backgrounds and native Word charts (DocxNativeCharts), and hands aDocxExportReportto a sink.semantic/package-infoSemanticExportContext.layoutGraph)DocxSemanticBackend.offerASeatDocxDrawingAnchors.placeInItsHolder/asTheShapeStandsTo)docs/architecture/overview.md(3 places),streaming.mdLayoutGraph", "bypass[es] the layout graph", "ignores fixed-layout concerns"docs/architecture/package-map.mddocs/api-stability.mdcalls the semantic export SPI "otherwise-Stable", with@Betaon its 2.5 memberscanonical-legacy-parity.md,streaming.mdrender-docxdeclarespoi-ooxmlat compile scopeClipPolicyJavadocCLIP_PATHand logs a capability warning"DocxClipReportTest)What changed
semantic.docx/package-info.java(new). It covers:Builder, the report and itsNote/Severity, and the provider;ServiceLoaderdiscovery;@Beta, because it is not Experimental as a whole. The class, its no-argument constructor,name()andexport(graph, context)are Stable, andDocxBetaSurfaceTestpins them unmarked. The 2.5 additions are@Betaone element at a time, as set by fix(docx): mark the Word export's 2.5 API @Beta where it was unmarked #1018. So the package-level convention used for the PPTX packages does not apply.DocxSemanticBackendclass Javadoc rewritten:droppedBecause). Page backgrounds, which only the layout carries, are left out with no note (DocxPageBackgrounds.of);{date}unpinned. Across platforms the bytes differ where POI ends an XML declaration with the platform's line separator.DocxSemanticBackend.offerASeat: the anchoring sentence now matchesDocxDrawingAnchors.DocxBackendProvider: howSemanticBackendProvidersfinds it (services file plusformat()). The backend it creates has no report sink and writes live dates; usebuilder()withexport(...)for either.semantic/package-info: what a semantic backend is handed, the discovery and section types, which render-module backend writes a file, and the package's@Betaelements.SemanticBackend.requiresResolvedLayout: a semantic backend may read where a drawing its format floats stands. Drawing every page at layout coordinates is what makes a backend fixed-layout.ClipPolicy: what the DOCX backend does with a clip.overview.md,package-map.md,canonical-legacy-parity.mdandstreaming.mdupdated as in the table. The overview diagram gains the edge from the resolved layout to the DOCX backend.Javadoc and Markdown only: no code, signature or annotation changes. No CHANGELOG entry, since nothing a caller sees changes. The knowledge pack is unaffected because it reads package-level annotations, not package Javadoc:
extract-api.mjs --from-reactor --checkreports the surfaces current.Verification
./mvnw -B -ntp clean install -pl :graph-compose-render-docx -am: core 842, render-pdf 339, render-docx 2545 tests, 0 failures. Core's documentation guards are included:DocumentationCoverageTest,PackageMapGuardTest,BetaAnnotationDocumentationTest../mvnw -B -ntp test -f qa/pom.xml: 1910 tests, 0 failures.DocxExportReport:106,112,Builder.build()).{@link Builder#reportSink(Consumer)}resolves to the method.-Xmaxwarnslifted: none of the doclint warnings is in a file this change touches.node knowledge/tools/api-surface/extract-api.mjs --from-reactor --check: current.Lane: documentation (canonical surface Javadoc). No layout or render code changes, so the DOCX corpus is untouched.