Skip to content

Maybe deprecate @wordpress/editor PanelColor? #10367

@chrisvanpatten

Description

@chrisvanpatten

I'm working on some definitive documentation of color palettes in Gutenberg (revising/extending #7906), and in the process noticed that we have two versions of colour inspector panels inside the @wordpress/editor package right now:

PanelColor

  • Code here
  • Has a small CSS float bug w/ the clear button

Screenshot:

edit_page_ tomodomo _wordpress

PanelColorSettings

  • Code here
  • Nicely supports multiple colors
  • No CSS float bug

Screenshot:

edit_page_ tomodomo _wordpress

Consolidate/deprecate?

Overall PanelColorSettings seems superior because of its support for multiple color values and for not having the clear button float issue. Since the two are so similar, does it make sense to deprecate and remove the less-powerful/visually-broken PanelColor and standardize on PanelColorSettings?

PanelColor also wrapped a component of the same name inside @wordpress/components which could also be deprecated/removed.

If desired, PanelColorSettings could also be updated to hide the smaller color name label if only one color "type" is set, which would more closely reflect the current look of PanelColor.

Curious to hear thoughts on this!

cc'ing @jorgefilipecosta since I know he's done a lot of work on color stuff!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs Technical FeedbackNeeds testing from a developer perspective.[Package] Editor/packages/editor[Type] QuestionQuestions about the design or development of the editor.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions