Add a new RB.Product constant for product information.
Review Request #10947 — Created March 10, 2020 and submitted
This introduces
RB.Product
, which contains information on the product
name, version (human-readable and raw version information), release
status, and manual URL. This can be used by the JavaScript codebase for
some purposes (like looking up the manual URL, which was previously
doable with an old constant that's now deprecated), but its main use is
for extensions.Extensions that need to alter behavior client-side based on the version
of Review Board can now do so by readingRB.Product.versionInfo
. This
can be important given the differences between Review Board 3.0 and 4.0,
particularly in the administration UI.The information is generated once per process and then cached in-process
for future lookups.
Loaded a couple pages and verified that
RB.Product
was generated and
contained the correct information.
Description | From | Last Updated |
---|---|---|
Shouldn't these keys start with a lower case letter? They're data, not namespaces. |
david |
- Change Summary:
-
Alphabetized the data being passed to
json_dumps
to help with maintainability. - Commit:
-
72c615a4f2e2031c1915166a51ff163fad190f1ff6b1a5cc8c4819aae2673afd26a461632343b967
Checks run (2 succeeded)
- Change Summary:
-
Changed casing for the new product variables.
- Description:
-
This introduces
RB.Product
, which contains information on the productname, version (human-readable and raw version information), release status, and manual URL. This can be used by the JavaScript codebase for some purposes (like looking up the manual URL, which was previously doable with an old constant that's now deprecated), but its main use is for extensions. Extensions that need to alter behavior client-side based on the version
~ of Review Board can now do so by reading RB.Product.VersionInfo
. This~ of Review Board can now do so by reading RB.Product.versionInfo
. Thiscan be important given the differences between Review Board 3.0 and 4.0, particularly in the administration UI. The information is generated once per process and then cached in-process
for future lookups. - Commit:
-
f6b1a5cc8c4819aae2673afd26a461632343b9672f004a3592f28899667035162cf7a75cf2d93673