Repository navigation
Load the later parts of a view on demand - #738
Merged
Merged
Conversation
andiwand
force-pushed
the
fix/732-page-search
branch
from
October 25, 2026 13:05
a0a4241 to
f7f789d
Compare
andiwand
force-pushed
the
lazy-loading
branch
from
October 25, 2026 13:05
24b7eb1 to
f107d73
Compare
andiwand
force-pushed
the
fix/732-page-search
branch
from
October 25, 2026 13:22
f7f789d to
1ab6bb0
Compare
andiwand
force-pushed
the
lazy-loading
branch
from
October 25, 2026 13:22
f107d73 to
95c6283
Compare
Core 7.6 can write the parts of a view after the first as scripts beside the page, which the page loads when the reader comes near. CoreLoader now turns this on with lazyLoading, and states lazyLayout. An editable render stays whole, so in the app this applies mostly to a pdf: core renders a page only when the reader comes near it. The app reads the DOM in two places, so both now load what they need: - Read aloud reads a pdf page by page. A page that has not loaded is loaded with odr.chunks.show, and read when odr-chunk-filled arrives. If its script never arrives, read aloud skips the page after 30 s. - A print from the page shows a part that has not loaded as empty space. PageView.loadAllChunks loads every part first, and gives up after 30 s. A second print while it loads is ignored. The page search counts the parts that have not loaded from the search index of core, so find needs no change. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JuNa2W75khbpynkiG9iDqF
andiwand
force-pushed
the
lazy-loading
branch
from
October 25, 2026 13:42
95c6283 to
a46fe91
Compare
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.
🤖 Generated with Claude Code
Core 7.6 can write the parts of a view after the first as scripts beside the page. The page loads a script when the reader comes near its part.
CoreLoadernow setslazyLoading = trueand stateslazyLayout = true. An editable render stays whole (level 1), so in the app this applies mostly to a pdf: core renders a page only when the reader comes near it.Changes
The app reads the DOM in two places, so both now load what they need:
.p[data-odr-page]). If a page has not loaded, the app callsodr.chunks.showand reads the page whenodr-chunk-filledarrives. If the script of the page never arrives, read aloud skips the page after 30 s, so it does not stop.PageView.loadAllChunksloads every part first, and gives up after 30 s. A second print while it loads is ignored.The page search counts the hits in the parts that have not loaded from the search index of core, so find needs no change.
Testing (Pixel_6_Pro emulator, Android 12, WebView Chrome 91)
Built against core 7.6.0 locally, because 7.6.1 is not on Maven Central yet.
spotlessApply assembleProDebug assembleLiteDebug testProDebugUnitTestpass.loadAllChunksloads them, one print dialog opens, and the preview shows pages 39 and 40 with their content.