You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With a 400 pt indent in the reported viewport, the four-column table was reduced to 1 pt in Read Mode. Reserve at least half of the table width fitted to the reading column. The existing position clamp then reduces the indent in either writing direction.
The regression covers the reported indent, an indent just inside the column edge, a normal indent and the authored indent in Print Layout.
Validation
The regression failed on the base branch at 1 pt and passes with the fix.
cargo test --locked -q -p wordcraft-layout with development-profile dependency overrides. 843 passed and 2 were already ignored.
In Reading view, tables with excessive indentation now fit within the available column while retaining at least half their unindented width. This applies to both left-to-right and right-to-left layouts.
Print layout continues to preserve the table’s authored indentation and width. Ordinary indentation in Reading view remains unchanged.
No actionable comments were generated in the recent review.
Walkthrough
Reading view now reserves a minimum amount of room for indented tables, preventing large positive start offsets from reducing the calculated room to 1 point. Regression tests cover LTR and RTL reading layouts and print layout.
Changes: Reading-view table width
Layer / File(s)
Summary
Minimum room and regression coverage crates/layout/src/table.rs, crates/layout/src/tests.rs
table_frame now keeps room of at least half the fitted table width, capped by available width and with a 1-point minimum. Tests check ordinary and excessive indentation in Reading view for LTR and RTL, and confirm print layout retains the authored indent and table width.
Issue 6604 concerns how table_frame calculates room for indented tables. This change modifies that calculation, but whether it addresses the issue’s auto-width table behavior is not established.
Suggested reviewers:benandez, vangel76
Merge Risk: Minimal · up to 14111
Tables with a very large indent in Read Mode should now keep a readable width instead of shrinking to 1 pt. Regression tests cover both writing directions and Print Layout, and no merge-blocking risk was identified.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title names the fix and the affected area: indented tables in Read Mode. It matches the main change, which reserves minimum table width so tables stay readable when the indent exceeds the reading …
Linked Issues check
[#8063] The issue asks that a table indented past the reading column stay readable in Read Mode. Its reported case is a 4-column table with a 400 pt indent in a column about 360 pt wide. The current f…
Out of Scope Changes check
The changes are a small edit to table_frame in crates/layout/src/table.rs (+2/-1) and one regression test in crates/layout/src/tests.rs (+37). Both connect directly to #8063: the code changes the room…
Full details: Title check
Explanation
The title names the fix and the affected area: indented tables in Read Mode. It matches the main change, which reserves minimum table width so tables stay readable when the indent exceeds the reading column. The title follows the conventional commit format and cites issue #8063, which the linked objectives describe.
Full details: Linked Issues check
Explanation
[#8063] The issue asks that a table indented past the reading column stay readable in Read Mode. Its reported case is a 4-column table with a 400 pt indent in a column about 360 pt wide. The current fix, per the PR summary of crates/layout/src/table.rs, changes the room calculation in table_frame. In Reading view, room after a positive start offset is now at least half the fitted table width, capped by available width. Before, room was available width minus the offset, with a 1 pt minimum. The existing position clamp then pulls the indent back inside the column with the table still about half its width. The issue offers capping or dropping the indent as an option and says a decision on appearance is needed. The PR records that decision. The added regression test in crates/layout/src/tests.rs covers the reported 400 pt indent, an indent at column - 12 pt, a normal indent, and print-layout preservation of the authored indent, for LTR and RTL. The author reports that the regression fails at 1 pt on the base and passes with the fix. Limits: the code diff could not be read in this review (blob unavailable), so this verdict rests on the PR summary, the AI-generated change summary, and the author's reported test results.
Full details: Out of Scope Changes check
Explanation
The changes are a small edit to table_frame in crates/layout/src/table.rs (+2/-1) and one regression test in crates/layout/src/tests.rs (+37). Both connect directly to #8063: the code changes the room calculation for indented Read Mode tables, and the test checks that behavior. The summary reports no changes to exported or public declarations. No unrelated change is described. The code diff itself could not be read in this review, so this verdict is based on the PR summary and the change summary.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Reviewing files that changed from the base of the PR and between 54f6709 and 1411165.
Files selected for processing: 2
crates/layout/src/table.rs
crates/layout/src/tests.rs
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
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
bugfixFixes something that is broken: wrong result, crash, data loss
2 participants
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.
Fixes #8063.
With a 400 pt indent in the reported viewport, the four-column table was reduced to 1 pt in Read Mode. Reserve at least half of the table width fitted to the reading column. The existing position clamp then reduces the indent in either writing direction.
The regression covers the reported indent, an indent just inside the column edge, a normal indent and the authored indent in Print Layout.
Validation
cargo test --locked -q -p wordcraft-layoutwith development-profile dependency overrides. 843 passed and 2 were already ignored.cargo fmt --all --check,cargo clippy --locked -q -p wordcraft-layout --all-targets -- -D warnings,cargo xtask layersandcargo xtask wasmpassed.Summary by CodeRabbit