-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
As I experiment with the theme editor more, I realize that there's still a lot of aspects of the theme editing process that haven't been already articulated yet in the theme outline. Since the editor is a remarkable change in WordPress, articulating these decisions, is important to minimize distrust and skepticism, and provide direction to theme developers.
We should still be able to edit theme templates and other theme files through a separate file editor outside of Gutenberg and have those changes immediately reflected in the theme.
You're taking away a long used feature by theme developers and agencies that manage a site's theme by modifying files within a separate file editor (e.g. vs code, sublime, vim) and have those changes immediately visually reflected in their site.
Several use cases that this file-based editing and syncing enables or facilitates:
-
quicker version control of themes (I don't think this can be understated).
-
Automation: By ensuring theme files are file-based and any changes to theme files are immediately applicable to the website; theme changes can be made in a separate environment and they can be quickly deployed to the production website through a variety of means: Gitlab/Github actions, travis-ci, rsync, FTP, etc; without altering the database.
I do this pretty often; for example, tweaking a template php file (e.g. removing a sidebar) on my local environment and then upload template file by FTP; instead of directly editing on production.
One simple use case of what I am asking is to be able to modify a page template that's exactly the same as an existing one, remove the footer, or add sidebar blocks to that template without having to make several clicks through the GUI.
I understand that there are separate audiences for Gutenberg:
one of those audiences are users who aren't comfortable with even basic html and would solely use gutenberg but there are also many users who are more comfortable through separate file based editors.
The flexibility of WordPress is a key reason why WordPress has managed to be relatively attractive to users across various levels of technical ability with differing preferences.
Being able to edit the layout of your website through a GUI like the customizer and widgets screen as well through a separate file editor is one great example.
Related issues: #43395
https://developer.wordpress.org/block-editor/explanations/architecture/full-site-editing-templates/
(speaking personally, not as an CPL employee).