**WordPress Core: A Call to Reconsider Gutenberg Integration**
The WordPress development team has created ticket #64393, sparking a crucial discussion about how the platform includes Gutenberg in its core. This move is aimed at revisiting the integration process and exploring new approaches.
Historically, when setting up the architecture and dependencies between Gutenberg and Core, it was assumed that Gutenberg was still in its early stages as a post content editor, similar to TinyMCE. This assumption led to the use of npm packages to backport code from the Gutenberg repository into Core. However, this approach has become increasingly outdated.
As the development landscape continues to evolve, so do the needs of WordPress and its core components. The reality is that this initial assumption is no longer valid, and some "hacks" have been employed to accommodate these changes. For instance, during the transition period, additional tools like wp-admin pages and routes were used to facilitate easier iteration and extensibility.
With the upcoming release of WordPress 7.0, a new addition will be made to the Gutenberg repository – a "font library" page in wp-admin. This change is being powered by a new tool called @wordpress/build, which automatically registers WP-Admin pages using routes for easier scalability and extensibility. As this tool continues to grow, it may absorb even more concepts not yet present today, such as blocks, dashboard widgets, or field collections.
The question now arises: how will these changes be backported to Core? Two possible solutions have been proposed:
**Option 1:** A continuation of the current approach, where code is manually backported from Gutenberg to WordPress Core through npm packages. This option would require careful consideration and potential additional "hacks" to accommodate the evolving needs of both components.
**Option 2:** Make Gutenberg a git submodule of WordPress Develop, pinning it to a specific branch that aligns with WP's release branches (wp/*). Then update Core's build tooling to primarily call Gutenberg's. This approach would simplify the integration process and provide an opportunity for streamlining current PHP backports.
While this proposal presents potential solutions to the "routes" problem and simplifies some of the existing code, there are undoubtedly more complexities yet to be discovered in this exploration. However, by taking a closer look at these alternatives, the WordPress development team may uncover new ways to address the evolving needs of their platform.
With ticket #64393 now open for discussion, it will be interesting to see which path WordPress chooses and how it addresses the intricacies involved in integrating Gutenberg into its core. One thing is certain – this conversation marks an essential step towards further innovation in the world of WordPress development.