Repository navigation
docs(release): write the 2.5.4 notes and update the docs its fixes made stale - #1114
Merged
Merged
Conversation
…de stale The CHANGELOG gets its v2.5.4 section: six short hooks, an upgrade line, then the Changed and Fixed entries for #1103 to #1112 with their known limits. The upgrade line does not say "drop-in". With per-page margins, a block that cannot break now throws AtomicNodeTooLargeException where it used to run past the foot of a shorter page, and a block taller than a short page already in use now moves to the next page, if that page can hold it, instead of throwing. #1113 only adds a test, so it has no entry. Docs: - The DOCX docs gave an ordered number and a bold node_js as examples of what the page changes without a report note. The page keeps both, so a named HTML entity, which it drops, replaces them. - The copied header rows of a split DOCX table leave out a drawing as well as a bookmark added after the split is decided. - The pagination, lifecycle, shape-container, timeline and pageMargins texts now say that an atomic block must fit the page it lands on. - The tables recipe says where a page break falls around rowSpan cells and in which cases it still cuts them, and no longer promises v1.4 pagination to a table with rowSpan. The keep-together recipe counts the rows such cells hold together in a table's first slice.
…the rowSpan fix Measured against 2.5.3, a document with per-page margins can throw in two cases, not one. The check on a block that cannot break includes its own top and bottom margins, so it also throws where only the bottom margin does not fit. A rowSpan group can throw too: it is measured against the page it leaves, and it throws if the next page cannot hold the repeated header rows and the group's first row. The hooks, the upgrade line and the entries now say so. The rowSpan limits now count the table's margins. They also cover a keepWithNext() heading that does not fit on one page with the first group: it stays behind where 2.5.3 could move it. A box that opens with such a table can leave its fill behind in the same way. Docs: the texts on the page an atomic block must fit count the block's margins, except the timeline recipe's. repeatHeader(0) no longer promises v1.4 behaviour, which a table with rowSpan does not have. The DOCX recipe says that the parser reads an empty bullet item into nothing, not any empty list item, since an empty numbered item keeps its number.
…block now throws - A numbered line that keeps its number can wrap onto one more line, so a row, layer stack or shape container that nearly filled its page can become too tall for it and throw, whatever the page margins. - When a box's bottom padding and margin no longer open a page, later content can move up a page. With per-page margins, a block that cannot break can then start on a shorter page, and it throws if that page cannot hold it. - The rowSpan throw also counts the table's padding and margins. - The bottom-margin entry now lists every kind of fixed slot, and only sections, not all containers, as already right in the flow.
…rowSpan fixes The notes were written before the last four layout fixes merged. Only the final layout pass now throws a capacity refusal; rowSpan groups move whole only where every page ends up with the same margins, and are cut as in 2.5.3 elsewhere; a box whose first block can split is measured against the page it leaves again; and a keepWithNext heading starts a new page with a table whose first group it cannot share a page with. The upgrade text now names the documents that can still fail to lay out: a block that cannot break on a shorter page it lands on, a table after a cut-short closing inset, a box's table too wide for the column of the page it moves to, and a block grown by a kept markdown number. It drops the rowSpan refusal and the stranded heading, which no longer happen, and adds the multi-pass rule, the custom paginationPolicy note and the remaining limits. tables.md and keep-together.md describe the rowSpan rule, the heading and their costs; pagination-ordering.md says that only the last pass throws.
…gs and boxes - A pass that stops on another error throws the exception for the first block it refused, or that error if it refused none; the CHANGELOG and pagination-ordering.md now say so instead of "only the last pass throws". - tables.md names when a keepWithNext() heading stays above a cut rowSpan group: the header rows and first body row, with the table's bottom margin and padding, fit under it. - The box that leaves its fill behind a moved rowSpan group says what 2.5.3 did; paginationPolicy is asked at the width the box gives the leaf; the heading counts more than the header rows and first body row. - The per-page-margin upgrade bullet lists its three cases separately.
A line break inside a rich-text run now breaks the line in PDF and PPTX, as text() does with the same characters; DOCX already did. The 2.5.4 section gets a Fixed entry for it: the run's style and link on both sides of the break, the chip that still turns a break into a space, auto-size taking the smallest size (and DOCX writing that size), template text in inline Markdown gaining its breaks, and the re-rendered world-scripts preview. The numbered-line hook also names the fix, so the section keeps six hooks, and the upgrade text adds a row, layer stack, shape container or composed table row that nearly fills a page and holds such a break: it now takes more lines and can be refused as too tall.
A preset that splits body text at its line breaks before setting it never hands a run a newline, so its output does not change. The 2.5.4 entry for the rich-text line break now says so.
A table with repeated header rows whose header and next body row did not fit on an empty page together threw AtomicNodeTooLargeException. It now splits at that row as it would without repeatHeader(), and a page that opens with such a row carries no copy of the header. The notes name it among the documents that now lay out, give it a Fixed entry with its limits (a keepWithNext heading left at the foot of a page, the DOCX export that still repeats the header), and the table recipe and the parity table state the exception to "every continuation page".
The page can now leave a repeated header alone at the foot of a page and open the next without a copy, where a body row does not fit on an empty page with it. The DOCX file still marks the header to repeat there and to stay with that row; the export guide's Tables row now says so. The 2.5.4 note names only rows that fit a page by themselves.
A hangingIndent list whose marker is made of runs of text alone now hangs its items at the page's column in DOCX, as after a marker given as text. The Fixed entry says what changed and which markers keep their space; the upgrade text says an entry can change a document's DOCX export. The DOCX recipe, the lists recipe and the capability matrix and details stop saying a marker of runs keeps its space, and the recipe no longer says Word sets a marker at most a few hundredths wider.
…that keeps its space The DOCX recipe, the lists recipe and the capability details named the chip and the picture beside text, but not a marker of runs that starts or ends with a space, which keeps its space 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
develophas nov2.5.4section in the CHANGELOG, although seventeen fixes have merged since 2.5.3 (#1103–#1112, #1116–#1122).release.ymlpublishes that section as the Release body. Some of the fixes can make a document fail to lay out where 2.5.3 laid it out, and others take back part of an earlier one. Readers need to learn both before they upgrade.The same fixes left some docs out of date or incomplete. For example,
docs/recipes/docx-export.mdstill gave1.as letters the page drops, andtables.mdandkeep-together.mdsaid nothing about how a table withrowSpanbreaks.What changed
CHANGELOG,
## v2.5.4 — Planned(the exact literalcut-release.ps1dates at the cut)Six hooks open the section, one per change a user is most likely to notice. The
AtomicNodeTooLargeExceptionhook starts with "Behaviour change". TherowSpanhook is limited to documents whose pages all have the same margins (fix(layout): move rowSpan groups only where all pages have the same margin #1117) and to tables nokeepWithNext()heading needs the room above (fix(layout): keep a keepWithNext heading with a table that opens with a rowSpan group #1119). The numbered-line hook also names the line break inside a rich-text run (fix(layout): break the line at a newline inside a rich-text run #1122), so the count stays at six. TherepeatHeader()fix (fix(layout): split a repeatHeader table whose header and next row cannot share a page #1120) changes no page layout that 2.5.3 produced; it lets documents that threw lay out, so it has no hook of its own and is named in the upgrade text's other direction instead. The DOCX list-marker fix (fix(docx): hang a list's items at the page's column after a marker made of runs of text #1121) changes only the Word file of ahangingIndentlist with a marker made of runs of text alone, so it has no hook either.The upgrade text does not say "drop-in". It says there are no API changes and no code to change, then names the documents that can now fail to lay out, each per-page-margin case in its own bullet:
admitAtomicBlockcompares the outer height);IllegalStateException), or its text can wrap onto more lines and make a block too tall;It then says that a multi-pass document is checked only in the layout it ends with, so the exception can name another block or page; a pass that stops on another error throws the exception for the first block it refused, or that error if it refused none (fix(layout): refuse a block that cannot fit its page only in the final pass #1116,
DocumentLayoutResolver.compilePass), and gives the other direction: a block taller than a short page already in use moves to the next page, a document 2.5.3 refused only in an earlier pass lays out, and so does arepeatHeader()table whose header rows and a body row did not fit on an empty page together (fix(layout): split a repeatHeader table whose header and next row cannot share a page #1120). Its closing sentence says that an entry can change a document's pages and layout snapshots, or its DOCX export, since three entries (fix(docx): keep a markdown cell's line beside a plain cell of its text #1108, fix(docx): leave a header row's drawing out of its copy in a split table #1111, fix(docx): hang a list's items at the page's column after a marker made of runs of text #1121) change only the Word file.### Changed:NodeDefinitions,paginationPolicycan be asked before placement, under the conditions its Javadoc names, at most once per node object per pass, only about the leafpreparereturns at the width the box gives it; placement may then place another object or none, also in a pass that fails. This is what its Javadoc already says;### Fixedholds the other fixes and keeps their limits:rowSpan: groups move only where every page has the same margins, counting rules for pages the document does not reach and ignoring rules that change nothing or give every page the same new margins (fix(layout): move rowSpan groups only where all pages have the same margin #1117); elsewhere tables are cut as in 2.5.3. ThekeepWithNext()heading counts the whole first group with the table's bottom insets, starts a new page with the table when the two do not fit together, and is measured as in 2.5.3 where margins differ (fix(layout): keep a keepWithNext heading with a table that opens with a rowSpan group #1119). Limits: a group taller than a page still splits; under a heading a group that fits a page can be cut and run past the margin; a box whose top insets keep the group off its page leaves its fill behind, where 2.5.3 started the table on that page;bulletOffsetcan take a later cell's line;DocxSemanticBackendis for exports one after another, never for two threads at once;\n,\r\nor\rin a run now breaks the line in PDF and PPTX astext(...)does (DOCX already did), keeping the run's style and link on both sides; a highlight chip still turns a line break into a space; theworld-scripts.pdfpreview's Arabic caption now puts its font name on a line of its own, as the other cards do;repeatHeader()table whose header rows and next body row do not fit on an empty page together (fix(layout): split a repeatHeader table whose header and next row cannot share a page #1120):AtomicNodeTooLargeException, naming the whole table's height at its start or the rest's height further down; it now splits at that row as it would withoutrepeatHeader(): the table's own header can end a page by itself, a page that opens with such a row carries no copy, and the copy comes back on the next page whose first row fits under it;keepWithNext()heading above such a table can be left alone at the bottom of a page, where withoutrepeatHeader()it moves with the table and 2.5.3 threw; the DOCX export still marks the header rows to repeat and to stay with the row under them (breakRowsWhereTheLayoutDoes), so the Word file keeps the copy, where 2.5.3 exported such a document without its page layout.hangingIndent(true)list,marker(m -> m.style("10.", style))ormarker(m -> m.color("•", color))was written as the marker, a space and the item, and Word set the text 3.3pt left of the page's (the PR's measurement); its top-level marker is now followed by a tab to the page's column and its lines hang there, as after a marker given as plain text, under the same check (the gap clears Word's width of the marker, each run at its own size to the half point, by half a point), and the report no longer counts these items as standing at a stated column;markerGap(0)), one that holds a chip or draws a picture beside its text, one with a space at either end, and the marker of a list that nests items keep the space.test(layout): pin the start page's column for a paragraph split across a margin change #1113 only adds a test for documented behaviour, so it has no entry.
Docs
docx-export.md,backend-capability-details.md). The1.example was wrong after fix(markdown): keep an ordered list item's number where the page reads markdown #1104. Thenode_jsexample beside it, "set regular" in a bold list, has been wrong since 2.5.3. Both are gone, and the new example is a named HTML entity.docx-export.md). An empty numbered item now keeps its number, so "an empty list item" becomes "an empty bullet item".docx-export.mdcovered only the bookmark; fix(docx): leave a header row's drawing out of its copy in a split table #1111 adds the drawing.backend-capability-details.mdcovered neither.pagination-ordering.md,lifecycle.md,shape-as-container.md,timelines.md, and thepageMarginsrow ofapi-stability.md). It is the page the block lands on, and except intimelines.mdthe text says that the block's own top and bottom margins count.pagination-ordering.mdalso says that a multi-pass document logs a compile per pass, that only the last pass throws a refusal, and what an earlier pass that stops on another error throws.rowSpantables.mdhas a new "Page breaks and row span" section, linked from the row-span section: the rule where every page has the same margins, the cut under akeepWithNext()heading (and when the heading stays where it is), and 2.5.3's cut where margins differ. It comes after the page's last claim marker, so the line numbers inknowledge/claimsdo not move.tables.mdpromised v1.4 pagination to every table withoutrepeatHeader(), in its last invariant and forrepeatHeader(0). The invariant now leaves out tables with arowSpancell, and therepeatHeader(0)text says only that no header row repeats.keep-together.mddescribes a heading before a table that opens withrowSpan: the first group with the table's bottom insets, the heading that starts a new page and the cut under it, and the header rows plus first row where margins differ.tables.md,canonical-legacy-parity.md,docx-export.md). Both said the header repeats on every continuation page. They now name the exception from fix(layout): split a repeatHeader table whose header and next row cannot share a page #1120: a page that opens with a body row which does not fit on an empty page with the header carries no copy.tables.md's invariant list namesTableRepeatHeaderOversizedRowTestfor it, and its opening summary now says the header is "repeated across page breaks". The new sentences come after the page's claim markers.docx-export.md's Tables row adds that for such a row the file still marks the header to repeat and to stay with the row under it, where the page can leave the header alone at the foot of a page.keep-together.mdneeded no change: its best-effort rule already says a heading flows in place when it cannot share a page with the table's header rows and first body row.docx-export.md,lists.md,backend-capability-details.md,backend-capability-matrix.md).docx-export.mdsaid a marker made of runs keeps its space, both in the drawn-marker bullet and after the marker column; after fix(docx): hang a list's items at the page's column after a marker made of runs of text #1121 a marker of runs of text alone takes the column, each run weighed at its own size, and one that holds a chip, draws a picture beside its text, or has a space at either end keeps its space. Its "a few hundredths at most" for how much wider Word sets a marker held only on the half-point grid: off it Word sets10.at 10.25pt a third of a point wider, so the sentence says so.lists.mdadds those three markers to the ones that do not take the column. The details entry's guard sentence now covers a marker of runs of text, and the matrix's DOCX cell names the markers whose lists take the column.Two places needed no change.
docx-export.mdalready says that a backend starts every export from nothing, even after one that threw, and #1110 makes the code match. It also says a page reference in a composed cell stores no number, and #1106 did not touch the DOCX writer.When merging: use this body as the squash message. The branch's commit messages describe the notes before #1116–#1122 and list throwing cases that no longer hold.
Verification
Probes on the merged code. The same small documents ran on the published 2.5.3 jars and on this branch's freshly compiled classes (develop's code):
rowSpan, per-page margins. A 256pt group lands whole on page 2 at y=95.15 in both. A group of 124.55pt and 59.8pt rows meeting a 100pt page is cut after its first row in both, the cell ending at y=-4.35. Two tables meeting a 100pt page with 0pt and 30pt bottom margins match 2.5.3.rowSpan, one page size. A 754.2pt group on pages with 762pt of content: the branch keeps it whole on page 2, and with a 24pt bottom margin on the table cuts it on page 1, as 2.5.3 does. AkeepWithNext()heading before 33- and 36-row groups is placed as in 2.5.3.First./Second./Third.with a line break between each. 2.5.3 sets the paragraph on one line, 12.95pt, and the row is 342.95pt. The branch sets three lines, 38.85pt, and throws on the row's 368.85pt against 360pt. Without line breaks both give 342.95pt. A paragraph read as markdown,**First** one.+ line break +Second., is two lines (25.90pt) in both versions.1. node_jskeeps its number;R&D node_jsin a list in a table cell readsRD node_jsin the PDF andR&D node_jsin the DOCX.Documentation guards, on the final text (this PR's head), through the reactor:
./mvnw -B -ntp test -pl :graph-compose-core,:graph-compose-render-pdf,:graph-compose-render-docx,:graph-compose-render-pptx,:graph-compose-qa -am '-Dtest=com.demcha.documentation.**.*Test,DocxBetaSurfaceTest,BetaAnnotationDocumentationTest,BundledFamiliesTest' -Dsurefire.failIfNoSpecifiedTests=false→ BUILD SUCCESS, 243 tests, 0 failures: core 191 (withVersionConsistencyGuardTest,ChangelogVersionParsingTest,DocumentationCoverageTestandDocumentationLinkGuardTest), render-pdf 2, render-docx 6, render-pptx 2, qa 42 (withDocumentationSnippetCompileTest,DocumentationExamplesTestandDocxCapabilityMatrixGuardTest).node knowledge/tools/claims/check-claims.mjs --check→ 46 claims and 10 proofs, both current.check-stability-doc.mjs,check-routes.mjsandextract-api.mjs --from-reactor --checkalso exit 0, andknowledge/is unchanged.The entries match the merged code:
LayoutCompiler,CompilerState,DocumentLayoutResolver,PageGeometry.hasUniformMargin,NodeDefinitionSupport,SplittableLeafCompiler, thepaginationPolicyJavadoc, for fix(layout): break the line at a newline inside a rich-text run #1122ParagraphWrapping.tokenizeInlineRuns,TextFlowSupport.paragraphFitsSingleLine,DocxSemanticBackend.fittedSizeandMarkdownInline, for fix(layout): split a repeatHeader table whose header and next row cannot share a page #1120NodeDefinitionSupport.splitAfterOwnHeaderandsplitWithoutHeaderCopywithTableRepeatHeaderOversizedRowTest, and for fix(docx): hang a list's items at the page's column after a marker made of runs of text #1121DocxSemanticBackend.markerLetters,setInAColumnandwordsMarkerWidthandDocxLayoutMetrics.markerLine, withDocxListTextMarkerIndentTestandDocxListMarkerGapTest. The table split in thev2.5.3tag gives no head where only header rows fit, which is where it threw.Lane: docs only. No Java, generated file or baseline changes.