Frontend: Artifacts: Push page changes to browser history
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem to solve
After navigating through pages of artifacts on the artifacts page, using the browser back button navigates away from the page altogether.
Proposal
Push page changes to the browser history so that the browser back button will navigate back through the pages of artifacts that were viewed.
Technical proposal
- to add each page change as a new entry in the browser history: update the
handlePageChangemethod to callupdateHistorywith the new page param - to trigger an update to the list based on navigation through the browser history:
- add
created/destroyedlifecycle hooks to the component that add/remove an event listener for thepopstateevent - make the listener call a new method that sets
this.pageto the page param from the current url usinggetParameterByName
- add
Here's a commit from another recent implementation for reference: 64e16509
Edited by 🤖 GitLab Bot 🤖