-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Enable color palettes with custom color alpha support #30493
base: trunk
Are you sure you want to change the base?
Conversation
The change looks good to me. It looks like checks failed because of the Docker registry, so I restarted them. Update: I just came across this comment from a previous PR that tried to add this feature. Based on it, this PR might not be complete. |
I see that there might be the need for discussion. I could oc write Story and change the doc as well. Other than the PR you posted I just decided an rgba color format. But I do not see where this might be a problem? Also could you forward the issue to someone who could decide that or open the descussion? Since css 4 spec we could also use 8 digit hex codes including alpha information. |
Also to add to the discussion. The colorpicker does the same afaik, return hex values when alpha is disabled and rgba when it is enabled. https://wordpress.github.io/gutenberg/?path=/story/components-colorpicker--alpha-enabled. @youknowriad what is your opinion on this? |
I think that's fine though we might want to document the prop and the behavior properly on the README of the component. |
ColorPicker component already had alpha support. Added a `disableAlpha` prop to the `<ColorPalette>` that passes the prop to the ColorPicker. Fix WordPress#27960 WordPress#13045
2549e0f
to
9d0d491
Compare
@Mamaduka added storybook example and doc. Tests succeed. |
Still waiting for this to be merged, is there a reason why it is still pending reviews? @ajitbohra @chrisvanpatten? |
I'm waiting for this to be merged also. |
Description
<ColorPicker>
component already had alpha support. Added adisableAlpha
prop to the<ColorPalette>
that passes the prop to the<ColorPicker>
. Fix #27960 Fix #13045How has this been tested?
Tested with a custom Block that has a
<ColorPalette>
in its inspector controls anddisableAlpha={ false }
. Also tested core components that have<ColorPalette>
still work.Types of changes
New feature (non-breaking change which adds functionality)
Checklist:
*.native.js
files for terms that need renaming or removal).