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

Experimental: allow parent Block to consume child Block's toolbar #18440

Merged
merged 36 commits into from
Dec 13, 2019

Commits on Dec 13, 2019

  1. Configuration menu
    Copy the full SHA
    a83aef2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c54ebfe View commit details
    Browse the repository at this point in the history
  3. Update implementation to utilise InnerBlocks prop

    Previously Block settings controlled whethere the toolbar was “consumed”. Now this is controlled by `InnerBlocks`.
    getdave committed Dec 13, 2019
    Configuration menu
    Copy the full SHA
    e39d442 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d90b837 View commit details
    Browse the repository at this point in the history
  5. Fix event bubbling via use of Slot Fill

    Still a primitive PoC.
    getdave committed Dec 13, 2019
    Configuration menu
    Copy the full SHA
    5856315 View commit details
    Browse the repository at this point in the history
  6. Add comments for clarity

    getdave committed Dec 13, 2019
    Configuration menu
    Copy the full SHA
    31b83f5 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    8eaac1a View commit details
    Browse the repository at this point in the history
  8. Rename var to improve clarity

    A parent of X denotes a the immediate progenitor of X. Using `hasSelectedInnerBlock` with the `deep` argument checks all levels of nesting of InnerBlocks. Therefore the value could be the parent but it could also be a grand-parent (and so on). As a result a more useful term is “ancestor”.
    getdave committed Dec 13, 2019
    Configuration menu
    Copy the full SHA
    2db6d67 View commit details
    Browse the repository at this point in the history
  9. Update to only show toolbar on immediate parent

    This was happening anyway because Slots can only be rendered once. But this code makes it clearer as to the intent.
    getdave committed Dec 13, 2019
    Configuration menu
    Copy the full SHA
    49ef1c0 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    e122c29 View commit details
    Browse the repository at this point in the history
  11. Update prop to better reflect usage

    We’re not consuming toolbars as Block. We’re telling InnerBlocks to capture. The parent Block itself has no setting to denote that it is consuming toolbars.
    getdave committed Dec 13, 2019
    Configuration menu
    Copy the full SHA
    3db6d1b View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    df6b399 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    b59e38a View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    bdf2e46 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    c15e91b View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    272cb5a View commit details
    Browse the repository at this point in the history
  17. Update to implement new dual API for capturing

    There are now two props available which handle capturing differently.
    
    See #18440 (comment)
    getdave committed Dec 13, 2019
    Configuration menu
    Copy the full SHA
    1a65b6a View commit details
    Browse the repository at this point in the history
  18. Update selector docs

    getdave committed Dec 13, 2019
    Configuration menu
    Copy the full SHA
    b0ad245 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    ff8d134 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    6d6d089 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    6054b72 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    e3a1d6d View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    368de62 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    9917f68 View commit details
    Browse the repository at this point in the history
  25. Revert "Display current Block name within “captured” child Block tool…

    …bars"
    
    This reverts commit f40e8f2bf57eb1e4ce20013b688e28a109021e6d.
    
    Removing because it muddies the PR and starts to address more complex UI issues. Limiting the PR scope by reverting this.
    getdave committed Dec 13, 2019
    Configuration menu
    Copy the full SHA
    e68af80 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    8e9eafd View commit details
    Browse the repository at this point in the history
  27. Fix issue with forcing toolbars and refs due to rendering x2 toolbars

    Previously we were rendering x2 toolbars which cause the ref associated with forcing toolbars to become out of sync. This meant that using keyboard shortcuts to focus the toolbar didn’t work. Fixed by rendering component on demand.
    getdave committed Dec 13, 2019
    Configuration menu
    Copy the full SHA
    a1689e6 View commit details
    Browse the repository at this point in the history
  28. Fix linting issues

    getdave committed Dec 13, 2019
    Configuration menu
    Copy the full SHA
    20496fb View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    4a5a1bb View commit details
    Browse the repository at this point in the history
  30. Removes capturing toolbars on Nav Block

    As the API is experimental, remove it from any public Blocks for now.
    getdave committed Dec 13, 2019
    Configuration menu
    Copy the full SHA
    0b49632 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    f40c2f1 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    a6241c7 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    617fe50 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    1b9b75f View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    1f90c6f View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    841b4a8 View commit details
    Browse the repository at this point in the history