ushahidi / platform

Ushahidi Platform API version 3+
http://ushahidi.com
Other
665 stars 502 forks source link

[Outreachy Task Submission] Code Refactoring on the Menu List Links and Non List Link components for the Sidebar. #4896

Closed MugoBrian closed 1 month ago

MugoBrian commented 2 months ago

Issue

While examining the menu-list-non-link component, I noticed a peculiar use of an ngIf condition to display the menuLink. It utilizes a ng-template to showcase all items containing a link (router link) with the condition *ngIf="item.action; else menuLink". However, every item in the menu object has the action key, which seems paradoxical.

On the contrary, a similar situation is observed in the menu-list-link.component.html, where it displays all items containing an action (a clickable function), even though all menu items possess links.

I remember that before the Code Architecture and Maintenance (CAM) was introduced to the sidebar, this condition was established because the menu object comprised items with the action key alongside those lacking it, resulting in a mix of menuLinks and menuActions.