Repository navigation
fix(docx): name timeline rails once and correct the ledger's fates - #950
Merged
Merged
Conversation
- Every rail the layout draws shares one path, so each timeline, and each page a rail runs onto, named it again, word for word: cv-terracotta_rail carried the note twice. The rail is named once a path a section; what no paragraph carries is reckoned for all of them together, as before. - The field ledger stated WRITTEN, or a narrower case, for fields a path loses and the report names: the geometry and paint of a drawing the export drops (no layout, a gradient alone, nothing painted); a paragraph's line spacing and a section's or a line's keeps with no layout; keeps inside a panel the layout runs on; a page field's kind, style, padding and margin in the flow. - A page field's alignment moves its number up to a point in its box; the ledger, the capability matrix and the DOCX recipe said it moved nothing. - Two losses no note names are gaps now: a spacer level with another layer's content in a band or a stack written as columns, where that content is not written in its place; and a paragraph composed in a table cell whose text no laid-out line carries, written with no line gap. - A v2.5.0 CHANGELOG bullet still said a band opening with a list or a row loses the space above it, which a later change fixed.
DemchaAV
marked this pull request as draft
October 23, 2026 13:56
…elds take - A drawing the export drops is named by a note for every reason it has, a page zone and a page no paragraph is written on among them, not only with no layout, a gradient alone or nothing painted. - A page field is dropped anywhere but on a page zone's line, a table cell or a layer's column as much as the body. - A paragraph's line spacing in a page zone is where the zone's note places its part; a keep composed in a table cell is the row's. - The CHANGELOG says a line or a shape written as a rule is written as a rule, not that it keeps its geometry and paint.
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
The DOCX export's report and its field ledger are the contract for what an export loses. Read against the code, a few of their statements were not true.
timeline railnote was added once per layout pass fragment. Every rail shares the path@timeline-rail, so each timeline, and each page a rail runs onto, added the same note again.cv-terracotta_rail, with two timelines, carried it twice.DocxNodeFieldLedgerTestsaid these were written, though the report names their loss:reportAKeepThePanelBreaks), and keeps composed in a table cell, where the table row is what is kept;TextAlign's centre and right "not applied" to a page field.PageFieldDefinitionsets the field in a box a point wider than its number, so its alignment moves the number by up to that point. The capability matrix and the DOCX recipe said the same.DocxLayerColumnstakes a spacer level with another layer's content, in a band or a stack written as columns, as a stand-in. Where that content is not written in its place, the spacer is not written.DocxLayoutMetrics.lineGap).What changed
DocxSemanticBackend: the rail note is added once per path per section.DocxDrawingAnchors.Owner("timeline rail", path)already reckons what no paragraph carries for all rails of that path together. One note now matches that one reckoning.DocxNodeFieldLedgerTest: the fates above name the path where the field is lost.DRAWING_DROPPEDfor drawings, also insideRULE_WIDTHandRULE_TRANSLUCENCY;KEEPfor section and line keeps;FIELD_OUTSIDE_A_ZONEfor page fields;STAND_IN_LEFT_EMPTYonSpacerNode.heightandLINE_GAP_UNREADonParagraphNode.lineSpacing.DocxValueFieldLedgerTest:TextAlign.CENTER/RIGHTdrop "a page field's the page does not apply" and name a page field off a zone's line.Verification
DocxFlowContainerReportTest.twoTimelinesRailsAreNamedOnce(new). Two timelines with connectors give exactly onetimeline railnote, and twice the anchored drawings of one timeline: both rails and their markers are drawn.TextAlignconstant left without an entry: the value ledger fails.cv-terracotta_rail's secondtimeline railnote../mvnw -B -ntp clean verify -pl <core, render-pdf, render-docx, render-pptx, templates, testing, qa, coverage> -am→ BUILD SUCCESS. Core 821, render-pdf 339, render-docx 2088, testing 5, render-pptx 142, templates 127, qa 1828../mvnw -f examples/pom.xml test→ BUILD SUCCESS, 93 tests../mvnw verify -pl :graph-compose-render-docx→ BUILD SUCCESS, 2088 tests;Lane: shared-engine (render-docx): the report and the test ledger only. No public API change, and no change to the written DOCX.