Store and organize action views by attachment point.

Review Request #14663 — Created Oct. 31, 2025 and updated

Information

Review Board
release-7.1.x

Reviewers

ActionView now takes the attachment point that the view is placed in,
for easy lookup and for registration.

The views are no longer stored in one long list. Instead, they're
organized by the attachment point. This will ultimately allow for
multiple views for the same action in different attachment points, and
to enable looking up the correct action within the right attachment
point.

Unit tests passed.

Tested that all actions, including menus and Quick Access actions,
all worked and expected.

Tested that Quick Access actions could be customized.

Summary ID
Store and organize action views by attachment point.
`ActionView` now takes the attachment point that the view is placed in, for easy lookup and for registration. The views are no longer stored in one long list. Instead, they're organized by the attachment point. This will ultimately allow for multiple views for the same action in different attachment points, and to enable looking up the correct action within the right attachment point.
0acd57412d565c59c180330c9250261a7dc23cd2
Description From Last Updated

This needs a "Version Changed" block.

daviddavid

I'm not sure I have all your changes in my head at the same time, so it's possible that this …

daviddavid

This needs to be added to the Args section.

maubinmaubin

It might be nice to fail more gracefully if attachmentPointID is not a valid key.

daviddavid

It might be nice to fail more gracefully if attachmentPointID is not a valid key. Right now the call to …

daviddavid

Should we |escapejs this? I guess there could be a scenario where a malicious action author sets the attachment_point_id to …

maubinmaubin
Checks run (2 succeeded)
flake8 passed.
JSHint passed.
maubin
  1. 
      
  2. Show all issues

    This needs to be added to the Args section.

  3. reviewboard/templates/actions/action.js (Diff revision 1)
     
     
    Show all issues

    Should we |escapejs this? I guess there could be a scenario where a malicious action author sets the attachment_point_id to something hacky.

  4. 
      
david
  1. 
      
  2. Show all issues

    This needs a "Version Changed" block.

  3. reviewboard/static/rb/js/common/views/pageView.ts (Diff revision 1)
     
     
     
     
     
    Show all issues

    I'm not sure I have all your changes in my head at the same time, so it's possible that this is addressed in a different change, but I see that MenuActionView calls page.getActionView() with just the child ID, and there's nothing about that in this change. Is that changed elsewhere?

  4. Show all issues

    It might be nice to fail more gracefully if attachmentPointID is not a valid key.

  5. Show all issues

    It might be nice to fail more gracefully if attachmentPointID is not a valid key. Right now the call to _.filter will probably error out.

  6.