Avoid copying block-library CSS files twice - Option 1#11337
Conversation
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
How are we copying these styles from Gutenberg to Core? |
|
The intent was not to move them to a new location with the build change, but we still need a way to copy them from the built Gutenberg. where is that being done now? |
|
I see that some of what this script was meant to do has now moved to the Gruntfile. I'd love to understand more why this was done. I'd rather we move away from Grunt iteratively, and would prefer a single "copy" script for all the files that we move from Gutenberg build to a specific place in Core. I think that's clearer over random and unclear Grunt plugins. |
Thanks for confirming! I went ahead and committed #11338 in r62103 to resolve this and confirmed that the build server reflected the desired outcome.
Unfortunately, the original changes introduced more questions than were answered and created many more problems than were solved. Apologies that the refinements made since r61438 run counter to your personal preference. It was not at all clear that the desired outcome is to move away from Grunt entirely given that the original r61438 changeset introduced 5 new tasks and moved the handling of the I'll admit, despite having spent over a month working on refining the build script (it took me over a week just to understand all of the moving parts after the changes made before I was confident enough to open pull requests to suggest improvements), I'm still very unclear about what the various motivations behind that changeset actually are and which parts of that commit address each one. Any time a major change to the underlying tooling is made, there must be clearly stated goals, a plan or roadmap when multiple stages are needed, reasonably broad discussions to ensure as many factors are accounted for as possible, and a level of confidence that there's a consensus that the new tool or approach is worth the tradeoffs. While the PR was lengthy and the ticket has had lots of discussion, I still have not seen this clearly addressed. As for the rationale behind behind moving things out of custom scripts into Grunt, the overall goals guiding the decisions made since r61438 are:
Grunt is not perfect by any means. But despite being considered a legacy tool, it still meets the overwhelming majority of the needs for this repository. There have been several discussions in the past to replace Grunt entirely, but those have all targeted Webpack as the replacement (see Core-49423 and Core-43731) and stalled for various reasons. I think this demonstrates that the broader contributing community agrees with you, but a solution that is worth the tradeoffs has not yet risen to the top. I'm going to close the PR out since it has been resolved. But I'm more than happy to continue discussing, whether here or somewhere more visible such as #core-build-test-tools or #core. |
|
Thanks for explaining. It's not about Grunt being a legacy tool or not, it's more about clarity of flows. 1- Checkout Gutenberg Grunt is organized in random chunks without clear logic. With the single copy script the purpose of the tool is clear. I realized you merged 1 and 2 using a build step in Gutenberg so right now it's more 1- Checkout and unzip. |
This removes duplicate block library-related CSS files in favor of the same location as WP 6.9:
wp-includes/blocks.Trac ticket: Core-64933
Use of AI Tools
AI assistance: Yes
Tool(s): Claude
Model(s): Sonnet 4.6
Used for: Creating the initial PR based on a description of the problem.
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.