Clicking back after registry search does not refetch results
What does this MR do and why?
This MR updates how we handle window popstate events for registry search pages
- Updates
url_sync
component to emit popstate events - Since vue-router
$route
watch does not work withurl_sync
, updatepersisted_search
to handle popstate events fromurl_sync
instead of vue-router.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
No change in UI
Issue |
---|
Screen_Recording_2023-08-29_at_5.12.16_pm |
How to set up and validate locally
- Follow steps in https://gitlab.com/gitlab-org/ci-cd/package-stage/package/-/wikis/Packages-Tips-&-Tricks#how-to-create-a-new-package-artificially to publish 10 packages for each package format to a project
- Visit
Project > Deploy > Package Registry
& use theFilter results
search bar to filter packages. - Click browser
Back
button to visit previous page, verify that the results are updated.
P.S: You'll probably notice that filter token remains in the search bar. this happens in all pages with gl-filtered-search
when the browser Back
button is clicked. Opened separate MR to fix that fix(GlFilteredSearch): set initial state when v... (gitlab-ui!4177 - merged)
Related to #423516 (closed)
Edited by Rahul Chanila