Skip to content

[Gutenberg] UBE: Pressenting Jetpack Security settings on Missing Block#14880

Merged
etoledom merged 23 commits intodevelopfrom
gutenberg/unsupported-block-editor-switch-to-enable-jetpack-sso
Sep 28, 2020
Merged

[Gutenberg] UBE: Pressenting Jetpack Security settings on Missing Block#14880
etoledom merged 23 commits intodevelopfrom
gutenberg/unsupported-block-editor-switch-to-enable-jetpack-sso

Conversation

@etoledom
Copy link
Copy Markdown
Contributor

@etoledom etoledom commented Sep 11, 2020

Gutenberg-mobile PR: wordpress-mobile/gutenberg-mobile#2610

This PR implements changes from wordpress-mobile/gutenberg-mobile#2610 to present the Jetpack Security settings modally over Gutenberg, and refresh the editor capabilities to enable the Unsupported Block Editor.

NOTE: The action button text for UBE Enabled has been updated to Edit using web editor.
jetpack_ube

To test:

Jetpack connected sites (Self-Hosted and Atomic)

  • Have a Jetpack connected site with a post with an unsupported block on it.
  • Be sure to have SSO disabled for this site.
  • Open the post with the mobile app.
  • Press the (?) button on the missing block.
    • Check that the bottom sheet looks like the one from the image Jetpack - UBE Disabled.
  • Press the action button Open Jetpack security settings.
  • Check that the Jetpack Security Settings appears modally.
  • Activate the option Allow WordPress.com login and press Done.
  • Press (?) button again.
    • Check that now the bottom sheet has changes, and looks like Jetpack - UBE Enabled from the image.
  • Press again the action button Edit using web editor.
    • Check that UBE works as expected. (If its a new site, you might need to allow WordPress.com login on the web view. This is expected behaviour.

Self-Hosted sites.

  • Add a self-hosted site to the mobile app (not connected to wpcom).
  • Open a post with an unsupported block in it.
  • Press the (?) button on the missing block.
    • Check that it looks like the one from the image Self-Hosted - Disabled.

WPCom Simple sites.

  • On a WPCom Simple site:
  • Open a post with an unsupported block in it.
  • Press the (?) button on the missing block.
    • Check that it looks like the one from the image WPCom Simple - Enabled.
  • Press the action button Edit using web editor.
    • Check that UBE loads as expected.

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Sep 11, 2020

You can trigger an installable build for these changes by visiting CircleCI here.

@etoledom etoledom self-assigned this Sep 11, 2020
@etoledom etoledom added the Gutenberg Editing and display of Gutenberg blocks. label Sep 11, 2020
@etoledom etoledom added this to the 15.8 milestone Sep 11, 2020
@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Sep 11, 2020

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

@etoledom etoledom force-pushed the gutenberg/unsupported-block-editor-jetpack-sso-enabled branch from 84fbdc3 to e1960f0 Compare September 14, 2020 06:52
Base automatically changed from gutenberg/unsupported-block-editor-jetpack-sso-enabled to develop September 14, 2020 09:07
@jkmassel
Copy link
Copy Markdown
Contributor

👋 We're freezing 15.8 today, so I'm bumping this PR forward to 15.9. If you need it to be part of the 15.8 release cycle, please merge to the release/15.8 branch and DM me – I'll be happy to cut a new beta release!

@jkmassel jkmassel modified the milestones: 15.8, 15.9 Sep 21, 2020
@marecar3 marecar3 requested a review from guarani September 24, 2020 22:58
@marecar3
Copy link
Copy Markdown
Contributor

Hey 👋 @etoledom
I have updated gb-mobile reference to the latest and changed this PR to ready for review if that is ok?

@marecar3 marecar3 marked this pull request as ready for review September 24, 2020 23:19
return [
.mentions: post.blog.isAccessibleThroughWPCom() && FeatureFlag.gutenbergMentions.enabled,
.unsupportedBlockEditor: isUnsupportedBlockEditorEnabled,
.unsupportedBlockEditorSwitch: post.blog.jetpack?.isConnected ?? false,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm wondering if something like unsupportedBlockEditorRequiresUserInteraction would be more descriptive?

Copy link
Copy Markdown
Contributor

@guarani guarani Sep 25, 2020

Choose a reason for hiding this comment

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

Also, now that we're handling Jetpack sites here, should we remove this comment:

// Jetpack sites with SSO disabled also have Unsupported Block Editor disabled, since we won't be able to authenticate to their self-hosted site.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These names are really tricky 😬
So, this capability is about the site being able to enable Unsupported Blocks Editor if it's disabled.
This would be the general description to no mention SSO or Jetpack. That's why it's true for any Jetpack site, even if SSO is already active and it doesn't require user interaction.

Maybe a better name could be unsupportedBlockEditorSwitchable or ...Activable? 🤔
I really don't like this "capability" but we need this information.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

From WordPress/gutenberg#25238 (comment)
Maybe unsupportedBlockEditorCanBeEnabled could also work for the capability name 🤔
Wdyt?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

cc @marecar3 - since we might need to change the capability name in both platforms

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That's why it's true for any Jetpack site, even if SSO is already active and it doesn't require user interaction.

True, so unsupportedBlockEditorRequiresUserInteraction wouldn't work either.

I really don't like this "capability" but we need this information.

It seems like it isn't a "capability", but I don't know where else we could put it either.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hah yeah, that sounds right. It's more a capability of the site that's using using Gutenberg rather than of gutenberg itself.
This feels more like a property of the Unsupported Block Editor capability.

@guarani guarani self-requested a review September 25, 2020 02:56
Copy link
Copy Markdown
Contributor

@guarani guarani left a comment

Choose a reason for hiding this comment

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

I tested all three scenarios and this works great! 🎉 I've commented on a couple of things above, but they are relatively minor.

It's worth noting that from the Jetpack settings modal screen, I can pretty much navigate anywhere (e.g. sign up for a Jetpack account) — I'm not sure if we want to block those off somehow (otherwise users may get lost).

@etoledom etoledom merged commit b3bfb13 into develop Sep 28, 2020
@etoledom etoledom deleted the gutenberg/unsupported-block-editor-switch-to-enable-jetpack-sso branch September 28, 2020 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Gutenberg Editing and display of Gutenberg blocks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants