-
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 Utils package for Component System #27486
Conversation
Size Change: +242 B (0%) Total Size: 1.2 MB
ℹ️ View Unchanged
|
1519b98
to
965f83d
Compare
Thank goodness! Got the packages all happy now |
I left a quite long comment under the parent issue #27484 (comment) where I propose we postpone work on this PR for now and use the npm package for the time being. Instead, we could focus initially on "Bringing over the Components". I will expand on that on Monday, have a great weekend 👋 |
In the past, we had Based on my previous comment, I would also leave it as a very last task when moving code from the external repository/packages to the Gutenberg repository as switching the strategy from top-bottom integration might help us using more of the existing APIs (as pointed out by @youknowriad in his comments). It all can be discussed individually on PRs. |
@gziolo Thank you for your thoughts and insights!
I'm 💯 down with this plan. I had originally proposed that we add things to Gutenberg because I felt like that was the only option. |
Update: May pause on this as we attempt to use the This PR was helpful though, as it helped highlight some parts of the cc'ing @jorgefilipecosta |
Closing this up! We'll revisit how we can best do this in the future. |
This update adds the core utilities package for the next Component System.
These utilities are shared and used liberally throughout the core Systems as well as the UI within the Component System.
Some utils are duplicates of the ones found in
@wordpress/components
'sutils
directory:https://github.com/WordPress/gutenberg/tree/master/packages/components/src/utils
They actually originated from there.
After this is merged, I can create a PR to consolidate them.
As @youknowriad has pointed out, there are utils that are similar to the ones found in
@wordpress/compose
, notably the hooks.Those can also be consolidated in a later time.