User tests: Successful: Unsuccessful:
Pull Request for Issue #14353 .
Adds buttons to change between hex, rgb, rgba.
Add to protostar templateDetails.xml code below to the xml extension -> config -> fields
and go to settings of that template and then to the advanced tab. There should be new extended color pickers.
<field name="Color1" type="color" label="Color + changeformat" changeformat="true" />
<field name="Color2" type="color" label="Color + keywords" format="hex" keywords="transparent,inherit,initial" />
<field name="Color3" type="color" label="Color + format" format="rgb" />
<field name="Color4" type="color" label="Color" />
keywords
- if you add this attribute to field then you can type to the input keywords that you specify and save it.
format
- you can choose color only from specified format of color.
changeformat
- it enables you to save color in 3 formats rgb
, hex
and rgba
Yes on the page https://docs.joomla.org/Color_form_field_type
changeformat=""
is to show buttons to change format between hex, rgb, rgba.Status | New | ⇒ | Pending |
Category | ⇒ | Layout Libraries JavaScript |
Labels |
Added:
?
|
Are we sure the other formats work in all cases where that field is used?
Otherwise it needs to be opt in based on attributes in the XML definition.
@ciar4n I just extend that with buttons to change between formats and if you want to you could specify one format without buttons like on the picture in description
@Bakual I think It isn't necessary, because i recognize the format from value. Unless you mean to specify one format without change to others ?
Category | Layout Libraries JavaScript | ⇒ | Repository Administration com_admin SQL Postgresql MS SQL com_categories com_contact com_content com_fields |
the reason for the format="" was to allow for transparency! It's important to have the ability to have color: transparent" look @ previous pr's regarding this issue.
@brianteeman something seriously wrong with this pr.. when I look @ the first 2 changes in the commit they are about files that are not part of this pr.
Category | Repository Administration com_admin SQL Postgresql MS SQL com_categories com_contact com_content com_fields | ⇒ | Layout Libraries JavaScript |
I think It isn't necessary, because i recognize the format from value. Unless you mean to specify one format without change to others ?
@jjaracz The reason I ask isn't about the part where the JS reads the value. I fully expect that to be able to deal with the various formats. My concern is the other direction, the one receiving the value set. If the extension expects a HEX value and you pass a RGB one, it may break the extension.
I think you will have to default to HEX only and the extension developer can specify additional supported formats in the XML definition.
@jjaracz should there be !!$color? https://github.com/joomla/joomla-cms/pull/14427/files#diff-c84005990b5f00eea2cc54b543c1fb22R219 Isn't it just !$color ?
Status | Pending | ⇒ | Confirmed |
Rel_Number | 0 | ⇒ | 14427 |
Relation Type | ⇒ | Related to |
Rel_Number | 14427 | ⇒ | 0 |
Priority | Medium | ⇒ | Low |
Can you fix the merge conflicts please, then we should do another round of testing.
Will also need to be tested on sub form fields. Not sure it will work as you haven't delegated the click event
Category | Layout Libraries JavaScript | ⇒ | Layout Libraries JavaScript Front End Templates (site) |
@franz-wohlkoenig
updated ;)
<field type="color" ... keywords="transparent,inherit,initial" />
<field type="color" ... format="rgb" />
This should work :)
@franz-wohlkoenig
Sorry for that, I was thinking that was obvious :)
If this Issue get no Response, it will be closed at 17th September 2017.
Status | Confirmed | ⇒ | Information Required |
Why you want to close it, this is a useful feature, it just lacks of testers.
As there was no Response for 2 month.
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-09-17 06:11:55 |
Closed_By | ⇒ | franz-wohlkoenig |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/14427
This has been closed due to lack of response to the requests above – it can always be reopened.
Status | Closed | ⇒ | Pending |
Closed_Date | 2017-09-17 06:11:55 | ⇒ | |
Closed_By | franz-wohlkoenig | ⇒ | |
Rel_Number | 0 | ⇒ | 14353 |
Reopened as #14353 needs this PR to be merged.
Set to "open" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/14427
@roland-d Maybe this PR is outdated due to new color picker planned for j4 : #14353 (comment)
I have tested this item
# Testing Steps
I have tested this item
Works "partly".
"Good cases" are working, but other cases can be constructed that work unexpectedly
case:
field name="Color1" type="color" label="Color + changeformat" changeformat="true"
format is set to RGBA but color is displayed as HEX
case:
field name="Color3" type="color" label="Color + format" format="rgba"
format is set to "rgba" but it is possible to write hex
I have tested this item
I followed the instructions step by step. In some cases the patch works fine for example by changing the Template Color. At the Field were i can pick a format and pick a color, the colorpicker takes in every situtation the Hex-color-code. And when i pick a color and for example rgba is checked, it put in the hex-color-code. But when I switch to the hex button, i've got an invalid hex code.
So somewere in the code must be a conversion error.
I have tested this item
J3.9.2
Going directly to the "Template colour" and cycling through the options (hex, rgb, rgba), the value #0088cc has been reset to rgba(0, 0, 0, 1) and does not change back, when applying rgb or hex.
The "Background Colour" colour selector does not have hex, rgb or rgba variants available.
I have tested this item
J3.9.2
Going directly to the "Template colour" and cycling through the options (hex, rgb, rgba), the value #0088cc has been reset to rgba(0, 0, 0, 1) and does not change back, when applying rgb or hex.
The "Background Colour" colour selector does not have hex, rgb or rgba variants available.
@brianteeman OK to close this?
@jjaracz thx for your time you have invested into this PR but J3 there will be no new features.
For J4 I'm not sure whats the color picker is but i'm also not sure if this is a feature a user really needs.
It's maybe more confusing an end user if s/he could switch between formats without knowing what this nice values mean.
Anyway I'm closing this for J3, if you like you can look into J4 and maybe can help making the j4 color picker better (or anything else you like to help with).
thx for your investment in Joomla!
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-07-01 21:52:11 |
Closed_By | ⇒ | HLeithner |
sad that this took 2 yrs just to NOT be implemented.
I have tested this item✅ successfully on 5e56bc4
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14427.