[PER-10593] Reset page scroll on public gallery navigation#1019
[PER-10593] Reset page scroll on public gallery navigation#1019aasandei-vsp wants to merge 1 commit into
Conversation
When navigating into a sub-folder in a public archive, the page kept the parent view's scroll position so users landed at the bottom of the new sub-folder rather than the top. Reset window scroll to (0, 0) on every NavigationEnd inside PublicComponent so each folder load starts at the top. Issue: PER-10593
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1019 +/- ##
==========================================
+ Coverage 49.88% 50.03% +0.14%
==========================================
Files 348 348
Lines 11501 11501
Branches 1974 1974
==========================================
+ Hits 5737 5754 +17
+ Misses 5576 5560 -16
+ Partials 188 187 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cecilia-donnelly
left a comment
There was a problem hiding this comment.
This didn't work for me. I went to the public view of an archive with a lot of content (locally). I scrolled to the bottom of the front page (local equivalent of https://app.permanent.org/p/archive/03dg-0000) and entered a folder. Then I was still at the bottom of the page inside the folder. I rebuilt the web-app from docker, but maybe there's something else I should do to make sure this is getting picked up?
|
@cecilia-donnelly Hmmm, I deployed it on dev as well and it worked for me, but maybe I fixed it in a different place than the one you/the ticket expects it. The steps I followed:
Please let me know if this is the right place for the fix or if there are different steps that I need to follow. |
cecilia-donnelly
left a comment
There was a problem hiding this comment.
Worked for me on dev so I probably had some problem with local not picking up the changes correctly. 🤷♀️ Sorry for the delay!
QA InstructionsQA Testing Instructions for PR PER-10593: Reset Page Scroll on Public Gallery NavigationSummaryThis PR fixes an issue where navigating into a sub-folder in the public gallery retains the scrollbar position of the parent view, causing users to land at the bottom of the new folder instead of the top. The solution ensures that the browser scroll resets to Test Environment SetupUse the default development environment. Ensure that the following prerequisites are met:
Test Scenarios1. Verify Scroll Reset on Folder Navigation
2. Verify Scroll Retention Upon Page Refresh
3. Verify Scroll Reset on Navigating Back to the Public Gallery
4. Verify Navigation Continuity
5. Verify Functionality Across BrowsersTest the above scenarios in the following browsers to ensure cross-browser compatibility:
Regression RisksThe fix could impact the following areas:
Things to Watch For
Feel free to reach out if you encounter unexpected behavior. Generated by QA Instructions Action |
omnignorant
left a comment
There was a problem hiding this comment.
So, this is mostly working but maybe not on Firefox? But it was mostly working on Firefox.
Here's how I broke it on Firefox:
- Nav here: https://app.dev.permanent.org/p/archive/065t-0000/065t-00uj/325929
- scroll to bottom click on "XXX Chickens Level 2" folder (the XXX is just to force it to the bottom of the page 🤪 )
- I observe no scroll up
|
@omnignorant Hmm, that is really strange. I'm sorry, but I didn't manage to reproduce it. I have tried the exact scenario in Firefox and it worked for me. I used the build on dev that's already using this branch. This is a video of what I have seen: |
When navigating into a sub-folder in a public archive, the page kept the parent view's scroll position so users landed at the bottom of the new sub-folder rather than the top. Reset window scroll to (0, 0) on every NavigationEnd inside PublicComponent so each folder load starts at the top.
Issue: PER-10593