AFP-Medialab / verification-plugin

A verification “Swiss army knife” helping journalists, fact-checkers, and human rights defenders to save time and be more efficient in their fact-checking and debunking tasks on social networks especially when verifying videos and images
23 stars 2 forks source link

Navigation Refactoring #551

Closed Sallaa closed 3 weeks ago

Sallaa commented 3 weeks ago

This pull request introduces (a lot of) refactoring changes regarding the navigation.

The rationale is to have less error-prone code: less hardcoded strings, less arrays all around relying on ids that could break and shift things easily. The new code should be:

So... The first and main change is the ⚠️ suppression of the (infamous) NavBar.jsx ⚠️ file

The UI is now divided as follow:

Screenshot 2024-06-26 at 17 13 18

The current design choice is to get rid of ids and positions in array but use the tools' titles to identify them in redux instead. This allow to get rid of errors where the position in array or id could be wrong, which could introduce odd navigation behaviors, or even make the plugin crash totally.