Skip to content

List view: scroll to selected element #36583

@ramonjd

Description

@ramonjd

What problem does this address?

The Block List's current behaviour is to highlight the item in the list that corresponding with the selected block in the editor.

When using the Block List to navigate around very long posts however, especially those that have plenty of nested blocks, the highlighted Block List item might be hidden deep within the scroll overflow.

Nov-18-2021.08-25-25.mp4

What is your proposed solution?

Initially raised by @gwwar in https://github.com/WordPress/gutenberg/pull/35817/files#r736696988, it might be worth exploring whether we could jump to the Block List item when a block is selected, even if that item isn't in the viewport or hasn't yet loaded in the DOM.

It would interact well with efforts to expand nested list items.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] List ViewMenu item in the top toolbar to select blocks from a list of links.[Type] EnhancementA suggestion for improvement.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions