When setting incorrect hexcode for accent color, buttons vanish.
Add validation for custom color setting.

Issue fork gin-3257977

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

volkerk created an issue. See original summary.

saschaeggi’s picture

Title: Validate custom color user input » Optimise custom color input
Category: Bug report » Feature request

Let's extend this to a feature request to also add an additional pseudo color field which can act as a color picker. This would further enhance the feature. And with that we'll add a HEX validation, too.

Same procedure for Accent/Focus.

chr.fritsch’s picture

chr.fritsch’s picture

Status: Active » Needs review
saschaeggi’s picture

Status: Needs review » Needs work

We'll add the <input type="color" /> field as an additional helper field. As we had it as only color field in the past and the User experience wasn't that great depending on the browser.
So a new helper field which is in sync with the main field. Olivero does the same for it's future color feature.

saschaeggi’s picture

Status: Needs work » Needs review
dieterholvoet’s picture

Status: Needs review » Reviewed & tested by the community

Works well! Tested in latest versions of Chrome, Firefox and Safari on macOS.

dieterholvoet’s picture

Status: Reviewed & tested by the community » Needs work

Never mind, just noticed something: accent_picker and focus_picker are stored in gin.settings config, I don't think that's intentional.

saschaeggi’s picture

@DieterHolvoet good one, no that's not intentional

volkerk’s picture

Status: Needs work » Needs review

saschaeggi’s picture

Status: Needs review » Fixed

Thanks y'all 👏

saschaeggi’s picture

update credit

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.