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

Adds ColorControl component #19288

Closed

Conversation

ryanwelcher
Copy link
Contributor

@ryanwelcher ryanwelcher commented Dec 21, 2019

Description

Adds ColorControl component. Closes #14378

How has this been tested?

Tests still to be implemented. I have tested this locally on master using the example provided in the README.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR. .

Copy link
Member

@jorgefilipecosta jorgefilipecosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ryanwelcher, thank you for this PR! Currently, we are exporting PanelColorSettings (packages/block-editor/src/components/panel-color-settings/index.js). Would it be possible to provide some details of why PanelColorSettings did not accomplished your needs?

@chrisvanpatten
Copy link
Contributor

@jorgefilipecosta PanelColorSettings provides a palette, right? A ColorControl would be more useful for cases where you aren’t providing a palette.

We’re also using ColorPicker directly in a sidebar (we don’t support defined palettes, it’s all freeform for our editorial teams) so I think this could be very valuable.

Copy link
Contributor

@chrisvanpatten chrisvanpatten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely support this; we started wrapping ColorPicker in a BaseControl ourselves recently so I can see a use for this.

packages/components/src/color-control/README.md Outdated Show resolved Hide resolved
packages/components/src/color-control/README.md Outdated Show resolved Hide resolved
packages/components/src/color-control/README.md Outdated Show resolved Hide resolved
@ryanwelcher
Copy link
Contributor Author

Hi @ryanwelcher, thank you for this PR! Currently, we are exporting PanelColorSettings (packages/block-editor/src/components/panel-color-settings/index.js). Would it be possible to provide some details of why PanelColorSettings did not accomplished your needs?

@jorgefilipecosta I wanted more flexibility for color choice/options.

@ryanwelcher
Copy link
Contributor Author

@chrisvanpatten I've addressed your feedback. Is there anything else I can do to move this forward? cc @jorgefilipecosta

@chrisvanpatten
Copy link
Contributor

Sorry for the delay @ryanwelcher — I'm pretty satisfied with this from a code perspective but I think we'd probably need signoff from a lead on including this component.

I agree on offering it, and I think it makes a ton of sense; I know I'd use it.

@chrisvanpatten
Copy link
Contributor

It might make sense to raise this during tomorrow's #core-editor chat; I think that'd be an appropriate venue to bring it up and ask for reviews.

@youknowriad
Copy link
Contributor

I'm pretty sure I saw a mockup revisiting the color selectors to use a nice color control (related to #18667) cc @jasmussen if you have any idea where to find this.

I wonder if this could be the opportunity to start leveraging those in some blocks.

@jasmussen
Copy link
Contributor

Hi! Not sure if this is helpful, or even necessary for this PR, but thought I'd share a mockups that are being explored as part of #18667:

Screenshot 2020-01-09 at 10 40 22

In this interface, the color picker would hold color swatches, like Figma:

Screenshot 2020-01-09 at 10 42 00

But this is an aspect to explore a bit further as we get to it!

@youknowriad
Copy link
Contributor

It would be cool to add a storybook story to this PR to be able to test the component properly.

@ryanwelcher
Copy link
Contributor Author

@youknowriad I have added stories for the new component.

@youknowriad
Copy link
Contributor

Should we try to implement the proposed UI #19288 (comment) ?

@youknowriad
Copy link
Contributor

Related #19785

Base automatically changed from master to trunk March 1, 2021 15:42
@Mamaduka
Copy link
Member

Hi, @ryanwelcher

Can you share the status of this PR? Can it be closed after the recent ColorPicker refactoring?

@ryanwelcher
Copy link
Contributor Author

I think we can close this out. thanks for the followup!

@ryanwelcher ryanwelcher closed this Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ColorPicker label and help text not showing when set
6 participants