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

Block Editor: Fix Multiple Trailing Inserters for Nested Inner Blocks #24836

Merged
merged 4 commits into from
Sep 3, 2020

Commits on Aug 27, 2020

  1. Hide trailing inserter if siblings in the block list are not selected

    Blocks, like the group or  template part block, render what are called inner blocks. These inner blocks use block list blocks to display ordered content. The trailing inserter is included as the last item in block lists.
    
    When blocks with inner blocks are nested in other inner blocks, the trailing inserter is rendered multiple times. For example, if a template part block is rendered within  a group block, each renders its own inner blocks, which subsequently render two trailing inserters.
    
    One potential solution is to display a single trailing inserter at any given time. We determine which inserter to show by evaluating the currently selected block and ensuring that the trailing inserter is a sibling (that way we're certain they're children of the same inner block)
    jeyip committed Aug 27, 2020
    Configuration menu
    Copy the full SHA
    b670f4b View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2020

  1. Configuration menu
    Copy the full SHA
    97d9cea View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f12cb55 View commit details
    Browse the repository at this point in the history

Commits on Aug 31, 2020

  1. Fix isParentSelected conditional

    Co-authored-by: Addison Stavlo <Stavz01@gmail.com>
    jeyip and Addison-Stavlo authored Aug 31, 2020
    Configuration menu
    Copy the full SHA
    d150f58 View commit details
    Browse the repository at this point in the history