-
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 config()
utility function, use values directly
#31646
Components: remove config()
utility function, use values directly
#31646
Conversation
config
function, use values directlyconfig()
utility function, use values directly
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 looks great, thanks @ciampo!
I made a comment about the changelog entry, but it's not a blocker.
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)). | |||
- `config()` utility function has been removed, in favour of accessing config values directly ([#31646](https://github.com/WordPress/gutenberg/pull/31646)) |
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 don't think we should add an entry here as it's not even touching any user-facing API.
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.
Makes sense! I deleted the entry in f6735f3
Hey @diegohaz , thank you for your review! I also went ahead and rebased to solve some conflicts. Since I don't have repo privileges yet, would you mind merging the PR? Thank you! |
Description
Remove the (redundant)
config()
utility function, and instead access the config values directly. (part of what highlighted in #30503)How 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).