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

When viewing the posts page, “Edit page” control should open the template #63787

Open
richtabor opened this issue Jul 21, 2024 · 10 comments
Open
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Type] Enhancement A suggestion for improvement.

Comments

@richtabor
Copy link
Member

When the "Reading Settings" > Homepage setting is set to "A static page", its difficult to edit the blog — unless you know to navigate not to the page you've assigned, but the Site Editor > Templates > Index template.

You have "Edit page" available in the WP Admin Bar, but it's not helpful.

Current flow

Currently, if you have a block theme active, selecting “Edit page” when viewing the posts page (index or home.html template), opens the page assigned as the "posts page" the Post Editor—but it has no content; it’s a blank page with a notice that the contents on this page technically does not display anything.

Proposal

I propose that if you have a block theme active, "Edit page" opens the Site Editor, with the template of that posts page engaged (home.html if available, or index.html if not).

This would help reduce complexity of understanding the nuances of having a page for posts and a template that you would actually edit when attempting to edit the blog.

Visual

Here's the current flow. You'll see that "Edit page" is not useful, when viewing the posts page:

CleanShot.2024-07-21.at.17.08.15.mp4
@richtabor richtabor added [Type] Enhancement A suggestion for improvement. [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") labels Jul 21, 2024
@richtabor richtabor changed the title When viewing a "blog" template, the Admin Bar “Edit page” control should open the template When viewing the posts page, the Admin Bar “Edit page” control should open the template Jul 21, 2024
@richtabor richtabor changed the title When viewing the posts page, the Admin Bar “Edit page” control should open the template When viewing the posts page, “Edit page” control should open the template Jul 21, 2024
@carolinan
Copy link
Contributor

My first reaction is a big YES!! to this suggestion.
I believe this is solvable, I would just like to see a discussion around the flow. :)

Whether the content that you add to this page displays on the front or not is depending on the template and traditionally, theme authors do not commonly print the post content in this scenario.

  • If the first view is the Site Editor template, how easily can I switch to editing the page content?
  • As a user, how will I understand that I am editing a template? Is the notice that shows at the bottom left corner enough?
  • What if as a user, I have access to editing pages but not templates? I assume I am then taken directly to the page?
  • If there is page content, but the template does not have the post content block, should there be a hint or friendly warning when editing the template?

@richtabor
Copy link
Member Author

I'm referring to the Posts page (whichever template the site is using). So if you select "Edit page" you don't go to the blank page in the Post Editor, but to that template in the Site Editor.

As a user, how will I understand that I am editing a template? Is the notice that shows at the bottom left corner enough?

I don't think it matters to be honest. It's your posts "page" that you're editing, which you initiated the editing of. Whether or not it's technically a page, or technically a template (it's both ha) I don't think is particularly relevant.

If there is page content, but the template does not have the post content block, should there be a hint or friendly warning when editing the template?

If the first view is the Site Editor template, how easily can I switch to editing the page content?

The "page" should almost never be edited—as it is not reflected on index/home templates. That's why we have the "This is your posts page" notice, to let you know it's not really a page, but a placeholder. I'm suggesting we help orient people where they're intending to go. For the posts page, editing this page really means editing this template.

@richtabor
Copy link
Member Author

Related #63784

@carolinan
Copy link
Contributor

carolinan commented Jul 26, 2024

The "page" should almost never be edited—as it is not reflected on index/home templates

It is reflected if the template contains the post content (block).
That is why I wrote "Whether the content that you add to this page displays on the front or not is depending on the template"

@carolinan
Copy link
Contributor

One of the things that I see users requesting is having a featured image on the posts page. They could achieve adding any image to the template: But for it to be the actual featured image, they would need to access the real page.
I have not followed up with either of these users to ask if any image at the top of their page would be enough.

The current notice does not actually explain that the content does not show, and it could be updated separately from this suggested flow.

@carolinan
Copy link
Contributor

carolinan commented Jul 26, 2024

Technically, where in the code should the check for the posts page be implemented?
Before the Edit link is printed in the toolbar?
What about when the user goes to Site Editor > Pages > Chosen page > Edit

@richtabor
Copy link
Member Author

That is why I wrote "Whether the content that you add to this page displays on the front or not is depending on the template"

Sorry I'm only referring to the Posts page there. Not the page assigned as the homepage in Reading settings.

@richtabor
Copy link
Member Author

What about when the user goes to Site Editor > Pages > Chosen page > Edit

It should open the template editor, as there is no page content. Otherwise you will need to do this, anytime you view the page in the editor, as seen below.

I have an issue for this here: #63788

CleanShot 2024-07-26 at 22 23 36

@richtabor
Copy link
Member Author

One of the things that I see users requesting is having a featured image on the posts page. They could achieve adding any image to the template: But for it to be the actual featured image, they would need to access the real page.

I mention in #63788, but perhaps the posts page is "unlocked" for editing, as it is template and content in one—the template editor is not invoked in full here. That way you can still add a featured image, rename, trash it, etc.

@jameskoster
Copy link
Contributor

jameskoster commented Aug 8, 2024

This issue feels roughly the same as #63748.

I'm not sure we should redirect to the template; it will be confusing will likely cause routing issues. Instead how about you stay in the page-edit context but we make a few changes to the UX:

  • Unlock template editing: Allow users to select and edit template blocks directly in this context.
  • Hide irrelevant page meta in the Inspector (template, author, publish date).
  • Surface template settings (posts per page) in the inspector.
Posts page

I'd add that editing the posts page should by almost identical to editing a homepage set to display latest posts.

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants