Skip to content

docs: design the chunks of a sheet for lazy loading - #1249

Merged
andiwand merged 2 commits into
mainfrom
docs/sheet-chunks
Oct 24, 2026
Merged

andiwand merged 2 commits into
mainfrom
docs/sheet-chunks

Conversation

@andiwand

@andiwand andiwand commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

Refs #764.

Summary

This adds decision 6 to docs/design/lazy-loading.md: a sheet at level 1. content-visibility has no effect on a tr or a tbody, so a chunk of a sheet is a <table> of its own.

  • Wrapper: a div.odr-sheet takes the attributes that table.odr-sheet states today. Rules of the form .odr-sheet td stay as they are.
  • Ruler: a sticky thead sticks only inside its own table, so the column letters get a sticky table before the chunks. The row labels stay sticky at the left in each chunk.
  • Column widths: every table has table-layout: fixed and the same colgroup. A column that states no width, for example in a csv, sizes by its content today, so each chunk would size it differently. The writer gives such a column the width of its longest text in the first 1000 rows, in ch, from 4 to 60.
  • Chunk boundaries: at most 256 rows or 4096 cells, at least 8 rows, and a chunk ends only where no rowspan is open.
  • Height: each chunk states the summed height of its rows as contain-intrinsic-height: auto. A wrapped row corrects itself on first layout. Safari may lack scroll anchoring, so the page there can move by the error of the estimate.
  • Shapes: a shape hangs from A1, so the first chunk of a sheet with shapes stays near.
  • Scripts: a table lists each read of the rows and of the geometry, and how it works with chunks. This covers the row accessor, the sort, row and column edits, the deferred reflow of a hidden chunk, the selection overlay, the pin through odr.chunks.show, and the formulas.
  • Limits: they stay as they are in this step.

Level 2 of a text file drops out of the order of work. When measured, it gained little over the hidden chunks.

Review fixes

Base automatically changed from feat/pdf-chunks to main October 24, 2026 18:56
andiwand and others added 2 commits October 24, 2026 20:57
`content-visibility` has no effect on a table row, so a chunk of a sheet
is a table of its own (decision 6):

- A `div.odr-sheet` takes the attributes of the sheet.
- The ruler gets a sticky table of its own.
- Every column gets a fixed width. A column that states none gets the
  width of its longest text.
- A chunk ends only where no merge is open.
- Each chunk states the estimated height of its rows.
- The first chunk stays near where shapes hang from A1.

For each script that reads the rows or the geometry, the design states
how it works with chunks. Level 2 of a text file drops out of the order
of work, because it gained little when measured.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017QtawyvLP2SCnoBtnVfFed
The status said that nothing of the design has landed, but #1247 and
#1248 did. Also say how `spreadsheet.js` learns that a chunk became
near: `viewport.js` dispatches an event on it. A change of the class
alone tells no script.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YHNzLmVv1mFWfPitHASucN
@andiwand
andiwand merged commit 2aa7766 into main Oct 24, 2026
27 checks passed
@andiwand
andiwand deleted the docs/sheet-chunks branch October 24, 2026 19:02
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.

1 participant