Closed leigh-pointer closed 6 months ago
Hi @leigh-pointer , the admin functions are using the /admin page, you need to set the theme of admin page to let it work.
Hi @zyhfish The issues is when a single page has a different theme. There is no way to set the admin theme for a single page. I believe that the framework should manage this.
@leigh-pointer all pages in a site will be rendered using the default Theme defined in the Site Settings by default. The Theme can be overridden at the Page level which affects only that specific page. In your screen recording you are navigating to Edit Page - and if you pay attention to the Url you will notice that Edit Page is on the "Page Management" page (ie. admin/pages) which behaves the same as any other page in Oqtane.
Admin Dashboard, Add Page, and Edit Page are features in the Control Panel - however they are NOT part of the current page - they are distinct pages within a site with their own permission assignments and settings (including theme/container)
I can reproduce the issue...
Issue @leigh-pointer is having is he wants the admin page to override the theme used by the page return url. This would not be correct as the admin pages are set to site default, unless specified otherwise in page settings to override. Current behavior is correct.
So to cure this issue really not many options but it does touch on an enhancement I wanted to include at some point but held back on pushing.
override admin page theme with the last site page theme.
This would be a breaking behavior change as some may expect the default theme for the site as it currently behaves.
Create a new Site Setting in the Appearance section with an additional select drop-down UI control that allows administration of the admin pages theme overriding to use:
Option 3 I wished to add as an enhancement so I can develop admin theme skins independently and without having to change all the pages.
An enhancement like this solution should resolve all known behavior expectations and features available when working with styles.
A separation between administration pages and regular site pages is something I felt the Oqtane Framework could use since conception. I just was waiting for something else to help justify it by another community member.
The feature enhancement may need to be at the page settings appearance level instead of site settings appearance level if not both.
Do you think this would be acceptable @sbwalker?
I feel this is something to consider and worth sharing a little feedback since it relates. I am not trying to go off coarse if I am with my idea shared clearly can help this issue. But I also see some complexities for developing and maintaining this logic which can weigh in on any final decisions around it. Food for thought :)
Cheers!
@thabaum My preference is to keep things simple and not add more options which make things more complicated or harder to maintain in the long term. There are already a lot of options when it comes to themes so I would first want to explore if there is a solution which already exists before adding enhancements. The main complexity when it comes to themes is dealing with their dependencies (ie. CSS and JavaScript) which is currently handled based on the hierarchical relationship and configuration of pages and sites. Introducing exception cases is a slippery slope which I want to avoid.
I believe the "issue" you described above can be summarized as differences in perspective between the different components in the UI. The Control Panel is not a page - it is a component - so it inherits the display characteristics of the current page. The Admin Dashboard is a page - not a component - so it utilizes whatever theme is assigned to that page (which can be inherited from the site). The Admin Dashboard is only available to Administrators - which is why the default configuration is set to use the Default Site Theme - so that it is consistent with the rest of the Admin pages (which are only accessible by Administrators). However the theme for the Admin Dashboard page can be overridden to use whatever theme you want.
@sbwalker I understand the concern with complicating things. Multi-themes is really not supported by Oqtane as it mentions in the warning, but should be on our roadmap possibly as we look for solutions that help make it work with more ease in maintaining if possible.
The differences in the components are due to new pages being rendered which is expected as it should use the theme from the page, so when opening up the admin dashboard you are navigating to either the "Admin" page or the "Page Management" page if you select "Edit".
These are just behaviors described and not an issue as they are expected behaviors I wanted to point out to describe what the current experience is. I did also discover another issue worth reviewing I will create an issue for while investigating this one.
Oqtane Info
Version - 5.1.0 Render Mode - Static Interactivity - Server Database - SQL Server
Describe the bug
When a page or and module enters then Managment dialog, ie Page Settings, Module Settings etc. The pages current Theme is not applied and the Site theme is used.
Expected Behavior
The Management dialog should load the Pages selected theme
Steps To Reproduce
Change a page to a different Theme ie. Blazor Theme
Anything else?