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

Template part selecting and editing unavailable in “Write” mode #66463

Open
Tracked by #60021
annezazu opened this issue Oct 25, 2024 · 11 comments · Fixed by #66833
Open
Tracked by #60021

Template part selecting and editing unavailable in “Write” mode #66463

annezazu opened this issue Oct 25, 2024 · 11 comments · Fixed by #66833
Labels
[Feature] List View Menu item in the top toolbar to select blocks from a list of links. [Feature] Write mode [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@annezazu
Copy link
Contributor

annezazu commented Oct 25, 2024

When the editor is set to “Design” mode, users can select template parts, which renders an “Edit” button allowing isolated editing of the template part. However, this functionality is unavailable in “Write” mode.

But if you enter the editor, turn on write mode, and open list view, template parts aren't visible in the list view nor can you edit them. I can replicate this with Twenty Twenty-Five, as well as other block themes with both 6.7 trunk & Gutenberg trunk on:

open.mode.early.then.list.view.mov
@annezazu annezazu added [Feature] List View Menu item in the top toolbar to select blocks from a list of links. [Feature] Write mode [Type] Bug An existing feature does not function as intended labels Oct 25, 2024
@annezazu
Copy link
Contributor Author

annezazu commented Nov 6, 2024

Noting that this includes if you switch between Write and Design modes. If you enter Write mode, it completely removes the ability to select template parts in list View even after switching to Design mode, even though you can select them. This is a demo with GB 19.6:

list.view.write.mode.mov

@ntsekouras
Copy link
Contributor

Hm.. I can't reproduce on trunk. @annezazu can you test in trunk too? I'll keep digging a bit more though to see if there was a PR that fixed that..

@xavier-lc
Copy link

xavier-lc commented Nov 7, 2024

I've been able to replicate what @annezazu describes on a simple edge site using v19.6.0:

  1. Go to /wp-admin/site-editor.php
  2. Click on Templates
  3. Click on a template
  4. The editor opens in Write mode
  5. The header and footer are not shown on the List View
  6. Switch to Design mode
  7. Reload the page
  8. Now I can interact with header/footer, and they are shown on the list view
Screencast.from.07-11-24.10.46.06.webm

@xavier-lc
Copy link

Replicated as well on a simple site running v19.5.1:

Screencast.from.07-11-24.10.58.29.webm

@xavier-lc
Copy link

I've downgraded my simple edge site to v19.4.0 and there I can see that the content of the list view changes when switching between write/design modes:

Screencast.from.07-11-24.11.05.45.webm

@ntsekouras
Copy link
Contributor

I tried this in .com and actually reproduced. Could it be happening only there?

@xavier-lc
Copy link

This bug was introduced to dotcom with this PR: #65945

@annezazu
Copy link
Contributor Author

annezazu commented Nov 7, 2024

Thank you all for diving in! I see a PR is underway to address this.

@annezazu
Copy link
Contributor Author

annezazu commented Nov 8, 2024

I'm going to reopen this since the original problem remains in this issue. Namely that you cannot view or edit template parts when Write mode is enabled:

no.ability.to.edit.template.parts.mov

To be clear, I'd expect to be able to both see the template parts in List View and then be able to edit the content of individual blocks. Part of the issue is that we need to ensure blocks like Site Title are compatible with contentOnly and that we have a way to edit/manage a menu with contentOnly. With that said though, for now, we should be able to see the template parts in List View and have a contentOnly experience, even if there is a lock icon and you cannot select anything.

@annezazu annezazu reopened this Nov 8, 2024
@annezazu annezazu changed the title Write/design mode: blocks aren't visible in list view when turning on write mode before opening Write/design mode: template parts aren't visible in list view when turning on write mode nor editable Nov 8, 2024
@richtabor
Copy link
Member

I tried this in .com and actually reproduced. Could it be happening only there?

Na, occurs universally.

@richtabor richtabor changed the title Write/design mode: template parts aren't visible in list view when turning on write mode nor editable Template part selecting and editing unavailable in “Write” mode Nov 8, 2024
@annezazu annezazu reopened this Nov 8, 2024
@mcsf mcsf removed their assignment Nov 11, 2024
@xavier-lc
Copy link

I'm going to reopen this since the original problem remains in this issue. Namely that you cannot view or edit template parts when Write mode is enabled

I've traced the origin of this behavior back to #65204. On the previous commit (PR #65373) it's possible to view and edit template parts, even though at that point the Write mode was called Edit.

cc @annezazu @youknowriad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] List View Menu item in the top toolbar to select blocks from a list of links. [Feature] Write mode [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
5 participants