Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefetch subpages in advance #1158

Closed
timobrembeck opened this issue Feb 10, 2022 · 1 comment · Fixed by #1250
Closed

Prefetch subpages in advance #1158

timobrembeck opened this issue Feb 10, 2022 · 1 comment · Fixed by #1250
Assignees
Labels
🔨 enhancement This improves an existing feature ⁉️ prio: low Not urgent, can be resolved in the distant future.
Milestone

Comments

@timobrembeck
Copy link
Member

timobrembeck commented Feb 10, 2022

Motivation

In PR #1149, we introduced the dynamic fetching of subpages in the page tree. Everytime the child pages of a parent page are expanded, an ajax request is performed to retrieve the result from the server, which causes the expansion to take a small loading time:

Peek 2022-02-10 13-11

Proposed Solution

It would be cool if this delay could be reduced, e.g. by automatically loading the subpages before the expansion button is clicked (but after the rest of the root pages are rendered completely, it shouldn't slow down the loading time of the initial page tree). We could recursively walk the tree completely or only load n+1 levels depending on which pages are currently expanded.
The subpages should then expand instantly after the button is clicked:

Peek 2022-02-10 13-11-2

Alternatives

Additional Context

There are two tickets that depend on this issue:

@timobrembeck timobrembeck added 💡 feature New feature or request ⁉️ prio: low Not urgent, can be resolved in the distant future. labels Feb 10, 2022
@timobrembeck timobrembeck added this to the Backlog milestone Feb 10, 2022
@david-venhoff
Copy link
Member

david-venhoff commented Feb 19, 2022

When implementing this, #1175 can probably implemented, too.
Right now this is only partially implemented: The empty label only gets shown if a page has no subpages at all, but it should also be shown if e.g. all its subpages are archived.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 enhancement This improves an existing feature ⁉️ prio: low Not urgent, can be resolved in the distant future.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants