Skip to content

feat: name the column and the cell text when a row is too tall for the page - #50

Merged
billdenney merged 2 commits into
mainfrom
fix/row-overflow-names-column
Oct 4, 2026
Merged

billdenney merged 2 commits into
mainfrom
fix/row-overflow-names-column

Conversation

@billdenney

Copy link
Copy Markdown
Member

Fix #44

Summary

  • The error for a row that wraps taller than the page content height used to name only the row. It now also names the column holding the row's tallest cell (the same bottleneck column the row-overflow retry loop uses) and quotes the first 40 characters of that cell's text, formatted as the table draws it (a missing value shows the table's na_string), with line breaks shown as spaces and "..." after a longer text, so the row can be found in a deeply nested table. The width messages already named the column. This resolves writetfl issue 44 ("When data cannot fit onto the page, give a clear indication of what data causes it").
  • The error has class writetfl_error_row_too_tall; under overflow_action = "warn" the warning has class writetfl_warning_row_too_tall with the same message. paginate_rows() gains an na_string argument for the formatting.
  • Design notes: D-56 in design/DECISIONS.md and a line under paginate_rows() in design/ARCHITECTURE.md; the troubleshooting vignette shows the new message.

Tests

  • The 40-character truncation pinned exactly (boundary, multibyte characters, line breaks including CRLF at the boundary, NA with several na_string values, factors, list cells, and equality with the drawn cell text).
  • export_tfl() of a table with one long cell on a short page errors, and warns under overflow_action = "warn", with the row, the column name and the text prefix in the message and the new classes; the width-overflow conditions keep no class.
  • paginate_rows() picks the tallest wrap-eligible column of the overflowing row even when a wrap-ineligible column is taller.

🤖 Generated with Claude Code

billdenney and others added 2 commits October 4, 2026 12:59
…e page

The row-overflow message now names the column holding the row's tallest cell
and quotes the first 40 characters of that cell (line breaks as spaces, an
ellipsis after a longer text), as the width messages already name the column.
The error has class writetfl_error_row_too_tall and the overflow_action =
"warn" warning writetfl_warning_row_too_tall.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… edge cases

The cell prefix goes through the same formatting the table is drawn with, so
a missing cell reads as the table's na_string and a list cell as it is drawn.
The troubleshooting vignette shows the new message, and tests pin ties,
multibyte text, line breaks at the limit, factors, list cells and that the
width-overflow conditions carry no row-too-tall class.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@billdenney
billdenney merged commit d7b7c46 into main Oct 4, 2026
9 checks passed
@billdenney
billdenney deleted the fix/row-overflow-names-column branch October 4, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When data cannot fit onto the page, give a clear indication of what data causes it

1 participant