-
Notifications
You must be signed in to change notification settings - Fork 15
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
[ui2] Browser "back" not working (at least not reliably) #414
Milestone
Comments
gwhitney
added
bug
Something isn't working
ui
Something having to do with the user interface
labels
Aug 23, 2024
This needs an e2e test for sure. |
gwhitney
added a commit
to gwhitney/frontscope
that referenced
this issue
Oct 30, 2024
Prior to this change, the browser 'back' button would always update the URL, but the visualization would typically not change if you were going from one scope URL (`/?name=Blah&...`) to another. This PR remedies the situation by watching for route changes in the Scope view, and reloading the new visualizer and sequence **into** the specimen already being viewed. Implementing this tactic requires the ability to completely change the sequence and visualizer of a specimen, which previously did not exist. The change also enables delaying specimen initialization from Vue setup() time to just before the component is mounted. As a result, the Vue setup is not asynchronous, so the experimental Vue <Suspense> tag is no longer needed. Adds a test that the back button actually took effect, to the existing test that changes a parameter. (The extended test definitely failed in ui2 prior to this PR.) Uses the router to redirect from an empty URL to the last-viewed specimen, rather than the Scope component; this change avoids reloading that specimen when the URL is updated to reflect what specimen is being viewed. Finally, fixes a small previously-existing bug in which the Differences visualizer could never display more terms than were available in its last parameter settings, even if you changed the parameters to make more terms available. Resolves numberscope#414. Given the large number of internal changes to Specimen.ts, please in review do play with a veriety of visualizations to make sure all seems to be working well.
katestange
pushed a commit
that referenced
this issue
Oct 31, 2024
* fix: Make sure browser 'back' button actually updates specimen Prior to this change, the browser 'back' button would always update the URL, but the visualization would typically not change if you were going from one scope URL (`/?name=Blah&...`) to another. This PR remedies the situation by watching for route changes in the Scope view, and reloading the new visualizer and sequence **into** the specimen already being viewed. Implementing this tactic requires the ability to completely change the sequence and visualizer of a specimen, which previously did not exist. The change also enables delaying specimen initialization from Vue setup() time to just before the component is mounted. As a result, the Vue setup is not asynchronous, so the experimental Vue <Suspense> tag is no longer needed. Adds a test that the back button actually took effect, to the existing test that changes a parameter. (The extended test definitely failed in ui2 prior to this PR.) Uses the router to redirect from an empty URL to the last-viewed specimen, rather than the Scope component; this change avoids reloading that specimen when the URL is updated to reflect what specimen is being viewed. Finally, fixes a small previously-existing bug in which the Differences visualizer could never display more terms than were available in its last parameter settings, even if you changed the parameters to make more terms available. Resolves #414. Given the large number of internal changes to Specimen.ts, please in review do play with a veriety of visualizations to make sure all seems to be working well. * fix: Make sure Thumbnails clean up their visualizers
Seems to work in ui2 now due to #484, so closing. |
gwhitney
added a commit
that referenced
this issue
Jan 20, 2025
* fix: Make sure browser 'back' button actually updates specimen Prior to this change, the browser 'back' button would always update the URL, but the visualization would typically not change if you were going from one scope URL (`/?name=Blah&...`) to another. This PR remedies the situation by watching for route changes in the Scope view, and reloading the new visualizer and sequence **into** the specimen already being viewed. Implementing this tactic requires the ability to completely change the sequence and visualizer of a specimen, which previously did not exist. The change also enables delaying specimen initialization from Vue setup() time to just before the component is mounted. As a result, the Vue setup is not asynchronous, so the experimental Vue <Suspense> tag is no longer needed. Adds a test that the back button actually took effect, to the existing test that changes a parameter. (The extended test definitely failed in ui2 prior to this PR.) Uses the router to redirect from an empty URL to the last-viewed specimen, rather than the Scope component; this change avoids reloading that specimen when the URL is updated to reflect what specimen is being viewed. Finally, fixes a small previously-existing bug in which the Differences visualizer could never display more terms than were available in its last parameter settings, even if you changed the parameters to make more terms available. Resolves #414. Given the large number of internal changes to Specimen.ts, please in review do play with a veriety of visualizations to make sure all seems to be working well. * fix: Make sure Thumbnails clean up their visualizers
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To reproduce, at least from the current contents of #406:
What I am observing is that the URL in the browser's URL bar changes back to the one shown above, but the visualization does not return to showing the Ramanujan tau numbers. Hitting the browser reload returns to that visualization. But it should not be necessary to hit reload, the visualization should update automatically when the URL changes.
The text was updated successfully, but these errors were encountered: