Allow users to configure a Quick Access hotbar for actions.

Review Request #14424 — Created May 4, 2025 and submitted — Latest diff uploaded

Information

Review Board
release-7.1.x

Reviewers

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.

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.

Diff Revision 3

This is not the most recent revision of the diff. The latest diff is revision 4. See what's changed.

orig
1
2
3
4

Commits

First Last Summary ID Author
Allow users to configure a Quick Access hotbar for actions.
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.
7d8e1cfabd572aa79c256a81a074be9c62b8ba14 Christian Hammond
reviewboard/accounts/models.py
reviewboard/accounts/templatetags/accounts.py
reviewboard/accounts/tests/test_template_tags.py
reviewboard/actions/__init__.py
reviewboard/actions/base.py
reviewboard/actions/registry.py
reviewboard/reviews/actions.py
reviewboard/static/rb/css/bundles/common.less
reviewboard/static/rb/css/ui/actions.less
reviewboard/static/rb/css/ui/banners.less
reviewboard/static/rb/js/common/actions/models/actionModel.ts
reviewboard/static/rb/js/common/actions/views/actionView.ts
reviewboard/static/rb/js/common/models/userSessionModel.ts
reviewboard/static/rb/js/common/views/pageView.ts
reviewboard/static/rb/js/reviews/views/reviewRequestActions.ts
reviewboard/static/rb/js/reviews/views/unifiedBannerView.ts
reviewboard/templates/reviews/reviewable_base.html
reviewboard/webapi/resources/session.py
Loading...