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

Blocks: Support reusable nested blocks (reusable blocks refactor) #5228

Merged
merged 17 commits into from
Mar 16, 2018

Commits on Mar 14, 2018

  1. Revert "Blocks: Disable Convert to Reusable for nested blocks"

    This reverts commit 8872058.
    aduth authored and noisysocks committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    e53d036 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e0ea667 View commit details
    Browse the repository at this point in the history
  3. Blocks: Avoid dismissing editable controls

    In nested context, block selection changes from reusable block to the inner block being edited, but we want to keep the UI shown
    aduth authored and noisysocks committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    8501e7d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    edc7681 View commit details
    Browse the repository at this point in the history
  5. Block List: Hide disabled default block appender

    e.g. within Disabled component, e.g. within reusable nested block
    aduth authored and noisysocks committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    928c2d1 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7aff115 View commit details
    Browse the repository at this point in the history
  7. Block List: Inject inner block list creator as function

    Generate BlockList from block's own utils, which has advantage of:
    
    - Not having circular dependency from blocks to editor
    - Respecting block menu and contextual toolbar props
    aduth authored and noisysocks committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    f7dabde View commit details
    Browse the repository at this point in the history
  8. Typo: saved -> fetched

    noisysocks committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    d5da664 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    4aac14a View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    b4afb64 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    b2f16d0 View commit details
    Browse the repository at this point in the history
  12. Update getInserterItems to respect new reusable block data layout

    Makes `getInserterItems` and `getFrecentInserterItems` respect that
    reusable blocks now point to a block that is elsewhere in the editor
    state. This makes reusable blocks again appear in the inserter.
    noisysocks committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    04bfd26 View commit details
    Browse the repository at this point in the history
  13. Provide createInnerBlockList context in BlockPreview

    Allow reusable nested blocks to be previewed in the inserter by having
    BlockPreview inject a createInnerBlockList function via context.
    noisysocks committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    c169500 View commit details
    Browse the repository at this point in the history
  14. Fix flash of 'Not found' error message when fetching a reusable block

    Re-order the FETCH_REUSABLE_BLOCKS effect so that the reusable block is
    added to the store before it is marked as no longer being fetched. This
    prevents core/block from briefly flashing the 'Not found' error message
    in between dispatches.
    noisysocks committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    2ede29e View commit details
    Browse the repository at this point in the history
  15. When converting reusable -> regular, replace the block with a copy

    Making a copy of the referenced block prevents the regular block from
    being removed should the reuasble block be later deleted.
    noisysocks committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    1b3f1ba View commit details
    Browse the repository at this point in the history
  16. Avoid iterating through reusable blocks twice

    Use _.map to avoid iterating through the reusable blocks twice in
    `getReusableBlocks`.
    noisysocks committed Mar 14, 2018
    Configuration menu
    Copy the full SHA
    4025b7a View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    3f0180c View commit details
    Browse the repository at this point in the history