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: Allow composing block editor posts on WordPress.com. #11354

Merged
merged 45 commits into from
Apr 24, 2019

Conversation

kwight
Copy link
Contributor

@kwight kwight commented Feb 14, 2019

This PR allows WordPress.com users to access the block editor for Jetpack sites on Calypso via an iframe.

See phase 2 notes at p3fqKv-6Hh-p2.

Testing Instructions

  • Sandbox the API and apply D27129-code to it.
  • Load Calypso either locally or by calypso.live (this feature is only available behind the jetpack/gutenframe flag on testing environments, being wpcalypso, horizon, and development).
  • Directly load the URL /block-editor/post/:yourJetpackDomain.
  • Verify the block editor iframe does not load (you will see a gray screen with a sameorigin error in the console).
  • Load this branch.
  • Disconnect and reconnect your site to auto-activate the new module.
  • If that doesn't work, activate it from the oldskool modules page at wp-admin/admin.php?page=jetpack_modules (click "WordPress.com Block Editor Iframe" towards the bottom).
  • Directly load the URL /block-editor/post/:yourJetpackDomain again.
  • Verify the iframed block editor loads as expected.

Proposed changelog entry for your changes:

  • Block Editor: WordPress.com users can now compose Block Editor posts for their Jetpack sites without leaving WordPress.com.

@kwight kwight requested a review from a team February 14, 2019 20:28
@kwight kwight self-assigned this Feb 14, 2019
@kwight kwight added DO NOT MERGE don't merge it! [Feature] Calypsoify [Status] In Progress [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it labels Feb 14, 2019
@jetpackbot
Copy link

jetpackbot commented Feb 14, 2019

Warnings
⚠️ "Testing instructions" are missing for this PR. Please add some
⚠️ "Proposed changelog entry" is missing for this PR. Please include any meaningful changes
⚠️ Consider adding new PHP files to PHPCS whitelist for automatic linting: modules/wordpress-com-block-editor-iframe.php

This is an automated check which relies on PULL_REQUEST_TEMPLATE. We encourage you to follow that template as it helps Jetpack maintainers do their job. If you think 'Testing instructions' or 'Proposed changelog entry' are not needed for your PR - please explain why you think so. Thanks for cooperation 🤖

Generated by 🚫 dangerJS against 0bfded6

@kwight kwight requested a review from a team February 14, 2019 22:24
@kwight
Copy link
Contributor Author

kwight commented Mar 19, 2019

Noting that this still in progress, but will proceed attempting to use Jetpack_Signature for verification instead of core nonces. Next steps are to determine how best to replace the modules/wordpress-com-compose.phpL31 nonce check with a new method based on Jetpack_Signature, and then update the server-side in D24388-code. cc/ @obenland

@kwight kwight force-pushed the try/block-editor-iframe branch from 300600d to 3589642 Compare March 19, 2019 20:02
@kraftbj
Copy link
Contributor

kraftbj commented Mar 20, 2019

Question: Is this something you're aiming for 7.2 (April release) or just whenever it is ready?

@obenland
Copy link
Member

@kraftbj There's no ETA yet, this is more experimental

modules/wordpress-com-compose.php Outdated Show resolved Hide resolved
_inc/client/writing/composing.jsx Outdated Show resolved Hide resolved
modules/module-info.php Outdated Show resolved Hide resolved
@kwight
Copy link
Contributor Author

kwight commented Mar 26, 2019

Noting that I stumbled across #7623 today; so if we go ahead with this, we'll need to consider overlapping concerns.

@kwight kwight force-pushed the try/block-editor-iframe branch from 2d18bdc to 39bf216 Compare March 28, 2019 20:57
class.jetpack.php Outdated Show resolved Hide resolved
@kraftbj
Copy link
Contributor

kraftbj commented Apr 3, 2019

Could you update the testing instructions? I can't find the setting and the linked wp.com phab is closed. Thank you!

@mmtr mmtr self-assigned this Apr 24, 2019
@obenland obenland requested a review from mdawaffe April 24, 2019 17:22
@mdawaffe
Copy link
Member

What happens if the user on the Jetpack site has the Classic Editor active? (If it's a problem, and needs fixing in Jetpack, it probably deserves a separate PR.)

@obenland
Copy link
Member

What happens if the user on the Jetpack site has the Classic Editor active? (If it's a problem, and needs fixing in Jetpack, it probably deserves a separate PR.)

Yes, that is something that's being explored in Automattic/wp-calypso#32047

Also adds documentation about appropriate return values.
`__DIR__` is a PHP 5.3 constant.
Copy link
Member

@mdawaffe mdawaffe left a comment

Choose a reason for hiding this comment

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

💥

@kwight kwight merged commit b8b1cb7 into master Apr 24, 2019
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Apr 24, 2019
mmtr pushed a commit that referenced this pull request Apr 24, 2019
@dmsnell dmsnell deleted the try/block-editor-iframe branch April 24, 2019 23:27
mmtr pushed a commit that referenced this pull request Apr 25, 2019
codebykat added a commit that referenced this pull request Apr 29, 2019
@codebykat
Copy link
Member

Added to the 7.3 Changelog in 7514c5f

codebykat added a commit that referenced this pull request Apr 29, 2019
kraftbj pushed a commit that referenced this pull request Apr 30, 2019
kraftbj pushed a commit that referenced this pull request Apr 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Calypsoify [Pri] BLOCKER [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.