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

[reader] Add Ajax-based navigation #415

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

[reader] Add Ajax-based navigation #415

wants to merge 11 commits into from

Conversation

akprasad
Copy link
Contributor

@akprasad akprasad commented Oct 8, 2022

This modifies the reader to fetch section data with Ajax instead of a full-page request.

Pros:

  • UI state is retained across sections. For example, an open sidebar persists across sections.

Cons:

  • There's sometimes a flicker while JS content is rendering. I tried to minimize this by writing JSON data before the non-JS text data.
  • Scroll position isn't retained properly. We track scroll position in the history state, but although setting it in the console works, setting it in the app doesn't. My guess is that the app is setting the scroll position before the main content has rendered.

Test plan: unit tests and clicked around on dev.

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.

None yet

1 participant