huridocs / uwazi

Uwazi is a web-based, open-source solution for building and sharing document collections
http://www.uwazi.io
MIT License
237 stars 79 forks source link

[IX] Left navigation item is not highlighted anymore as the user navigates further down in the hierarchy #6811

Open aphilop opened 4 months ago

aphilop commented 4 months ago

When the user goes to the left navigation menu item "Metadata Extraction", the item is correctly highlighted indicating where the user is currently in. If the user then goes to the review page of an extractor, the menu item "Metadata Extraction" is not highlighted anymore. This seems to be a general issue that happens for each item of the left navigation menu.

1st level

image

2nd level

image
konzz commented 3 months ago

This is happening because of two reasons:

First, the suggestion panel route (settings/metadata_extraction/suggestions) is not a nested route of the metadata extraction (settings/metadata_extraction) its a sibling so it's not considered the same area.

This can be easily fixed but then there is a second problem: described in this GitHub comment using a / at the beginning of the route in the Link may cause this to don't match the routes, the problem is we use a component named I18NLink that adds the language to every link and has a / at the beginning the impact of this change still needs to be investigated.