User tests: Successful: Unsuccessful:
Currently, we use a PHP helper to set variants for admin color variables. This PR removes that requirement and uses CSS instead.
Apply PR, compile SCSS and check administration looks the same. Ensure color selectors in admin template style settings still function.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration Templates (admin) NPM Change External Library Composer Change |
Labels |
Added:
?
NPM Resource Changed
?
|
I have tested this item
There is something wrong for me: in Colour Settings, above the Hue bar it says 'Unable to convert HSL value' and the bar is completely white. And the background is white rather than grey-blue.
There is something wrong for me
This needs composer/npm install or downloading the package from the github page. Were you trying to test this with patch tester? (it will never work you need to recompile the SCSS files)
There is something wrong for me
This needs composer/npm install or downloading the package from the github page. Were you trying to test this with patch tester? (it will never work you need to recompile the SCSS files)
I installed patch and then npm ci - I looked at the diff and that seemed enough for testing.
Is this issue present if you open the template style settings and save?
It seems to color field in hue format does not allow the saving of the number defined in the input, only the hex or hsl code of the color it represents?
@chmst @ceford Hopefully ok now
Thank you @dgrammatiko
I have tested this item
Nice one @ciar4n
The colour bar now does contain a colour background but the Home dashboard icons are missing without hover; and some of the Templates: Styles (Administrator) Toolbar buttons disappear on hover. So I guess I can't test this properly with Patchtester + npm ci.
I have tested this item
@brianteeman I think you need to save the template style once as there are no defaults in the XML (might be wrong, its been some time since I tested this)
@dgrammatiko yes thats it. So the PR works but is incomplete
FWIW the fallbacks are wrong, should be:
$wa->usePreset('template.atum.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr'))
->useStyle('template.active.language')
->useStyle('template.user')
->addInlineStyle(':root {
--hue: ' . $matches[1] . ';
--atum-bg-light: ' . $this->params->get('bg-light', '#f0f4fb') . ';
--atum-text-dark: ' . $this->params->get('text-dark', '#495057') . ';
--atum-text-light: ' . $this->params->get('text-light', '#fff') . ';
--atum-link-color: ' . $this->params->get('link-color', '#2a69b8') . ';
--atum-special-color: ' . $this->params->get('special-color', '#001b4c') . ';
--atum-sidebar-link-color: ' . $this->params->get('sidebar-link-color', '#132f53') . ';
}');
@ciar4n can you update the PR?
Im gonna close this for now as I'm working on another pr with this applied. If it doesnt get merged I will re-open this.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-04-07 16:08:46 |
Closed_By | ⇒ | ciar4n |
I have tested this item✅ successfully on 70958d8
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32492.