Feature #22051
openIntegrate the context and multiselect menu actions
Description
Most of the context menu actions are duplicated in other menus and modified in the multiselect menu. These actions are similar enough that they can be integrated. For example, the "show details" action does exactly the same thing and is implemented in the exact same way in 8 different places, and is implemented slightly differently in another place. This leads to bug-prone code and extra work whenever modifying these actions.
Updated by Peter Amstutz about 2 months ago
- Target version set to Development 2024-11-20
Updated by Lisa Knox about 2 months ago
Currently, there are several sets of actions and filters for them (menuKinds), with a complicated series of if statements to determine which action set to use in each situation. The factors involved in determining which action are the user, the selected resource(s), the permissions the user has on the selected resource(s), and the cluster config.
I suggest that we employ Peter's suggestion instead, making one large set of actions which can be selected from as needed. We could re-use most of the existing menuKinds in principle, but in practice each menuKind would be a set of action names, which could be used to select from (NOT filter) the set of all actions.
I suggest, in place of the complicated switch statement full of ifs and ternaries, we define an object representing the the current values of each piece of state that goes to determine which menuKind gets selected. This object could then be given to a modified switch statement that would simply see if the object matches certain criteria and return the proper menuKind. this would be, at the very least, a vast readability improvement.
Updated by Lisa Knox about 2 months ago
Also, it's probably a good idea to revisit the Documentation for accuracy and build the new model based on that:
- https://doc.arvados.org/v2.7/api/permission-model.html
- Groups_Projects_Ownership_and_Permissions_Specification
For example, in the permission model, no mention is made of the Admin level of permission, which is basically the can_manage level plus the ability to add a resource to the Public Favorites
Updated by Peter Amstutz about 1 month ago
- Target version changed from Development 2024-11-20 to Development 2024-12-04
Updated by Peter Amstutz 17 days ago
- Target version changed from Development 2024-12-04 to Development 2025-01-08