Project

General

Profile

Actions

Feature #22051

open

Integrate the context and multiselect menu actions

Added by Lisa Knox 3 months ago. Updated about 18 hours ago.

Status:
New
Priority:
Normal
Assigned To:
Category:
Workbench2
Target version:
Story points:
-

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.


Subtasks 1 (1 open0 closed)

Task #22311: ReviewNewStephen SmithActions
Actions #1

Updated by Peter Amstutz 30 days ago

  • Target version set to Development 2024-11-20
Actions #2

Updated by Lisa Knox 21 days 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.

Actions #3

Updated by Lisa Knox 17 days ago

Also, it's probably a good idea to revisit the Documentation for accuracy and build the new model based on that:

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

Actions #4

Updated by Peter Amstutz 14 days ago

  • Assigned To set to Lisa Knox
Actions #5

Updated by Peter Amstutz about 18 hours ago

  • Target version changed from Development 2024-11-20 to Development 2024-12-04
Actions #6

Updated by Peter Amstutz about 18 hours ago

  • Tracker changed from Idea to Feature
Actions

Also available in: Atom PDF