Repository navigation
virtual rows: a row is laid out once, and its extent is kept with its height - #70
Merged
Merged
Conversation
… height measured_height laid a row out into a document of its own and dropped it, so a row a member sized before drawing it (a pager measuring the page it is about to publish) was laid out again when it painted: on a 235-row Toad scroll-back, 1151 documents for the rows it loaded. RowDocumentDelegate.laid_out is now the one place a final row becomes a document; the measurement and final_document both read it, so the paint reuses what the measurement laid out. laid_out also records how wide the content came out when that is more than the layout width (content that does not wrap, such as a pre block), kept under the same key as the height and dropped with it. row_extent answers it without laying anything out; a row not laid out yet answers the layout width. A member that wants one horizontal range for its rows no longer has to build each row's document inside sizeHint to ask. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016gZLdx92gKjvnNKianjAXG
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.
measured_heightlaid a row out into a document of its own and dropped it, so a row a member sized before drawing it was laid out a second time when it painted.RowDocumentDelegate.laid_outis now the one place a final row becomes a document; the measurement andfinal_documentboth read it.laid_outalso records how wide the content came out when that exceeds the layout width (content that does not wrap), kept with the height and dropped with it.row_extent(key, width)answers it without laying anything out, so a member that wants one horizontal range for its rows does not build each row's document insidesizeHint.Tests: two new ones in
tests/test_virtual_rows.py(a row measured then drawn is laid out once; the extent is recorded at layout, outlives the documents and is dropped by new formatting). The file passes (9).tests/test_virtual_rows_band.pyhas two tests that time out here onmainas well, unchanged by this.🤖 Generated with Claude Code
https://claude.ai/code/session_016gZLdx92gKjvnNKianjAXG