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

Migrate Site Editor menu item to Theme Editor #26890

Closed
wants to merge 2 commits into from

Conversation

jameskoster
Copy link
Contributor

In a recent change we updated the Appearance > Widgets menu item to link to the new block-based widget management view. In this PR I am proposing we take a similar approach with the Appearance > Theme Editor item.

The "Site Editor" that we are building – at this stage – is essentially a block-based modernisation of the currently code-based Theme Editor. It enables users to edit their templates and styles (when Global Styles comes online).

It is not 100% clear whether detailed content editing will ever occur here, so calling this environment a "Site Editor" is a little misleading. I suspect that what many expect of the "Site Editor" is actually what the content editor will become, once we load the full template on the canvas in that environment. Initial work has begun on that.

Before:

Screenshot 2020-11-11 at 12 19 03

After:

Screenshot 2020-11-11 at 12 18 14

@github-actions
Copy link

github-actions bot commented Nov 11, 2020

Size Change: 0 B

Total Size: 1.19 MB

ℹ️ View Unchanged
Filename Size Change
build/a11y/index.js 1.14 kB 0 B
build/annotations/index.js 3.77 kB 0 B
build/api-fetch/index.js 3.42 kB 0 B
build/autop/index.js 2.84 kB 0 B
build/blob/index.js 664 B 0 B
build/block-directory/index.js 8.71 kB 0 B
build/block-directory/style-rtl.css 943 B 0 B
build/block-directory/style.css 942 B 0 B
build/block-editor/index.js 133 kB 0 B
build/block-editor/style-rtl.css 11.1 kB 0 B
build/block-editor/style.css 11.1 kB 0 B
build/block-library/editor-rtl.css 8.91 kB 0 B
build/block-library/editor.css 8.91 kB 0 B
build/block-library/index.js 147 kB 0 B
build/block-library/style-rtl.css 8.1 kB 0 B
build/block-library/style.css 8.1 kB 0 B
build/block-library/theme-rtl.css 792 B 0 B
build/block-library/theme.css 793 B 0 B
build/block-serialization-default-parser/index.js 1.87 kB 0 B
build/block-serialization-spec-parser/index.js 3.06 kB 0 B
build/blocks/index.js 48 kB 0 B
build/components/index.js 171 kB 0 B
build/components/style-rtl.css 15.3 kB 0 B
build/components/style.css 15.3 kB 0 B
build/compose/index.js 9.9 kB 0 B
build/core-data/index.js 14.8 kB 0 B
build/data-controls/index.js 821 B 0 B
build/data/index.js 8.74 kB 0 B
build/date/index.js 11.2 kB 0 B
build/deprecated/index.js 768 B 0 B
build/dom-ready/index.js 571 B 0 B
build/dom/index.js 4.92 kB 0 B
build/edit-navigation/index.js 11.1 kB 0 B
build/edit-navigation/style-rtl.css 881 B 0 B
build/edit-navigation/style.css 885 B 0 B
build/edit-post/index.js 306 kB 0 B
build/edit-post/style-rtl.css 6.43 kB 0 B
build/edit-post/style.css 6.42 kB 0 B
build/edit-site/index.js 23.2 kB 0 B
build/edit-site/style-rtl.css 3.98 kB 0 B
build/edit-site/style.css 3.98 kB 0 B
build/edit-widgets/index.js 26.3 kB 0 B
build/edit-widgets/style-rtl.css 3.16 kB 0 B
build/edit-widgets/style.css 3.16 kB 0 B
build/editor/editor-styles-rtl.css 476 B 0 B
build/editor/editor-styles.css 478 B 0 B
build/editor/index.js 42.5 kB 0 B
build/editor/style-rtl.css 3.85 kB 0 B
build/editor/style.css 3.85 kB 0 B
build/element/index.js 4.62 kB 0 B
build/escape-html/index.js 735 B 0 B
build/format-library/index.js 6.86 kB 0 B
build/format-library/style-rtl.css 547 B 0 B
build/format-library/style.css 548 B 0 B
build/hooks/index.js 2.16 kB 0 B
build/html-entities/index.js 623 B 0 B
build/i18n/index.js 3.57 kB 0 B
build/is-shallow-equal/index.js 713 B 0 B
build/keyboard-shortcuts/index.js 2.52 kB 0 B
build/keycodes/index.js 1.94 kB 0 B
build/list-reusable-blocks/index.js 3.1 kB 0 B
build/list-reusable-blocks/style-rtl.css 476 B 0 B
build/list-reusable-blocks/style.css 476 B 0 B
build/media-utils/index.js 5.32 kB 0 B
build/notices/index.js 1.79 kB 0 B
build/nux/index.js 3.4 kB 0 B
build/nux/style-rtl.css 671 B 0 B
build/nux/style.css 668 B 0 B
build/plugins/index.js 2.56 kB 0 B
build/primitives/index.js 1.43 kB 0 B
build/priority-queue/index.js 790 B 0 B
build/redux-routine/index.js 2.83 kB 0 B
build/reusable-blocks/index.js 3.05 kB 0 B
build/rich-text/index.js 13.3 kB 0 B
build/server-side-render/index.js 2.77 kB 0 B
build/shortcode/index.js 1.69 kB 0 B
build/token-list/index.js 1.27 kB 0 B
build/url/index.js 4.06 kB 0 B
build/viewport/index.js 1.84 kB 0 B
build/warning/index.js 1.14 kB 0 B
build/wordcount/index.js 1.22 kB 0 B

compressed-size-action

@jasmussen
Copy link
Contributor

The change seems fine to me, especially because it's still very beta. It's also an obvious place to look for it.

Minor:

Screenshot 2020-11-13 at 13 30 52

The "beta" is sort of just hanging there — can/should it have a blob around it like it did in the main menu?

@jameskoster
Copy link
Contributor Author

It looks like we've uncovered a bug in cores color schemes :) When the .awaiting-mod is in a sub menu it inherits the hover styles from the parent. With the default theme it works correctly:

Screenshot 2020-11-13 at 12 48 39

@jasmussen
Copy link
Contributor

Awesome. Then it's actually my fault :) — I'll look into it.

@MichaelArestad
Copy link
Contributor

It's a good idea. Definitely a better spot for now.

@Addison-Stavlo
Copy link
Contributor

Im struggling to understand the reasoning behind the name change to "Theme Editor". Its already adapted to customize Template and Template Part CPTs to be used for your site. Creating and editing these aren't necessarily customizing your theme, and are not necessarily done for the purpose of theme building. Similarly, with the removal of widgets and customizer when this is active and the desire for this editor to fill in that functionality it is destined to be more than a 'Theme Editor'.

It is not 100% clear whether detailed content editing will ever occur here, so calling this environment a "Site Editor" is a little misleading.

If I understood @mtias comments in the past, the goal is to build the Site Editor around templates first to support block based theme building and to adapt it towards supporting content editing after that foundational work is in place?

The overall project has been "Full Site Editing", not "Theme Editing". The package has been edit-site, not edit-theme. This change in terminology seems like a large change in how we are viewing the projects scope.

@jameskoster
Copy link
Contributor Author

for this editor to fill in that functionality it is destined to be more than a 'Theme Editor'.

Without wanting to get too far in to the weeds, I do not think that is the case at all for this editor specifically. Rather, this editor is for templates / template parts as you described, and in the (near 🤞) future Global Styles. Those features combined make up the bulk of what a theme is. I did consider calling it "Template Editor" instead, but that does not satisfactorily encompass the Global Styles element.

the goal is to build the Site Editor around templates first to support block based theme building and to adapt it towards supporting content editing after that foundational work is in place?

That is exactly what we're doing. Just change the name "Site Editor" to "Theme Editor" for the reasons described above. Content editing will occur where it does currently, and once we begin rendering the template on the Canvas while doing so, the picture will become a lot clearer I think.

@Addison-Stavlo
Copy link
Contributor

Just change the name "Site Editor" to "Theme Editor" for the reasons described above.

While those reasons do make sense, I still think the term "Site Editor" is more fitting. It can be used to edit aspects of your site such as the title, description, non-theme specific CPTs, etc. While it is mostly geared around the Theme side at the moment, it still seems to make more sense to use a "Site Editor" as a tool to aid in theme building than to use a "Theme Editor" to manage any site specific data.

@youknowriad
Copy link
Contributor

I must say I'm not really convinced by the name change here. When I hear Theme editor, I'd assume the theme files are going to be updated when I save changes and this is not really what this screen is about. Even without the name change, some one raised that he was confused that it didn't touch the files and I believe we should make it more confusing. Also as raised above, we update post content, site content, and any renderend entity basically, so it's not just about templates.

@Copons
Copy link
Contributor

Copons commented Nov 16, 2020

I would avoid replacing the code-based Theme Editor menu item.
Just because we are offering a (eventually) easier way to do things, we shouldn't remove a power user tool.
I have no idea how much the code-based editors (themes and plugins alike) are used IRL, but it has happened to me in the past to hotfix some urgent bugs while working on a proper solution.

As for the name, I've been using variants of "site editing" for like 2 years now, so my opinion is biased and would need to time to adjust.

@jameskoster
Copy link
Contributor Author

When I hear Theme editor, I'd assume the theme files are going to be updated when I save changes and this is not really what this screen is about.

That is a fair, albeit rather technical point. I'm not sure the average user would think this way, or be too worried either way if they did. I think that in general most folks understand that their 'theme' (regardless of whether that is files or database entries) governs how their site looks and is laid out at a high level, both of which are the chief focus of this editor.

we update post content

The feedback I've heard is that editing content in the context of editing a template is confusing. Viewing content (perhaps in a dedicated mode) would be useful, but editing at the same time is overwhelming. In order to walk before we run I also think that we might be better off not allowing post content to be edited here, but that's something to be explored in another issue.

@aristath
Copy link
Member

Hmmm just my personal opinion here: The site editor is what it says: a "site" editor, not a "theme" editor.
It is used to not only edit the appearance but also the structure and content of all pages.
We can use the site editor to build menus, edit templates, change global styles, add blocks-as-widgets, add actual content, we can even build a single-page site without ever visiting any other place in our dashboard.
I don't think it fits under the narrow definition of a theme, it really is a site editor and handles a lot more than just the appearance.
My 2c: It should stay as is, called Site Editor and be a root-level item. It doesn't belong under appearance.

@carolinan
Copy link
Contributor

I don't think theme editor is suitable name, it is the site that is being edited and not the theme files.

The users will not only use this to change theme settings, they may not even think of it as the theme. As they combine
template parts in a way that is similar to how they combine blocks from plugins and block patterns, it is more similar to the current post editor, than it is to a theme editor.

@jameskoster
Copy link
Contributor Author

Closing for now. We can revisit later.

@jameskoster jameskoster closed this Dec 7, 2020
@youknowriad youknowriad deleted the update/site-editor-link branch December 7, 2020 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants