Problem/Motivation

Originally from #3236324: Move environment definition UI and color module dependency from environment_indicator to environment_indicator_ui

As of #3270899: Remove Color module from core we should discuss if a simple HTML5 color picker form element isn't the better and more lightweight solution, especially for a module which is more or less developer focused. With #3236324: Move environment definition UI and color module dependency from environment_indicator to environment_indicator_ui the dependency on color module becomes even more heavy.

Steps to reproduce

Proposed resolution

Use native HTML5 <input type="color" value="#123456"> instead of color module picker.
You can try it here: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/color

The selector is determined by the browser and OS. For Chrome on Windows it looks like this:
HTML5 color picker

We should also keep in mind, that this is not an "End-user" feature, but a site manager / administrator task. Typically they will have technical knowledge.

Remaining tasks

User interface changes

API changes

Data model changes

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

Anybody created an issue. See original summary.

joelpittet’s picture

Priority: Minor » Normal
Issue tags: +Needs issue summary update, +Needs screenshots

This could use some screenshots of what the HTMl5 color picker vs the color module's (I believe farbtastic IIRC) color picker looks like to help compare.

anybody’s picture

Issue summary: View changes
StatusFileSize
new50.12 KB
anybody’s picture

akalam made their first commit to this issue’s fork.

akalam’s picture

Status: Active » Needs review
StatusFileSize
new125.52 KB

Color module doesn't look to be needed. Here is MR without the color module dependency. In fact, the "color" render element that environment_indicator is using for forms is part of core (not color module) https://git.drupalcode.org/project/drupal/-/blob/9.5.x/core/lib/Drupal/C...

Here is a screenshot where you can see how it looks like with the dependency removed and the color module uninstalled.

joelpittet’s picture

Category: Feature request » Task
Status: Needs review » Reviewed & tested by the community

Sweet thanks @akalam, let's remove it!

e0ipso made their first commit to this issue’s fork.

  • e0ipso committed bed4bd9 on 4.x authored by akalam
    Issue #3284389 by akalam, Anybody, joelpittet: Remove colorpicker...
e0ipso’s picture

Status: Reviewed & tested by the community » Fixed

Thanks all for the contribution!

anybody’s picture

Very cool, thank you all! :)

Status: Fixed » Closed (fixed)

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