4Science / dspace-angular

Angular UI for DSpace and DSpace-CRIS. In the dspace-cris-7 branch you can find the extension to support DSpace-CRIS
BSD 3-Clause "New" or "Revised" License
13 stars 28 forks source link

Redirecting page when navigating in cris layout impacts user experience #65

Open floriangantner opened 6 months ago

floriangantner commented 6 months ago

Describe the bug

Navigating on some cris system leads to repetitive reloads of the layout when surfing entities page from referenced entities because the resolved itemurl is hard redirected. This impact the user experience

To Reproduce Steps to reproduce the behavior:

  1. Use some cris system which run 2023.02.00 for example https://tore.tuhh.de/home
  2. Open Person from recent search List
  3. Open referenced OrgUnit
  4. Open referenced Person
  5. Open referenced OrgUnit
  6. The item-page should have been loaded in 3, 4, 5 twice or at least you see some flackering.

Expected behavior We expect the page not to be loaded again when accessing the site with some browser.

Related work The metadata-link-view build the route link using /items/uuid

https://github.com/4Science/dspace-angular/blob/4d707bfa96eaec9b8ffb99e5e469c522fc225f85/src/app/shared/metadata-link-view/metadata-link-view.component.html#L8

The item-page.resolver uses some new behaviour https://github.com/4Science/dspace-angular/commit/0564b8e55a842081cfbca18981254af71d4264c8#

if thisRoute is not itemRoute (e.g. /items/uuid != entitites/sometype/uuid) https://github.com/4Science/dspace-angular/blob/4d707bfa96eaec9b8ffb99e5e469c522fc225f85/src/app/item-page/item-page.resolver.ts#L55

it redirects hard to /entities/sometype/uuid https://github.com/4Science/dspace-angular/blob/4d707bfa96eaec9b8ffb99e5e469c522fc225f85/src/app/item-page/item-page.resolver.ts#L58

Possible Solutions: return the redirect behaviour for browser or change the metadata-link-view component to use the ItemPageRoute.