? NPM Resource Changed ? Pending

User tests: Successful: Unsuccessful:

avatar ciar4n
ciar4n
22 Feb 2021

Summary of Changes

Currently, we use a PHP helper to set variants for admin color variables. This PR removes that requirement and uses CSS instead.

Testing Instructions

Apply PR, compile SCSS and check administration looks the same. Ensure color selectors in admin template style settings still function.

avatar ciar4n ciar4n - open - 22 Feb 2021
avatar ciar4n ciar4n - change - 22 Feb 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 22 Feb 2021
Category Administration Templates (admin) NPM Change External Library Composer Change
avatar dgrammatiko dgrammatiko - test_item - 22 Feb 2021 - Tested successfully
avatar dgrammatiko
dgrammatiko - comment - 22 Feb 2021

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.

avatar ciar4n ciar4n - change - 22 Feb 2021
Labels Added: ? NPM Resource Changed ?
avatar ceford ceford - test_item - 23 Feb 2021 - Tested unsuccessfully
avatar ceford
ceford - comment - 23 Feb 2021

I have tested this item ? unsuccessfully on 7280345

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.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32492.

avatar dgrammatiko
dgrammatiko - comment - 23 Feb 2021

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)

avatar ceford
ceford - comment - 23 Feb 2021

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.

avatar chmst
chmst - comment - 23 Feb 2021

Testing the branch directly, win10, firefox. After composer install / npm ci, the dashboard has white icons in quickicons

grafik icons are white

avatar ciar4n
ciar4n - comment - 23 Feb 2021

Is this issue present if you open the template style settings and save?

avatar chmst
chmst - comment - 23 Feb 2021

After setting the values again this is ok. Then I have the same situation as ceford with the hue values, no colour bar is visible and the message "Unable to convert HSL value" occurs after save.

grafik

avatar ciar4n
ciar4n - comment - 25 Feb 2021

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?

avatar ciar4n
ciar4n - comment - 25 Feb 2021

@chmst @ceford Hopefully ok now ?

Thank you @dgrammatiko

avatar dgrammatiko dgrammatiko - test_item - 25 Feb 2021 - Tested successfully
avatar dgrammatiko
dgrammatiko - comment - 25 Feb 2021

I have tested this item successfully on 07260ed

Nice one @ciar4n


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32492.

avatar ceford
ceford - comment - 26 Feb 2021

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.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32492.
avatar brianteeman
brianteeman - comment - 2 Apr 2021

image

image

image

avatar brianteeman brianteeman - test_item - 2 Apr 2021 - Tested unsuccessfully
avatar brianteeman
brianteeman - comment - 2 Apr 2021

I have tested this item ? unsuccessfully on 07260ed


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32492.

avatar dgrammatiko
dgrammatiko - comment - 2 Apr 2021

@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)

avatar brianteeman
brianteeman - comment - 2 Apr 2021

@dgrammatiko yes thats it. So the PR works but is incomplete

avatar dgrammatiko
dgrammatiko - comment - 2 Apr 2021

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?

avatar ciar4n
ciar4n - comment - 7 Apr 2021

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.

avatar ciar4n ciar4n - change - 7 Apr 2021
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2021-04-07 16:08:46
Closed_By ciar4n
avatar ciar4n ciar4n - close - 7 Apr 2021

Add a Comment

Login with GitHub to post a comment