-
Notifications
You must be signed in to change notification settings - Fork 9
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
Fix random frontend reloads #227
Labels
Milestone
Comments
juliaogris
changed the title
Add session storage for reload bug
Fix random frontend reloads
Dec 13, 2023
juliaogris
added a commit
that referenced
this issue
Dec 30, 2023
Save editor contents to session storage so that accidental browser reloads to not lose the contents. We attempt to reload the session if the URL fragment is empty and the editor saves its content to session on every single session. Issue: #227
juliaogris
added a commit
that referenced
this issue
Dec 30, 2023
Save editor contents to session storage so that accidental browser reloads to not lose the contents. We attempt to reload the session if the URL fragment is empty and the editor saves its content to session on every single session. Issue: #227
juliaogris
added a commit
that referenced
this issue
Dec 30, 2023
Save editor contents to session storage so that accidental browser reloads to not lose the contents. We attempt to reload the session if the URL fragment is empty and the editor saves its content to session on every single session. Issue: #227
juliaogris
added a commit
that referenced
this issue
Dec 30, 2023
Save editor contents to session storage so that accidental browser reloads to not lose the contents. We attempt to reload the session if the URL fragment is empty and the editor saves its content to session on every single session. Issue: #227
juliaogris
added a commit
that referenced
this issue
Jan 1, 2024
Save editor contents to session storage so that accidental browser reloads to not lose the contents. We attempt to reload the session if the URL fragment is empty and the editor saves its content to session on every single session. Issue: #227
juliaogris
added a commit
that referenced
this issue
Jan 1, 2024
Save editor contents to session storage so that accidental browser reloads to not lose the contents. We attempt to reload the session if the URL fragment is empty and the editor saves its content to session on every single session. Issue: #227
juliaogris
added a commit
that referenced
this issue
Jan 1, 2024
Save editor contents to session storage so that accidental browser reloads to not lose the contents. We attempt to reload the session if the URL fragment is empty and the editor saves its content to session on every single session. Issue: #227
juliaogris
added a commit
that referenced
this issue
Jan 1, 2024
Save editor contents to session storage so that accidental browser reloads to not lose the contents. We attempt to reload the session if the URL fragment is empty and the editor saves its content to session on every single session. Issue: #227
juliaogris
added a commit
that referenced
this issue
Jan 1, 2024
Save editor contents to session storage so that accidental browser reloads to not lose the contents. We attempt to reload the session if the URL fragment is empty and the editor saves its content to session on every single session. Issue: #227
juliaogris
added a commit
that referenced
this issue
Jan 2, 2024
Save editor contents to session storage so that accidental browser reloads to not lose the contents. We attempt to reload the session if the URL fragment is empty and the editor saves its content to session on every single session. Remove flicker on slow networks by rearranging editor initialization and initial source code loading: Now the editor only gets initialized when the source code is ready which reduces its empty state. Remove scrollbar flicker in Evy editor on Firefox. In Firefox for `overflow:auto` with overflowing content the scrollbar is briefly showed on load then hidden. Unfortunately we update the contents of the editor twice when found in session storage - once as part of index.html without syntax highlighting, once with syntax highlighting when the editor and evy.wasm are loaded and parsed (a good while later on slow networks without caching). To remove the flicker we add a `.noscrollbar` class during the loading phase that gets removed when the editor is ready. Issue: #227 frontend: Remove flicker on slow networks frontend: Remove scrollbar flicker on Firefox Remove scrollbar flicker in Evy editor on Firefox. This is in response to PR feedback. I'm not sure if I could fully reproduce the issue, because in my case I see two scrollbars flickering briefly. One of them is for the line <pre> which should not have been there in the first place (I believe 😅). The second one seems to be default Firefox behavior: for overflow:auto if there is overflow the scrollbar is briefly showed then hidden. Unfortunately we update the contents so it is showed twice which is not nice. As a workaround we add a .noscrollbar class during the loading process that gets removed when the editor is ready. This removes the first flicker for me on Firefox. Hopefully this also works on Linux.
juliaogris
added a commit
that referenced
this issue
Jan 2, 2024
Save editor contents to session storage so that accidental browser reloads to not lose the contents. We attempt to reload the session if the URL fragment is empty and the editor saves its content to session on every single session. Remove flicker on slow networks by rearranging editor initialization and initial source code loading: Now the editor only gets initialized when the source code is ready which reduces its empty state. Remove scrollbar flicker in Evy editor on Firefox. In Firefox for `overflow:auto` with overflowing content the scrollbar is briefly showed on load then hidden. Unfortunately we update the contents of the editor twice when found in session storage - once as part of index.html without syntax highlighting, once with syntax highlighting when the editor and evy.wasm are loaded and parsed (a good while later on slow networks without caching). To remove the flicker we add a `.noscrollbar` class during the loading phase that gets removed when the editor is ready. Issue: #227
juliaogris
added a commit
that referenced
this issue
Jan 2, 2024
Save editor contents to session storage so that accidental browser reloads to not lose the contents. We attempt to reload the session if the URL fragment is empty and the editor saves its content to session on every single session. In preparatory commits fix up comments and remove unused parameters. Also refactor onHashChange function for clarity and readability and remove URL fragment as soon as contents get edited. Issue: #227 This merges the following commits: * editor: Fix typo and white space * frontend: Fix SVG attribute bug * editor: Remove unused options and parameter types * frontend: Check en_US spelling * frontend: Refactor handleHashChange * frontend: Clear URL fragment on update * frontend: Save editor contents to session frontend/index.css | 7 +- frontend/index.html | 14 +++- frontend/index.js | 131 +++++++++++++++++++++------------ frontend/module/yace-editor.js | 17 +++-- 4 files changed, 111 insertions(+), 58 deletions(-) Pull-Request: #230
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fix random frontend reloads so that code does not get lost after a longer in browser session.
Copying @camh- notes from discord:
The text was updated successfully, but these errors were encountered: