Move more template context to the action renderers.
Review Request #14671 — Created Nov. 5, 2025 and updated
In preparation for the final changes in separating actions from their
views, this change pulls out some of the view-specific state from the
actions and sets them in the renderers instead. This includes the
has_parentflag anddom_element_id(which previously required a call
toget_dom_element_id()).
BaseAction.get_dom_element_id()and the JavaScriptActionmodel's
domIDattribute are now both deprecated.There's no good way to shim
domID, as it's an action model attribute
and is fundamentally incompatible with per-view dom IDs. We only use
this ourselves for menus, and it doesn't appear we ever actually do
anything with it anywhere, so we're just scrapping it.
Unit tests pass.
Tested that all actions displayed and worked correctly.
| Summary | ID |
|---|---|
| d96528a2c2f20b7aca85a1cb0594fbe4b8fe1657 |
- Change Summary:
-
Removed the
has_parentcontext variable fromBaseAction.get_extra_context()in favor of that from the renderer. - Commits:
-
Summary ID a8d69a2dfdcee94676208d864983ed0c04b43938 d96528a2c2f20b7aca85a1cb0594fbe4b8fe1657 - Diff:
-
Revision 2 (+200 -204)
Checks run (2 succeeded)
-
-
Your description says this is deprecated, but it's not marked as such, and the renderer is still calling it.
Either we should probably move the actual functionality out of here and actually mark it as deprecated, or change the description.
-
Might be nicer to write this as:
return { **action.get_extra_context(request=request, context=context), 'action': action, 'action_renderer': self, 'attachment_point_id': action.attachment, ... }