Skip to content
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

Merged
merged 3 commits into from
May 12, 2021
Merged

Components: remove config() utility function, use values directly #31646

merged 3 commits into from
May 12, 2021

Conversation

ciampo
Copy link
Contributor

@ciampo ciampo commented May 10, 2021

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?

  • Make sure that the project builds correctly
  • Make sure that the Spinner and Input components look and behave like on trunk (e.g. by using Storybook)

Screenshots

N/A

Types of changes

Refactor / cleanup

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • N/A I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • N/A I've included developer documentation if appropriate.
  • N/A I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

@ciampo ciampo changed the title Components utils: remove config function, use values directly Components: remove config() utility function, use values directly May 10, 2021
@diegohaz diegohaz self-requested a review May 11, 2021 17:34
Copy link
Member

@diegohaz diegohaz left a 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.

@@ -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))
Copy link
Member

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.

Copy link
Contributor Author

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

@ciampo
Copy link
Contributor Author

ciampo commented May 12, 2021

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!

@diegohaz diegohaz merged commit 2a33806 into WordPress:trunk May 12, 2021
@github-actions github-actions bot added this to the Gutenberg 10.7 milestone May 12, 2021
@ciampo ciampo deleted the refactor/remove-components-utils-config branch May 13, 2021 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants