Repository navigation
Fix star-column allocation with minimum and maximum widths - #1866
Open
peterolkhov wants to merge 1 commit into
Open
peterolkhov wants to merge 1 commit into
peterolkhov wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
What kind of change does this PR introduce?
Bug fix. A star column can consume space needed by a later column's minimum. On a standard Letter page with 50pt margins,
['*', { minWidth: 450 }]allocates[256, 450]despite a 512pt table width. Right-aligned content can end up entirely off the page;[62, 450]fits both bounds.Resolve the active minimum/maximum bounds before dividing the remaining space. Keep fixed widths, capped leftover space and the existing infeasible-minimum behavior. Only the allocator and its unit tests change.
Added order, mixed-bound, fixed/percentage, spanning-cell and exact/infeasible-minimum regressions. Verified failures before the fix, and actual PDF output confirms the missing total is recovered while healthy controls remain byte-identical. Full tests (670), tools tests (53), Rollup builds, lint and formatting pass locally. Independent checks also cover a separate allocation oracle and source/built-package PDF output.
Tooling used compatible borrowed packages, with some PDF/image-test helper versions below the current declarations; this was not a frozen CI install. Other Node versions and a real browser runtime were not tested. Bound resolution is quadratic in the worst case; the ordinary unconstrained case takes one pass.
Checklist: