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

Remove dependencies to block-editor package in native files within the components package #52692

Open
4 tasks done
fluiddot opened this issue Jul 17, 2023 · 3 comments
Open
4 tasks done
Labels
Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Package] Components /packages/components

Comments

@fluiddot
Copy link
Contributor

fluiddot commented Jul 17, 2023

Description

The following native files (i.e. *.native.js) are importing the @wordpress/block-editor package, however, this package is not included in the package.json of the @wordpress/components package. We should remove these dependencies as their importation could result in undefined, and to avoid circular dependencies since @wordpress/block-editor imports @wordpress/components package

@fluiddot fluiddot added Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Package] Components /packages/components [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues. labels Jul 17, 2023
@derekblank
Copy link
Member

I can update these as part of #56072:

@fluiddot I'm curious if you feel we should just update these block-editor imports to their relative paths as was done here, or if you have an example of a better import path to remove the block-editor dependency.

@fluiddot
Copy link
Contributor Author

@fluiddot I'm curious if you feel we should just update these block-editor imports to their relative paths as was done here, or if you have an example of a better import path to remove the block-editor dependency.

I think it depends on each case. In general, I feel that most of the above-referenced components/tools under the components package could be under the block-editor package.

I noticed that the following items are only imported in the block-editor package, so makes sense to relocate them there:

The other two would need a deeper analysis:

@dcalhoun
Copy link
Member

Noting that this issue relates to #27751.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Package] Components /packages/components
Projects
None yet
Development

No branches or pull requests

4 participants