Add flexible placement of actions in attachment points, with options.
Review Request #14675 — Created Nov. 6, 2025 and updated
This is the last piece of the core actions rewrite to enable multiple
views for the same actions.Instead of assigning a single attachment point and parent ID to an
action, zero or more placements can now be assigned. A placement is an
ActionPlacementinstance that sets:
- The attachment point to render into
- An optional parent action ID
- An optional default renderer
- An optional DOM element ID
This enables an action to (for example) be parented to a menu or another
group in one attachment point, and then a button or some other render in
another group.Actions no longer fail to register when a placement fails. That is, if
an action is too deeply nested in one placement, it will still register,
since it can still be used in another (even if registered later via a
future extension hook).At this point, we have 4 core concepts comprising the action system:
Actions, which contains the core metadata and client-side
activation logic.Action renderers, which render the HTML and JavaScript for an action
in a given attachment point.Attachment Points, which are a location in which actions can be
placed, providing default renderers.Placements, which define the Attachment Point configuration in which
an Action would be rendered, and options governing that rendering.
Unit tests pass.
Tested that all actions worked as expected, including with in-progress
changes to consolidate the actions used for Quick Access.
| Summary | ID |
|---|---|
| 8e4203858cddfef3bde0c1a1a60691fe2de0fddd |
| Description | From | Last Updated |
|---|---|---|
|
These need to be added to "Args" |
|
|
|
This is a developer-facing error message that doesn't need localization. |
|
|
|
Can you mark the class as deprecated? |
|
|
|
Leftover debug output. |
|
|
|
'django.utils.translation.gettext as _' imported but unused Column: 1 Error code: F401 |
|
|
|
local variable 'action_id' is assigned to but never used Column: 9 Error code: F841 |
|
- Change Summary:
-
- Updated code affected by parent changes.
- Removed leftover debug output.
- Added missing docs.
- Removed localization for developer-facing strings.
- Marked
DepthLimitExceededErroras deprecated at runtime.
- Commits:
-
Summary ID 1f90054969cc39e180cbdf2dbd6b7c7098bf1522 e28820232b046503a73a73b173f08f6d5992a66b - Diff:
-
Revision 2 (+1678 -470)
- Change Summary:
-
- Removed an unused import.
- Updated merged code to use an existing variable.
- Commits:
-
Summary ID e28820232b046503a73a73b173f08f6d5992a66b 8e4203858cddfef3bde0c1a1a60691fe2de0fddd - Diff:
-
Revision 3 (+1680 -474)