Skip to content

List View tab: expandable accordion adds little value in pattern content-only mode #75613

@getdave

Description

@getdave

Description

In the Block tab of the inspector sidebar, when editing a pattern in content-only mode (e.g. a Header template part with a single Navigation block), the List View tab displays the block hierarchy inside a collapsible accordion. If the user collapses it—especially when there is only one block within—the panel becomes empty, which can be momentarily confusing.

Note: This is a minor UX issue. The panel auto-expands again when you switch to another tab and return, so recovery is straightforward. The question is whether the expandable accordion provides enough value to justify its presence in this context.

The question

When the List View tab shows a single block (or a single top-level block like Navigation) in pattern content-only mode, does the collapsible accordion add meaningful value? Or would it be clearer to always show the content without the expand/collapse affordance?

Steps to reproduce

  1. Open the Site Editor and navigate to a template or template part that uses content-only editing (e.g. a Header with a single Navigation block).
  2. Select the section block (e.g. Header) that contains the Navigation block.
  3. In the right sidebar, switch to the List View tab (document/list icon).
  4. Collapse the "Navigation" accordion by clicking the chevron.
  5. The panel becomes empty—no blocks visible. (Switching to another tab and back auto-expands it again.)

Current behaviour

  • The List View tab uses a collapsible accordion (PanelBody) for the block hierarchy.
  • When collapsed, the panel shows nothing below the header.
  • The accordion can be collapsed regardless of how many blocks it contains.

Open for debate

  • Option A: Remove the accordion when there is only a single block—always show the content directly.
  • Option B: Keep the accordion but default to expanded and/or prevent collapsing when it would hide the only content.
  • Option C: Keep as-is—the auto-expand on tab switch is sufficient recovery, and the accordion may have value in other scenarios.

Affected areas

  • packages/block-library/src/navigation/edit/menu-inspector-controls.js — Uses PanelBody with opened/onToggle for content-only mode
  • packages/block-editor/src/components/inspector-controls-tabs/ — List View tab rendering

Screenshots

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for Enhancement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions