• 
      

    Add infrastructure and settings for controlling the Review Board theme.

    Review Request #13724 — Created April 10, 2024 and submitted — Latest diff uploaded

    Information

    Review Board
    release-7.x

    Reviewers

    Review Board 7 introduces the beginnings of theme support. We'll be
    supporting Light, Dark, and System (Auto Light/Dark) themes, but the
    idea is to later allow for the possibility of more flexibility here
    (such as High Contrast and maybe even custom themes).

    Users can make their choice in My Account -> Appearance. The default is
    the traditional Light Mode, with all other modes listed as Beta.
    Eventually, once Dark Mode is stabilized, the plan is to set System as
    the default. For this reason, "default" is a mode of its own, mapping
    internally to the default mode. A siteconfig setting can be specified to
    choose a custom default.

    Internally, this is all backed by a new app module:
    reviewboard.themes. This contains a sub-module,
    reviewboard.themes.ui, which defines a BaseUITheme, each theme
    implementation, and a UIThemeRegistry. These are picked up by the form
    and used to offer selections. The theme classes supply attributes for
    the <html> tag to enable Ink theme selection.

    This is one half of the theme implementation. The second part will
    introduce syntax highlighting themes.

    Unit tests pass.

    Tested all the themes, making sure they applied, set the right
    attributes, and took effect.


    Commits

    Files