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

Improve support for instant loading with keyboard navigation #5743

Merged
merged 5 commits into from
Sep 24, 2023

Conversation

squidfunk
Copy link
Owner

This PR improves instant loading for keyboard navigation. We need to refactor instant loading a bit to support adding and removal of elements in the head when they're not present. This needs to be addressed before merging this PR.

@squidfunk squidfunk linked an issue Jul 22, 2023 that may be closed by this pull request
4 tasks
@vedranmiletic
Copy link
Contributor

We need to refactor instant loading a bit to support adding and removal of elements in the head when they're not present. This needs to be addressed before merging this PR.

Sorry to go on a trajectory a bit, but this is very interesting. For our use case, the custom onion-location meta tag should be updated when navigating from a page to another page. Is there a description of the planned implementation somewhere?

@squidfunk
Copy link
Owner Author

squidfunk commented Jul 26, 2023

@vedranmiletic the instant loading code got a refactor and I took the chance to very thoroughly document how it's done and what the limitations are. Take a look at the source code. If questions remain, please ask them here. We could probably implement a traversal and updating of tags so tags are entirely added and replaced, not only updated.

@filips123
Copy link

This is the list of tags that get updated on instant loading, right?

I think it would be useful to let users extend this list easily (probably in the config file), so if we use overrides/templates to add custom tags, those would be handles as well. Support for adding and removing tags would also be useful when custom tags are added only to specific pages.

@squidfunk
Copy link
Owner Author

Thanks for the suggestion. It's a better idea to deduplicate and update all tags, so there's no configuration necessary, which is exactly what we will do. This will also mean that custom tags are correctly added/removed/replaced.

@squidfunk squidfunk marked this pull request as ready for review September 24, 2023 15:17
@squidfunk
Copy link
Owner Author

@vedranmiletic this PR implements auto-replacement of tags – this should also solve the problem you described ☺️

@squidfunk squidfunk merged commit da57083 into master Sep 24, 2023
4 checks passed
@squidfunk squidfunk deleted the fix/instant-loading branch September 24, 2023 15:19
@vedranmiletic
Copy link
Contributor

@squidfunk that's great, eagerly waiting for the next release!

@squidfunk
Copy link
Owner Author

squidfunk commented Sep 24, 2023

Looks like it's going to be released tomorrow.

@squidfunk
Copy link
Owner Author

Released as part of 9.4.2.

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.

Navigation: instant loading breaks keyboard navigation
3 participants