WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.41k stars 4.16k forks source link

Rebuild WP Admin to Use Gutenberg Blocks #36115

Open deborah86 opened 2 years ago

deborah86 commented 2 years ago

What problem does this address?

The way to modify WP Admin and Gutenberg are too different.

What is your proposed solution?

The solution is to rebuild WP Admin by only using Gutenberg blocks. This gives developers the option to create Gutenberg blocks for WPAdmin.

priethor commented 1 year ago

Thanks for opening this ticket! There are already plans to revamp wp-admin as part of Phase 3. The scope of this simple request is really big; design and technical explorations breaking down the full scope will follow-up in the next weeks, so let's close this issue in favor of the upcoming explorations.

carlomanf commented 1 year ago

@priethor I don't see enough to be satisfied that this suggestion is captured as part of the phase 3 scope as described so far. The post you linked to only once touches on this suggestion, very briefly, and only in the context of one particular screen:

Look at the current role of the dashboard home and perhaps embrace admin blocks for improving its widget-like personalization.

There is a comment that goes into more depth, but it hasn't been directly addressed by project leadership yet.

priethor commented 1 year ago

The post links here as there is no proposal or exploration yet, being part of phase 3. However, as of today, I'm afraid this issue doesn't provide any answer for those coming from the post, as it's more of a general idea than a proposal.

Everybody is welcome to build on top of this idea; closing the issue doesn't mean it's discarded, but it is currently far from actionable. Let's hope to see what discussion and ideas come from that post and revisit it in the next weeks.

carlomanf commented 1 year ago

To an extent, plugins can already do this if they choose. They can include a block-based file for an admin page, similar to what themes do for templates. The blocks used can be a mix of core blocks and ones that the plugin registers itself. Then the plugin would need to take care of registering the admin page in the usual way and rendering the blocks in the admin page callback.

I guess the main proposal for core would be three-fold:

  1. To handle the admin page registration and block rendering through an API, allowing plugins to merely supply their block markup and a few configuration values.
  2. To provide some useful blocks for admin pages, saving plugins from having to register their own and hence improving consistency between plugins. So far, the focus of core blocks has been on passive material like headings, paragraphs, pictures, query loop etc. Block-based admin pages would obviously need blocks for more interactive elements like input fields, but they could also make use of many existing blocks.
  3. To rewrite core admin pages to be block-based and enabling an easier way to modify them, perhaps similar to how theme templates can be modified.

One interesting question that is raised is the role that the active theme would play in a block-based admin, particularly with regard to its default styles for blocks. Some people might be of the view that the admin should be considered a separate site and should not be subject to styling by the active theme.