Allow users to configure a Quick Access hotbar for actions.
Review Request #86 — Created May 30, 2025 and updated
Actions are a powerful feature for defining parts of the UI and for allowing extensions to customize it further. This change builds upon this framework by giving users their own control over which actions they want ready access to. The Unified Banner now defines an area for Quick Access actions. These are chosen from a menu to the right of the bar, and can allow users to place any Quick Access actions there. Quick Access actions are new action classes placed in a `quick-access` attachment point. They're generally buttons (though in theory, menus or other action types could also be placed), and contain some additional state used for `RB.ActionView` and `RB.PageView`. A `QuickAccessActionMixin` helps with defining these actions, and can be mixed in along with another action in order to convert it to a Quick Acccess action. There are currently four Quick Access actions defined: Create Review, Edit Review, Add General Comment, and Ship It. These will allow users to place any or all of these actions at the top of their browser window for easy access. Customization is done through the menu at the right of the bar, presented as a checklist of all available actions. Toggling these actions will put the actions (already technically present in the bar but hidden and disabled) into an enabled state, allowing normal visibility rules to take over. Upon closing the menu, the new list of actions will be saved to the user's settings. This makes customization really easy and fast. In the future, we'll be able to add optional actions for new features, such as a "Ship It and Archive" or similar. Testing Done: Unit tests pass. There's room for more tests to be written, but they'll be handled separately. Tested this with a user without any Quick Access settings, a user with settings, and anonymous users. Tested adding all the actions we currently supply, and verifying that they only showed up if enabled for the user, regardless of any state calculations done in JavaScript. Also verified that those state calculations were reflected properly when actions were enabled. Tested on small browser windows and mobile sizes. There is work that's needed for really optimizing on mobile, but it's beyond the scope of this work. Reviewed at https://reviews.reviewboard.org/r/14424/