Feature Language Change NPM Resource Changed PR-6.0-dev Pending

User tests: Successful: Unsuccessful:

avatar dgrammatiko
dgrammatiko
19 Mar 2024

Summary of Changes

Refactor the code so:

  • php: layout spits buttons as slotted elements
  • use of :part to style the component internals.
  • component becomes light/dark
  • JS: component now uses the elementInternals so it is an actual form field
  • The client side supports all the colors that a browser could support (hex, rgb, lch, oklab, color(colorspace val1 val2 val3 / alpha)). This requires setting the format to "". All color values are validated client side

B/C considerations:

  • The field layout has changes (the old one WILL NOT WORK)
  • The old field dispatched 2 change events, one on the custom element and another on the select element. There's only one event on the custom element now

Testing Instructions

Paste this:

<field
  name="blabla"
  type="color"
  control="simple"
  format=""
  colors="#000000,rgb(59% 4.79% 75.2% / 0.8),oklch(87% 0.293 207),oklab(79% -0.261 0.088),color(display-p3 0.83 0.19 0.73 / 0.96),#FF0000,lch(56 90.2 154 / 0.88),none"
  default=""
  label="color"
/>

in the templateDetails.xml of the Atum template (after line 51: <fieldset name="colors" label="TPL_ATUM_COLORS_SETTINGS_LABEL">)

Check that the field:

  • saves and respects the value from the PHP side
  • works with the keyboard (enter to go to the select mode, tab to navigate, enter to select)

Actual result BEFORE applying this Pull Request

Expected result AFTER applying this Pull Request

Screen.Recording.2024-03-19.at.6.11.53.PM.mov

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

Unused strings

JFIELD_COLOR_SELECT="Select a colour"
JFIELD_COLOR_TRANSPARENT="No colour, transparent"
JFIELD_COLOR_VALUE="Colour with hexadecimal value of"
avatar dgrammatiko dgrammatiko - open - 19 Mar 2024
avatar dgrammatiko dgrammatiko - change - 19 Mar 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Mar 2024
Category Administration Language & Strings Repository NPM Change JavaScript Layout
avatar dgrammatiko dgrammatiko - change - 19 Mar 2024
Labels Added: Language Change NPM Resource Changed PR-6.0-dev
avatar dgrammatiko dgrammatiko - change - 19 Mar 2024
The description was changed
avatar dgrammatiko dgrammatiko - edited - 19 Mar 2024
a69a2f9 19 Mar 2024 avatar dgrammatiko Redo
avatar joomla-cms-bot joomla-cms-bot - change - 19 Mar 2024
Category Administration Language & Strings Repository NPM Change JavaScript Layout Repository NPM Change JavaScript Layout
avatar dgrammatiko dgrammatiko - change - 19 Mar 2024
The description was changed
avatar dgrammatiko dgrammatiko - edited - 19 Mar 2024
avatar dgrammatiko dgrammatiko - change - 19 Mar 2024
The description was changed
avatar dgrammatiko dgrammatiko - edited - 19 Mar 2024
avatar dgrammatiko dgrammatiko - change - 19 Mar 2024
The description was changed
avatar dgrammatiko dgrammatiko - edited - 19 Mar 2024
avatar dgrammatiko dgrammatiko - change - 20 Mar 2024
Labels Removed: Language Change
avatar dgrammatiko dgrammatiko - change - 20 Mar 2024
The description was changed
avatar dgrammatiko dgrammatiko - edited - 20 Mar 2024
avatar Quy
Quy - comment - 20 Mar 2024

Opening the color picker shifts up the Choose your hue... label slightly.

avatar dgrammatiko
dgrammatiko - comment - 20 Mar 2024

Opening the color picker shifts up the Choose your hue... label slightly.

What's your browser?

avatar Quy
Quy - comment - 20 Mar 2024

Windows Firefox 124.0. It is not an issue with Chrome.

avatar dgrammatiko
dgrammatiko - comment - 20 Mar 2024

@Quy should be fine now

avatar joomla-cms-bot joomla-cms-bot - change - 21 Mar 2024
Category Repository NPM Change JavaScript Layout Administration Language & Strings Repository NPM Change JavaScript Layout
avatar dgrammatiko dgrammatiko - change - 21 Mar 2024
Labels Added: Language Change
avatar dgrammatiko dgrammatiko - change - 21 Mar 2024
The description was changed
avatar dgrammatiko dgrammatiko - edited - 21 Mar 2024
avatar dgrammatiko dgrammatiko - change - 22 Mar 2024
The description was changed
avatar dgrammatiko dgrammatiko - edited - 22 Mar 2024
avatar dgrammatiko dgrammatiko - change - 22 Mar 2024
The description was changed
avatar dgrammatiko dgrammatiko - edited - 22 Mar 2024
avatar dgrammatiko dgrammatiko - change - 22 Mar 2024
The description was changed
avatar dgrammatiko dgrammatiko - edited - 22 Mar 2024
avatar dgrammatiko dgrammatiko - change - 22 Mar 2024
The description was changed
avatar dgrammatiko dgrammatiko - edited - 22 Mar 2024
avatar dgrammatiko
dgrammatiko - comment - 17 May 2024

@laoneo any interest here or should I close this?

avatar laoneo
laoneo - comment - 17 May 2024

I'm surely interested, but not involved anymore in 6.0.

avatar dgrammatiko dgrammatiko - change - 17 May 2024
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2024-05-17 12:23:34
Closed_By dgrammatiko
Labels Added: Feature
avatar dgrammatiko
dgrammatiko - comment - 17 May 2024

Ok, I might reopen this when there's a RM for 6

avatar dgrammatiko dgrammatiko - close - 17 May 2024

Add a Comment

Login with GitHub to post a comment