-
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
Add all color palettes to select from editor panel #65148
base: trunk
Are you sure you want to change the base?
Add all color palettes to select from editor panel #65148
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @EddyBoels, @burnuser. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. 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. |
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @AKSHAT2802! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
Thanks for working on this @AKSHAT2802. However, I don't think we should display the default color palette as well, only the theme color palette in addition to any custom options set by the user. Using the Twenty Twenty-Four theme as an example, this is what it should look like.
|
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.
Two notes:
-
I should only see the palettes which I have enabled. If I don't have the default palette enabled via theme.json, then I should not see that palette here.
-
I'd expect the colors in the same order as the color palette elsewhere, with theme colors first, then custom colors. In the screenshot below I'd expect to see my theme colors, then the custom red color:
Hii @richtabor & @ndiego Sample Images 1] Theme palette with custom colors |
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.
I think the default palette should not be disabled all the time, but only when settings.color.defaultPalette
is false
, otherwise it won't match other color palettes. Moreover, the order is "Theme" > "Default" > "Custom":
Current
Expected
Additionally, don't forget to test the inline text highlighting palette in this PR:
packages/block-editor/src/components/color-palette/with-color-context.js
Outdated
Show resolved
Hide resolved
+1 |
…context.js re-add default colours Co-authored-by: Aki Hamano <[email protected]>
Thanks, @t-hamano for the update. |
packages/block-editor/src/components/color-palette/with-color-context.js
Outdated
Show resolved
Hide resolved
…context.js Co-authored-by: Aki Hamano <[email protected]>
Closes: #64857
Closes: #64734
What?
This PR Adds all the available colors in the list of editor color panel ( default, theme, custom ) so that the user can any predefined color in the editor.
Why?
When selecting a color we should have a list of all the predefined options for a user instead of only custom-defined options.
How?
Modified with-color-context.js file to list all the color instead of only custom colors.
Screenshots or screencast
Before
After
Screen.Recording.2024-09-09.at.5.02.51.PM.mov