? Language Change ? Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
3 Jan 2022

Followup Pull Request for pr #36551 and issue #36548.

Summary of Changes

Adds the layout filter for the color custom field.

Additionally it deprecates the control parameter in favor of the layout one in the color filed to be more inline with the other core form fields.

This should be tested after #36551 is merged.

Testing Instructions

  • Create a color custom field
  • Change the form layout to slider or simple in the options tab
  • Edit an article

Actual result BEFORE applying this Pull Request

Color field is always displayed with the same result.

Expected result AFTER applying this Pull Request

Color field is displayed with different layouts.

avatar laoneo laoneo - open - 3 Jan 2022
avatar laoneo laoneo - change - 3 Jan 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 3 Jan 2022
Category Administration com_fields Language & Strings Templates (admin) Layout Libraries Front End Plugins
avatar laoneo laoneo - change - 6 Jan 2022
Labels Added: Language Change ?
avatar joomla-cms-bot joomla-cms-bot - change - 6 Jan 2022
Category Administration com_fields Language & Strings Templates (admin) Layout Libraries Front End Plugins Administration Language & Strings Templates (admin) Layout Libraries Front End Plugins
avatar laoneo laoneo - change - 7 Jan 2022
The description was changed
avatar laoneo laoneo - edited - 7 Jan 2022
avatar crystalenka
crystalenka - comment - 9 Jan 2022

I have tested this item ? unsuccessfully on 59b08bb

All the layout options work except for the slider. For the slider, it appears, but it doesn't show the hue as expected. I'll add a screenshot in the next comment.


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

avatar crystalenka
crystalenka - comment - 9 Jan 2022

I have tested this item ? unsuccessfully on 59b08bb

All the layout options work except for the slider. For the slider, it appears, but it doesn't show the hue as expected. I'll add a screenshot in the next comment.


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

avatar crystalenka crystalenka - test_item - 9 Jan 2022 - Tested unsuccessfully
avatar crystalenka
crystalenka - comment - 9 Jan 2022

Slider screenshot. There's no color behind it so it looks empty.
Screen Shot 2022-01-09 at 12 30 35


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36553.
avatar crystalenka
crystalenka - comment - 9 Jan 2022

Slider screenshot. There's no color behind it so it looks empty.


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

avatar laoneo
laoneo - comment - 17 Jan 2022

Even as I didn't change something on the JS side, can you rebuild it with npm or download a new build from here? Because on my dev server it worked after a npm ci.

avatar Quy
Quy - comment - 18 Jan 2022

It is reproducible with the prebuilt package.

36553

avatar Quy
Quy - comment - 18 Jan 2022

The linear-gradient values are different.

Fields:
<input type="range" min="0" max="360" class="form-control color-slider" id="hue-slider" data-type="hue" style="background: rgba(0, 0, 0, 0) linear-gradient(90deg, rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255)) repeat scroll 0% 0%; appearance: none;">

Administrator Template Styles:
<input type="range" min="0" max="360" class="form-control color-slider" id="hue-slider" data-type="hue" style="background: rgba(0, 0, 0, 0) linear-gradient(90deg, rgb(83, 19, 19), rgb(83, 19, 19), rgb(83, 38, 19), rgb(83, 57, 19), rgb(83, 77, 19), rgb(70, 83, 19), rgb(51, 83, 19), rgb(32, 83, 19), rgb(19, 83, 25), rgb(19, 83, 45), rgb(19, 83, 64), rgb(19, 83, 83), rgb(19, 64, 83), rgb(19, 45, 83), rgb(19, 25, 83), rgb(32, 19, 83), rgb(51, 19, 83), rgb(70, 19, 83), rgb(83, 19, 77), rgb(83, 19, 57), rgb(83, 19, 38), rgb(83, 19, 19), rgb(83, 19, 19)) repeat scroll 0% 0%; appearance: none;">

avatar laoneo laoneo - change - 8 Apr 2022
Labels Added: ?
avatar laoneo laoneo - change - 8 Apr 2022
Title
[4.1] Use layouts in color field
[4.2] Use layouts in color field
avatar laoneo laoneo - edited - 8 Apr 2022
avatar joomla-cms-bot joomla-cms-bot - change - 8 Apr 2022
Category Administration Language & Strings Templates (admin) Layout Libraries Front End Plugins Unit Tests Administration Language & Strings Templates (admin) Layout Libraries Front End Plugins
avatar laoneo
laoneo - comment - 8 Apr 2022

Found the issue, can you guys test again? Ignore the conflict, will disappear when 4.2 got the commits from 4.1 merged.

avatar Quy
Quy - comment - 13 Apr 2022

Before making a selection:
color-slider-pre

After making a selection and saving:
color-slider-post

avatar laoneo
laoneo - comment - 21 Apr 2022

The slider shows the colors based on the initial color. So when you change it the range changes. Honestly I'm not much into this, perhaps @dgrammatiko can shed here some light why this happens. It is the same when you give it a default color.

avatar brianteeman
brianteeman - comment - 21 Apr 2022

@laoneo I think you are missing what @Quy is saying.

image

avatar laoneo
laoneo - comment - 21 Apr 2022

Don't think so as the color range of the slider is based on the available color. So when you choose one, the range changes. So what I do not understand is how to have a fixed color range which works in all situations.

avatar dgrammatiko
dgrammatiko - comment - 21 Apr 2022

perhaps @dgrammatiko can shed here some light why this happens.

I need to debug it but it seems that the removal of the $control is not right. In the advanced this var controls which type of value should be accepted/outputed (but might be wrong, this is just by reading the code).

About the custom fields and particularly the slider version: it will never work correctly as the JS and the HTML have both IDs hardcoded and you can't really have one ID for multiple fields, will never work (not something you did here and also I had criticised that when this field was introduced but as usual I was ignored)

avatar laoneo
laoneo - comment - 21 Apr 2022

Would be great if you can help me out here.

but as usual I was ignored

Your removed jQuery from core, what did you expect then ?

avatar dgrammatiko
dgrammatiko - comment - 21 Apr 2022

Your removed jQuery from core, what did you expect then

And that's my punishment for keeping the project somewhat competitive, fair enough ?

Joke aside, I'm kinda busy today, I'll try to sneak some time this weekend, unless someone is faster

avatar laoneo laoneo - change - 13 May 2022
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2022-05-13 06:40:11
Closed_By laoneo
Labels Added: ? ?
Removed: ? ?
avatar laoneo laoneo - close - 13 May 2022

Add a Comment

Login with GitHub to post a comment