Skip to content

Backoffice custom theme reset after reload / missing default theme option #19799

@martin-prinz-mw

Description

@martin-prinz-mw

Which Umbraco version are you using?

15

Bug summary

I've added a simple custom theme to Umbraco Backoffice.

It works fine, shows up in the Theme selection in the profile and selecting it also changes appearance as planned. However, I need these slight theming adaptions as a default. As I understood and observed, the selected theme is persisted in localStorage so the user preference survives page reloads. This works fine for the built-in themes, but not for custom ones added.

  1. Do I miss something here, or might this be not yet working as intended?

  2. Also, if there is an option to either extend the default Light theme or mark a custom theme as a new default, this would be very handy to fulfill our customer's requirements.

Specifics

No response

Steps to reproduce

  • created an extension in App_Plugins with an umbraco-package.json
    umbraco-package.json
  // ...
  "extensions": [
    {
      "type": "theme",
      "alias": "my-theme",
      "name": "My Theme",
      "css": "/css/my-theme.css"
    }
]
  • my-theme.css is placed in wwwroot/css/
  • visit backoffice and switch to "My Theme" in user menu.
  • refresh page
  • observe umb-theme-alias: my-theme entry in localStorage being deleted after latest second page refresh
  • observe "Light" theme being applied by default, as localStorage entry is gone

Expected result / actual result

  • Expected umb-theme-alias: my-theme entry in localStorage to be persisted reliably

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions