Add new dedicated classes for handling action rendering.
Review Request #14659 — Created Oct. 29, 2025 and updated
When actions were first built, we had a one-to-one mapping of action
class to UI representation. This changed with the introduction of the
Quick Access actions, which required duplicating and specializing
actions.We only had basic forms of menu and menu item actions at that time, but
as we adopt actions for more parts of the UI (including page navigation
soon) that can show up in multiple places, we've needed a more flexible
approach.Now, actions provide the metadata and, client-side, activation logic
(implemented in a former change), and rendering is handled by a separate
set of renderer classes. These are responsible for taking a registered
action and turning it into a UI representation server-side. These may be
buttons, menus, menu items, sidebar items, or something specialized for
any part of the UI.Renderers don't need to be registered anywhere. They can be created and
then set as either the default for an action, or passed explicitly
during action rendering, which will yield new HTML/JavaScript for that
action's view.Compatibility with existing action-driven rendering is still provided,
but deprecated and will be removed in Review Board 9. As of this change,
such actions are still using the legacy behavior, in part to aid in
testing this compatibility. These will be updated in another change.This is a precursor to change that will provide defaults for different
areas on a page, which will make it even easier to reuse actions across
a page.
Unit tests passed.
Tested all actions used in the UI, making sure they rendered and
activated correctly.
| Summary | ID |
|---|---|
| be7b9ebac56f069961667eaa280152339068b25a |
- Change Summary:
-
- Fixed the push/pop state when updating template contexts.
- Fixed unit test issues found due to the above fix. Actions are now registered before render in tests.
- Fixed some test suite names.
- Testing Done:
-
+ Unit tests passed.
+ + Tested all actions used in the UI, making sure they rendered and
+ activated correctly. - Commits:
-
Summary ID eddf5de125e22d0fe625e142825869894b71315e a51d8886715bb04a681c3290fd8387eb3f398dde - Diff:
-
Revision 2 (+4002 -148)
Checks run (2 succeeded)
- Change Summary:
-
- Fixed the compatibility shims for old-style actions.
- Pre-populated the registry for the action hooks tests so that the temporary renderer warnings won't affect warning assertions.
- Commits:
-
Summary ID a51d8886715bb04a681c3290fd8387eb3f398dde be7b9ebac56f069961667eaa280152339068b25a - Diff:
-
Revision 3 (+4026 -156)