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

Content panel shouldn't surface blocks inside the 'Content' block #63613

Closed
jameskoster opened this issue Jul 16, 2024 · 4 comments · Fixed by #63732
Closed

Content panel shouldn't surface blocks inside the 'Content' block #63613

jameskoster opened this issue Jul 16, 2024 · 4 comments · Fixed by #63732
Assignees
Labels
[Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended [Type] Enhancement A suggestion for improvement.

Comments

@jameskoster
Copy link
Contributor

When editing a page, the Content panel surfaces the sections of the document that can be directly manipulated. My understanding is that it does this by looping through the document looking for instances of specific blocks; Title, Featured Image, and Content. When found they are listed in the panel for easy selection:

Screenshot 2024-07-16 at 13 54 32

However, if the Content block also contains instances of these blocks – for instance if there's a custom query in the page content – then those blocks are repeated:

For a number of reasons this makes for a strange UX:

  • There's no benefit to highlighting nested featured images, titles, etc because as properties of separate entities they cannot be edited
  • It's not clear which is the document-level version of the block
  • They add weight to the Content panel, diluting its usefulness
  • Selecting a nested block creates a confusing UI where both the block and the parent appear to be selected
Screenshot 2024-07-16 at 13 57 27

Solution

It would seem sensible to omit these blocks in the Content panel when they are nested within the Content block.

cc @noisysocks as (iirc) you worked on this feature.

@jameskoster jameskoster added [Type] Bug An existing feature does not function as intended [Type] Enhancement A suggestion for improvement. labels Jul 16, 2024
@jameskoster jameskoster moved this to Needs Dev in Design priorities Jul 16, 2024
@Mamaduka
Copy link
Member

I think I've seen a similar issue before, but my keyword search is failing me at the moment 😞

@jameskoster
Copy link
Contributor Author

Same, I couldn't find it either 🥲

@annezazu might know.

Feel free to close this if it's duplicative.

@annezazu
Copy link
Contributor

I can't find a related issue and I think this is a good iteration on the original problem outlined in #55025 I think this PR implemented what's being discussed here as well: #57901

@noisysocks
Copy link
Member

Vaguely remember fixing this at one point. Must have subsequently un-fixed it 🙂 Will open a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended [Type] Enhancement A suggestion for improvement.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants