Skip to content

Route-matching themes aren't respected on first load/refresh #1668

@ybnd

Description

@ybnd

Describe the bug
While applying #1627 to a client repository I noticed that it broke route-matching themes in a way I didn't picked up on before:

  • ThemeService.updateThemeOnRouteChange$ is no longer triggered when a page is first loaded, so the default theme gets used instead.
  • Navigation is not affected

To Reproduce
Steps to reproduce the behavior:

  1. Run a local DSpace instance with the following configuration:
      themes:
       - name: custom
         regex: search
       - name: dspace
  2. Open the app at /home
    • It should use the dspace theme
  3. Navigate to the /search page
    • It should use the custom theme
  4. Refresh the /search page
    • It uses the dspace theme instead of the custom theme

Expected behavior
Route-matching themes should always be used on the matching routes.

Related work

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions