-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Format-library: Text-color ColorPalette IsRenderedInSidebar #69169
base: trunk
Are you sure you want to change the base?
Format-library: Text-color ColorPalette IsRenderedInSidebar #69169
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
@@ -142,6 +142,7 @@ function ColorPicker( { name, property, value, onChange } ) { | |||
setColors( value, name, colors, { [ property ]: color } ) | |||
); | |||
} } | |||
__experimentalIsRenderedInSidebar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This prop could use better naming, not specific to the location where the component is rendered.
Do you mind adding a small inline comment explaining what it does in this particular case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the review!
Of course. Thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Mamaduka
I added the following comment out, what do you think?
Prevent the text and color picker from overlapping.
What?
Ensure that inline formatting does not cover the text it is set to
Why?
When the inline format color palette is displayed, it may overlap with the
component-color-palette__custom-color-button
, the button that indicates the currently selected color. By adding__experimentalIsRenderedInSidebar
, it will not overlap with this button, and you can adjust the color of the text you are setting while checking it!The sidebar's global style already has
__experimentalIsRenderedInSidebar
set, so the buttons and color picker don't overlap.gutenberg/packages/block-editor/src/components/global-styles/color-panel.js
Line 189 in 0740acc
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
After
after-inline.mp4
Before
before-inline-color.mp4
label:"[Package] Format library" "[Feature] Colors"