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

Editor: Add WordPress.com integrations to the block editor #12070

Merged
merged 46 commits into from
Apr 25, 2019

Conversation

mmtr
Copy link
Member

@mmtr mmtr commented Apr 17, 2019

Fixes Automattic/wp-calypso#32044.
Background: p3fqKv-6Hh-p2.

Changes proposed in this Pull Request:

Load the scripts of the WordPress.com block editor integrations that enhances the block editor with the features available in WordPress.com sites

Calypso Iframed block editor:

  • URL is updated with the draft ID when the post is saved.
  • Trashing a post redirects to the list of trashed posts in Calypso displaying a success notification.
  • Revisions are managed with the Calypso revisions modal.
  • Reblogging a post from the Calypso reader creates a post in Calypso with the except title and content.
  • Media items are managed with the Calypso media modal.
  • Posts are previewed with the Calypso preview modal.
  • Back button on the header ("View posts") redirects to the list of posts in Calypso.
  • Media items inserted in classic blocks are managed with the Calypso media modal.

WP Admin block editor (also included in the iframed block editor):

  • Support for the underline and justified text formats.

Testing instructions:

  • Start Calypso locally using the update/me-sites-version branch (Sites: Bump /me/sites API version to 1.3. wp-calypso#32527).
  • Go to /block-editor/post/:yourJetpackDomain.
  • Verify all the integrations listed above work as expected.
  • Load :yourJetpackDomain/wp-admin/post-new.php.
  • Check the underline and justified text formats are available on the paragraph blocks.

Proposed changelog entry for your changes:

I guess it's not needed?

@mmtr mmtr added [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack labels Apr 17, 2019
@mmtr mmtr requested review from a team April 17, 2019 07:21
@mmtr mmtr self-assigned this Apr 17, 2019
@mmtr mmtr added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Calypsoify labels Apr 17, 2019
Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick first pass.

modules/wordpress-com-block-editor-iframe.php Outdated Show resolved Hide resolved
modules/wordpress-com-block-editor-iframe.php Outdated Show resolved Hide resolved
@kraftbj kraftbj added [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Apr 17, 2019
@mmtr mmtr added [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. and removed [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! labels Apr 18, 2019
@obenland obenland requested a review from jeherve April 18, 2019 15:32
@kwight kwight force-pushed the try/block-editor-iframe branch from 0bfded6 to a529ad4 Compare April 18, 2019 19:35
@jeherve
Copy link
Member

jeherve commented Apr 19, 2019

Looks like this needs a rebase now.

@jeherve jeherve added [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Apr 19, 2019
@mmtr mmtr force-pushed the add/wpcom-block-editor-integrations branch from 84f4957 to fde9a6e Compare April 19, 2019 13:10
@mmtr mmtr added [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. and removed [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! labels Apr 19, 2019
@obenland
Copy link
Member

@jeherve Could you give this another look when you get a chance?

@kwight
Copy link
Contributor

kwight commented Apr 23, 2019

Note that this should be rebased again and approved after #11354 is merged (it was based on #11354 for easier testing).

@mmtr mmtr force-pushed the add/wpcom-block-editor-integrations branch from 9e0d725 to 3506dc4 Compare April 24, 2019 04:45
@mmtr mmtr force-pushed the add/wpcom-block-editor-integrations branch from 3506dc4 to 8070891 Compare April 24, 2019 22:59
@jetpackbot
Copy link

jetpackbot commented Apr 24, 2019

Thank you for the great PR description!

When this PR is ready for review, please apply the [Status] Needs Review label. If you are an a11n, please have someone from your team review the code if possible. The Jetpack team will also review this PR and merge it to be included in the next Jetpack release.

Scheduled Jetpack release: May 7, 2019.
Scheduled code freeze: April 30, 2019

Generated by 🚫 dangerJS against 59c52ce

@mmtr
Copy link
Member Author

mmtr commented Apr 25, 2019

Everything seemed to work, but I could see quite a few JavaScript errors in the Calypso editor, and some in the wp-admin editor as well:

image

Those may not be related to this PR though.

Thanks for testing! I can see the same errors while testing the WP Admin block editor on Jetpack master. The Calypso JS errors are also present on my local environment while testing other WordPress.com sites. So definitely not related to this PR

Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good now, although I think this could benefit from a rebase, some of those commits should not be here.

@jeherve jeherve added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Apr 25, 2019
@jeherve jeherve added this to the 7.3 milestone Apr 25, 2019
@mmtr mmtr merged commit e491f10 into master Apr 25, 2019
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Apr 25, 2019
@mmtr mmtr deleted the add/wpcom-block-editor-integrations branch April 25, 2019 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Calypsoify [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gutenframe: Align the iframe bridge communication code for both Jetpack and Simple sites.
9 participants