Motivation
In a decoupled context, it makes sense to use the Gin admin theme for all pages, not just admin pages.
However, this does not suite canvas. For the canvas routes and previews we want a different theme, i.e. stark or lupus_stark.
Proposed resolution
- Build upon the _theme negotiator for routes that we added for forms already
- Add configuration option to select the "Canvas Pages" theme. At /admin/appearance add a fieldset for "Canvas Theme" like we have Administration theme, with theme select.
- Add a lupus_decoupled_canvas sub-module. it shall depend on canvas_extjs + implement the theme changes
- Test coverage: Use kernel test on request/response layer to ensure theme switch works
Issue fork lupus_decoupled-3573944
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
fagoready. we probably should add some usage-docs for canvas in general to the readme also.
Comment #6
fagoWorks well. I figured the feature is missing for forms, we have been using it like this for a while at drunomics already. So while adding the theme-switch feature, let's also add it to forms. The change introduces a new setting in the lupus-decoupled settings form to configure the theme + a basic canvas sub-module for enabling it on canvas editor routes.
For adding better canvas docs, let's add its own issue.
Comment #8
fagoComment #10
fagosee #3577107: Remove theme overrides for form routes, make them canvas only for forms - that part got removed again.