Add action renderers for sidebars.

Review Request #14716 — Created Nov. 28, 2025 and submitted

Information

Review Board
release-7.1.x

Reviewers

This introduces two new renderers used for sidebars: One for groups
(which recurses into subgroups), and one for items.

The renderers fit into the existing rb-c-sidebar styling. This has
been updated to support subgroups in the sidebar, which appear with a
bold (but not uppercase) header and nested items.

This in preparation for action registration for admin sidebar items,
which will allow extensions to augment the sidebar.

Unit tests pass.

Tested with an upcoming change converting the admin UI to the sidebar.

Summary ID
Add action renderers for sidebars.
This introduces two new renderers used for sidebars: One for groups (which recurses into subgroups), and one for items. The renderers fit into the existing `rb-c-sidebar` styling. This has been updated to support subgroups in the sidebar, which appear with a bold (but not uppercase) header and nested items. This in preparation for action registration for admin sidebar items, which will allow extensions to augment the sidebar.
4c82f5afa2bae7451bc42ddc64462ed237cfe814

Description From Last Updated

Can we add a test to verify that this URL matching works as expected?

daviddavid

Can we prefix these with _ to mark them as internal? Otherwise future linting will complain about missing docstrings. (and/or …

daviddavid

group_action.html defines this as already including {{action_attrs}}. From the unit tests it seems like this starts out empty, but it …

daviddavid

This should be aria-labelledby (no second hyphen)

daviddavid
david
  1. 
      
  2. reviewboard/actions/renderers.py (Diff revision 1)
     
     
     
    Show all issues

    Can we add a test to verify that this URL matching works as expected?

  3. Show all issues

    Can we prefix these with _ to mark them as internal? Otherwise future linting will complain about missing docstrings.

    (and/or we could add docstrings)

  4. Show all issues

    group_action.html defines this as already including {{action_attrs}}. From the unit tests it seems like this starts out empty, but it seems like if anything is actually in there, by including both {{block.super}} and {{action_attrs}}, we'd get duplicate attributes (we actually might already with id=, and assertHTMLEqual's parsing is masking it).

    1. That used to be the case, but the change for template cleanup changes this. Now that's separate by default, and the structure of sidebars necessitates combining the container and action attributes into one place. This was one of the reasons I put together that change before.

      Testing this, we end up nuking id.

  5. Show all issues

    This should be aria-labelledby (no second hyphen)

  6. 
      
chipx86
david
  1. Ship It!
  2. 
      
maubin
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-7.1.x (d5fc926)