Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maybe deprecate @wordpress/editor PanelColor? #10367

Closed
chrisvanpatten opened this issue Oct 5, 2018 · 1 comment · Fixed by #10391
Closed

Maybe deprecate @wordpress/editor PanelColor? #10367

chrisvanpatten opened this issue Oct 5, 2018 · 1 comment · Fixed by #10391
Labels
Needs Technical Feedback Needs testing from a developer perspective. [Package] Editor /packages/editor [Type] Question Questions about the design or development of the editor.

Comments

@chrisvanpatten
Copy link
Contributor

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!

@chrisvanpatten chrisvanpatten added [Type] Question Questions about the design or development of the editor. [Package] Editor /packages/editor Needs Technical Feedback Needs testing from a developer perspective. labels Oct 5, 2018
@chrisvanpatten
Copy link
Contributor Author

Per convo on Slack it sounds like this was intended to be deprecated but was missed. I’ll see if I can work up a PR for this today... would be nice to get the deprecation warning into 4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Technical Feedback Needs testing from a developer perspective. [Package] Editor /packages/editor [Type] Question Questions about the design or development of the editor.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant