Status report library warnings are disturbing, move library widgets into submodules

Created on 6 June 2024, 22 days ago

Problem/Motivation

Using the Color Field module in most cases means, you decide for one of the provided color pickers. In modern times this might be the HTML5 Color Picker for many cases (as it has no extra (jQuery etc.) dependencies and is supported by all modern browsers).

Of course the other widgets:

  • jQuery Simple Color
  • Spectrum

are also helpful for special or more complex cases.

But in any project where we're using Color Field, the Status Report warnings for these libraries are disturbing and confusing and you have no way to disable them?

So as I think they are becoming an edge-case more and more, you should be able to opt in to these additional widgets, if you want and need them!

Of course that could be a setting, but I think the best and most Drupal-like way would be to have the Color Field base module with the native HTML5 color field.
Additional widgets could then simply be provided by submodules that define their dependencies and their status report warnings.

Steps to reproduce

Install Color Field and always see the warnings for the libraries you may never want to use. No good way to get rid of them.

Proposed resolution

  1. Split out the additional widgets and their status report checks into submodules
  2. Enable the submodules in an update hook (to not break existing installations). New sites have these submodules disabled by default and can opt-in.
  3. Show a note in the update hook that administrators can now uninstall the submodules if they don't use these libraries. (If we're super friendly, we could indicate that the libraries aren't present so it can be assumed that the submodule isn't used!)

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

✨ Feature request
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024