There are a variety of action hooks, which allow injecting clickable actions into various parts of the UI.
reviewboard.extensions.hooks contains the following hooks:
||The bar at the top of a review request (containing “Close”, “Update”, etc.)|
||Like the ReviewRequestActionHook, but limited to the diff viewer page.|
||An action in the page header.|
When instantiating any of these, you can pass a list of dictionaries defining the actions you’d like to insert. These dictionaries have the following fields:
- id: The ID of the action (optional)
- label: The label for the action.
- image: The path to the image used for the icon (optional).
- image_width: The width of the image (optional).
- image_height: The height of the image (optional).
There are also two hooks to provide drop-down menus in the action bars:
||The bar at the top of a review request.|
||The page header.|
These work like the basic ActionHooks, except instead of a url field, they contain an items field which is another list of dictionaries. Only one level of nesting is possible.