Add default renderers for group actions.

Review Request #14700 — Created Nov. 18, 2025 and updated

Information

Review Board
release-7.1.x

Reviewers

Attachment points and groups both support specifying default renderers
for any actions nested within. This applied to both standard actions and
group actions, which would do the wrong thing for group actions, and
necessitated that group actions always specify their own renderers.

These can now specify the default renderer for any group actions. With
this, an attachment point for a menubar could specify that all group
actions are rendered as menus, and groups in sidebars are rendered as
subsections, as a couple of examples.

As an internal optimization, actions now have an is_action_group
boolean property, which differentiates between an action and an action
group. This avoids the more costly isinstance checks that'd otherwise
need to be done multiple times per action render.

I also noted cases where fallback renderers weren't being used, and
where an detailed menu item action failed to render correctly with an
action lacking an icon. These have been fixed.

Unit tests pass.

Tested that existing actions work as expected.

Tested along with the upcoming addition of sidebar renderers.

Summary ID
Add default renderers for group actions.
Attachment points and groups both support specifying default renderers for any actions nested within. This applied to both standard actions and group actions, which would do the wrong thing for group actions, and necessitated that group actions always specify their own renderers. These can now specify the default renderer for any group actions. With this, an attachment point for a menubar could specify that all group actions are rendered as menus, and groups in sidebars are rendered as subsections, as a couple of examples. As an internal optimization, actions now have an `is_action_group` boolean property, which differentiates between an action and an action group. This avoids the more costly `isinstance` checks that'd otherwise need to be done multiple times per action render. I also noted cases where fallback renderers weren't being used, and where an detailed menu item action failed to render correctly with an action lacking an icon. These have been fixed.
7a279edeaf0730e8c028399fa73ffe61c3f927d3
Description From Last Updated

Just noticed that this class docstring is missing "Version Added"

daviddavid

Given that this is not public API, should we call it _is_action_group?

daviddavid

Can we add the "Instance variables" comment in here?

daviddavid
Checks run (2 succeeded)
flake8 passed.
JSHint passed.
david
  1. 
      
  2. reviewboard/actions/base.py (Diff revision 1)
     
     
    Show all issues

    Just noticed that this class docstring is missing "Version Added"

  3. reviewboard/actions/base.py (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     
    Show all issues

    Given that this is not public API, should we call it _is_action_group?

  4. reviewboard/actions/renderers.py (Diff revision 1)
     
     
    Show all issues

    Can we add the "Instance variables" comment in here?

  5.