Allow users to configure a Quick Access hotbar for actions.
Review Request #14424 — Created May 4, 2025 and submitted
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 forRB.ActionView
andRB.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.
Summary | ID |
---|---|
191fc4583af2504ac53b782c61ec5706c0597ee2 |
Description | From | Last Updated |
---|---|---|
Can you take a screenshot in mobile mode? |
|
|
What does this look like when the menu isn't open? |
|
|
'reviewboard.accounts.models.User' imported but unused Column: 5 Error code: F401 |
![]() |
|
line too long (81 > 79 characters) Column: 80 Error code: E501 |
![]() |
|
Property getters should just be documented like. attributes. |
|
|
With the goal of reducing diff lines churn, I'd like to start formatting these as: ... SupportAction, SupportMenuAction, ) |
|
|
And here. |
|
|
Swap these? |
|
|
Typo: ofr |
![]() |
|
Since we're deprecating, should we use housekeeping's ClassDeprecatedMixin (or maybe ClassMovedMixin) here and for the other legacy actions. |
![]() |
|
The closing tag doesn't match the opening tag. |
![]() |
- Change Summary:
-
- Removed an unused import.
- Fixed a line length issue.
- Commits:
-
Summary ID b4f13919e43242f8c34c906d95ceba8b569fc376 9bc429eb6e06dfe670216036d39f1d0bc6882fc3 - Diff:
-
Revision 2 (+1102 -102)
Checks run (2 succeeded)
- Change Summary:
-
- Fixed docstrings for the new
Profile.quick_access_actions
property. - Changed formatting for action imports so they're easier to add to.
- Fixed docstrings for the new
- Commits:
-
Summary ID 9bc429eb6e06dfe670216036d39f1d0bc6882fc3 7d8e1cfabd572aa79c256a81a074be9c62b8ba14 - Diff:
-
Revision 3 (+1110 -100)
Checks run (2 succeeded)
- Change Summary:
-
- Fixed a closing tag in an Ink grammer (apparently htm doesn't mind?)
- Fixed a typo in docs.
- Commits:
-
Summary ID 7d8e1cfabd572aa79c256a81a074be9c62b8ba14 191fc4583af2504ac53b782c61ec5706c0597ee2 - Diff:
-
Revision 4 (+1110 -100)