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:
- Run a local DSpace instance with the following configuration:
themes:
- name: custom
regex: search
- name: dspace
- Open the app at
/home
- It should use the
dspace theme
- Navigate to the
/search page
- It should use the
custom theme
- 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
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.To Reproduce
Steps to reproduce the behavior:
/homedspacetheme/searchpagecustomtheme/searchpagedspacetheme instead of thecustomthemeExpected behavior
Route-matching themes should always be used on the matching routes.
Related work