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

Reusable Blocks: Add reusable blocks effects #3377

Merged
merged 5 commits into from
Nov 21, 2017
Merged

Reusable Blocks: Add reusable blocks effects #3377

merged 5 commits into from
Nov 21, 2017

Commits on Nov 20, 2017

  1. Add reusable blocks effects

    Adds the effects necessary for supporting reusable blocks. There are 4:
    
    - FETCH_REUSABLE_BLOCKS: Loads reusable blocks from the API and inserts
      them into the store.
    - SAVE_REUSABLE_BLOCK: Persists a reusable block that's in the store to
      the API.
    - MAKE_BLOCK_STATIC: Transforms a reusable block on the page into a
      regular block.
    - MAKE_BLOCK_REUSABLE: Transforms a regular block on the page into a
      reusable block.
    noisysocks committed Nov 20, 2017
    Configuration menu
    Copy the full SHA
    851cd18 View commit details
    Browse the repository at this point in the history
  2. Remove extraneous createEditorInstance

    This unnecessary line probably came as a result of a bad merge conflict
    resolution.
    noisysocks committed Nov 20, 2017
    Configuration menu
    Copy the full SHA
    5367b6e View commit details
    Browse the repository at this point in the history
  3. Fix 'cannot call initializeMetaBoxes on undefined' error

    `gutenberg_collect_meta_box_data` expected that
    `window._wpGutenbergEditor` would always be instantiated, but this is
    only true for when `wp.api.init()` returns quickly because of the API
    schema being cached.
    
    The fix is to use a Promise to store `window._wpGutenbergEditor`.
    
    (Well, a jQuery.Deferred, since we have to support IE 11 which doesn't
    support promises.)
    noisysocks committed Nov 20, 2017
    Configuration menu
    Copy the full SHA
    35c59d9 View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2017

  1. Replace jQuery.Deferred with Promise

    Remove jQuery.Deferred and jQuery.when in our editor initialization in
    lieu of Promise and Promise.all.
    noisysocks committed Nov 21, 2017
    Configuration menu
    Copy the full SHA
    f5cd6cd View commit details
    Browse the repository at this point in the history
  2. Rename _wpGutenbergEditor -> _wpLoadGutenbergEditor

    Make it clear that this variable is a promise by giving it a non-noun
    name.
    noisysocks committed Nov 21, 2017
    Configuration menu
    Copy the full SHA
    e156849 View commit details
    Browse the repository at this point in the history