19793: Make browser back button work on nav to PDH 19793-collection-back
authorPeter Amstutz <peter.amstutz@curii.com>
Mon, 14 Aug 2023 20:40:32 +0000 (16:40 -0400)
committerPeter Amstutz <peter.amstutz@curii.com>
Mon, 14 Aug 2023 20:40:32 +0000 (16:40 -0400)
commit940cbe92c1688e52c8741f8cb85bea4c3ced6756
tree62bf7727ef169ef8f6b107345e7629f3476fe397
parentf6f88d9ca9cdeeeebfadcfe999789bfb9f69e5c6
19793: Make browser back button work on nav to PDH

When navigating to a collection by PDH, if there is only one match, it
the portable data hash page automatically directs the user to the
appropriate collection page.  However, if the user pushes the back
button, they go back to portable data hash page which automatically
takes them to the collection page again.  This effectively breaks the
back button.

This fixes the bug by replacing (instead of "pushing") the top of the
location history with the collection page, so that the back button
from the collection page takes the user to their previous page without
revisiting the portable data hash page (so they are not endlessly
redirected).

This commit message is longer than the actual code fix.

Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>
src/store/collections-content-address-panel/collections-content-address-middleware-service.ts