Complete the support for custom license actions.
Review Request #14509 — Created July 15, 2025 and submitted
Actions are no longer hard-coded client-side, and custom actions no
longer require subclassingRB.LicenseView
.A registered action can now provide
extra_data
, which can be handled
specially by aRB.LicenseView
subclass, andcall_args
, which will be
included in an action call back to the License Provider when clicked.License action handlers can provide new license action updates, just
like a Check Update request, by returninglicense_infos
in the
response. It can also redirect to a URL by providingredirect_urls
.This makes it possible for an action to begin a more involved
license-related flow kicked off by the License Provider and going
through other servers or URLs.Since actions are more dynamic now, we no longer hard-code the Manage
License and Upload License actions withinRB.LicenseView
. Instead,
BaseLicenseProvider.get_license_actions()
now registers these by
default, and subclasses can override them or reposition them.Since the Upload License action is special,
RB.LicenseView
still needs
to handle it specially. This is now done through
RB.LicenseView.actionBuilders
, which is a mapping of action IDs to
custom builder functions. The Upload License handler is registered in
this mapping.
Unit tests pass.
Registered some custom actions and verified that clicking them triggered
a call handled the License Provider. Also verified that thelicense_infos
andredirect_url
results worked.
Summary | ID |
---|---|
64100d85ff645b637c7139376f1e3b6a6f04f7bd |
- Change Summary:
-
Action serialization now leaves out optional attributes unless specified.
- Commits:
-
Summary ID b97389a03df013fee680782e02e4439fd652409e 43c8d273d77ad9bb4f658e63d12474caa7ec104e
Checks run (2 succeeded)
- Change Summary:
-
Fixed the docstring for
get_license_actions()
to mention the new behavior. - Commits:
-
Summary ID 43c8d273d77ad9bb4f658e63d12474caa7ec104e 8390ee99f3fbf397013266fb64dda2c397b16a19
Checks run (2 succeeded)
- Change Summary:
-
Fixed an incorrect typing import.
- Commits:
-
Summary ID 8390ee99f3fbf397013266fb64dda2c397b16a19 e6cc1ff8926f14fe789830dbd4555631c28bfc3c
Checks run (2 succeeded)
- Change Summary:
-
- Added default error handling for action buttons.
- Added missing "Args" docs.
- Made
buildUploadLicenseActionButton
private, and prefixed with_
.
- Commits:
-
Summary ID e6cc1ff8926f14fe789830dbd4555631c28bfc3c 64100d85ff645b637c7139376f1e3b6a6f04f7bd