-
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
Components: remove color()
utility function, use values directly
#31661
Components: remove color()
utility function, use values directly
#31661
Conversation
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.
Code looks good and this tests well for me in Storybook 👍
packages/components/CHANGELOG.md
Outdated
@@ -15,6 +15,7 @@ | |||
### Internal | |||
|
|||
- `Flex`, `FlexBlock`, and `FlexItem` components have been re-written from the ground up ([#31297](https://github.com/WordPress/gutenberg/pull/31297)). | |||
- `color()` utility function has been removed, in favour of accessing color values directly ([#31661](https://github.com/WordPress/gutenberg/pull/31661)) |
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.
Nit: we're mixing American and British English when using color
(US) but favour
(UK). I guess we should stick to the American version as it's the one used in web terms.
- `color()` utility function has been removed, in favour of accessing color values directly ([#31661](https://github.com/WordPress/gutenberg/pull/31661)) | |
- `color()` utility function has been removed, in favor of accessing color values directly ([#31661](https://github.com/WordPress/gutenberg/pull/31661)) |
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.
Well spotted! I normally write in British English, and so this happens more often than I'd like 😅
Actually, in light of @diegohaz 's comment on a very similar PR, should I actually just delete this changelog entry?
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.
Yup, agree that changes in non-exposed internals don't need to be documented here 👍
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.
Done in dd4b976
Thank you for your review, @tyxla ! Since I don't have repo privileges yet, would you mind merging this PR? Thank you! |
Sure thing! Thanks for your work here 🙌 |
Description
Remove the
color()
utility function, and instead access the color values directly.This is similar to what has been done in #31646 for the
config()
function, and is part of what highlighted in #30503How has this been tested?
trunk
(e.g. by using Storybook)Screenshots
N/A
Types of changes
Refactor / cleanup
Checklist:
*.native.js
files for terms that need renaming or removal).