Add context parameter to actions JS data methods.
Review Request #13107 — Created June 14, 2023 and submitted
It turns out that it will be useful to allow the
get_js_*_data
for
actions to have access to the rendering context. This change does that
by introducing some new template tags that call the methods with the
context.This also allows improving the implementation of the menu view a bit,
removing non-rendering actions from the data sent to the JS model,
preventing some warnings about unknown IDs from popping up in the case
that an extension has hidden a menu-item action.
- Implemented a custom action that used the context parameter.
- Used
HideActionHook
to hide a menu item action and saw that I was no
longer getting warnings in the JS console. - Ran js-tests.
Summary | ID |
---|---|
f66baf5442821c071264a66cb56a4bbc49804137 |
Description | From | Last Updated |
---|---|---|
I think the description is meant to say get_js_*_data instead of get_*_model_data. |
maubin | |
line break before binary operator Column: 9 Error code: W503 |
reviewbot | |
Expected a string and instead saw %. Column: 2 Error code: W095 |
reviewbot | |
Expected ':' and instead saw 'load'. Column: 4 Error code: E021 |
reviewbot | |
Expected a JSON value. Column: 9 Error code: E003 |
reviewbot | |
Expected '}' and instead saw 'actions'. Column: 9 Error code: E021 |
reviewbot | |
Unrecoverable syntax error. (10% scanned). Column: 9 Error code: E041 |
reviewbot | |
Should say "Render ths JS view data for an action" |
maubin | |
Expected ':' and instead saw 'load'. Column: 4 Error code: E021 |
reviewbot | |
Expected a JSON value. Column: 9 Error code: E003 |
reviewbot | |
Expected a string and instead saw %. Column: 2 Error code: W095 |
reviewbot | |
Expected '}' and instead saw 'actions'. Column: 9 Error code: E021 |
reviewbot | |
Unrecoverable syntax error. (10% scanned). Column: 9 Error code: E041 |
reviewbot | |
blank line at end of file Column: 1 Error code: W391 |
reviewbot | |
Expected a string and instead saw %. Column: 2 Error code: W095 |
reviewbot | |
Expected ':' and instead saw 'load'. Column: 4 Error code: E021 |
reviewbot | |
Expected a JSON value. Column: 9 Error code: E003 |
reviewbot | |
Expected '}' and instead saw 'actions'. Column: 9 Error code: E021 |
reviewbot | |
Unrecoverable syntax error. (10% scanned). Column: 9 Error code: E041 |
reviewbot |
- Commits:
-
Summary ID 2028a02f8c6884e1f8ca9d279356aec5d28d6293 b1c43b809d0f0f3238b9d3243723b8f51816bd11
Checks run (1 failed, 1 succeeded)
JSHint
- Description:
-
~ It turns out that it will be useful to allow the
get_*_model_data
for~ It turns out that it will be useful to allow the
get_js_*_data
foractions to have access to the rendering context. This change does that by introducing some new template tags that call the methods with the context. This also allows improving the implementation of the menu view a bit,
removing non-rendering actions from the data sent to the JS model, preventing some warnings about unknown IDs from popping up in the case that an extension has hidden a menu-item action. - Commits:
-
Summary ID b1c43b809d0f0f3238b9d3243723b8f51816bd11 f66baf5442821c071264a66cb56a4bbc49804137