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

ColorPicker label and help text not showing when set #14378

Open
Stiofan opened this issue Mar 11, 2019 · 1 comment
Open

ColorPicker label and help text not showing when set #14378

Stiofan opened this issue Mar 11, 2019 · 1 comment
Assignees
Labels
[Package] Components /packages/components [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later [Type] Enhancement A suggestion for improvement.

Comments

@Stiofan
Copy link

Stiofan commented Mar 11, 2019

Describe the bug
the ColorPicker element unlike all other elements does not show a label when set and also the "help" text is not shown either.

To Reproduce
Steps to reproduce the behavior:
This works as text input of type color:
wp.components.TextControl, { label: 'Badge background color:', help: 'Color for the badge background.', value: props.attributes.bg_color, type: 'color', onChange: function ( bg_color ) { props.setAttributes({ bg_color: bg_color } ) } }
This does not, it shows no label or help text at all
wp.components.ColorPicker, { label: 'Badge background color:', help: 'Color for the badge background.', value: props.attributes.bg_color, type: 'color', onChange: function ( bg_color ) { props.setAttributes({ bg_color: bg_color } ) } }

Expected behavior
Show a label and help text if set.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Ubuntu
  • Browser chrome
  • Version 65
    WP 5.1
@swissspidy swissspidy added [Package] Components /packages/components Needs Testing Needs further testing to be confirmed. labels Mar 11, 2019
@youknowriad
Copy link
Contributor

The ColorPicker is not a "control". you can wrap it yourself inside a BaseControl to provide such features, it should be easy enough. We could consider adding a ColorControl component (similar to FormToggle and ToggleControl component)

@youknowriad youknowriad added [Type] Enhancement A suggestion for improvement. [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later and removed Needs Testing Needs further testing to be confirmed. labels Mar 14, 2019
@ryanwelcher ryanwelcher self-assigned this Dec 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants