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

[Gutenberg] Fix gutenberg web-view auth issues with Atomic sites #14346

Merged
merged 1 commit into from
Jun 19, 2020

Conversation

etoledom
Copy link
Contributor

Fixes parts of wordpress-mobile/gutenberg-mobile#2358

This PR overrides RequestAuthenticator for the specific Gutenberg web view use case, where we want to use the regular auth type also for Atomic sites.

To test:

  • Setup an atomic site and test as public and private.
  • Create a post with a block not yet supported on mobile.
  • Test on a real device.
  • Will need Metro server running (on gutenberg-mobile develop branch is enough)
  • Log out from your wp account in the app to clean cookies.
  • Uninstall the app from your device.
  • Install building the app from this PR.
  • Login and go directly to the Atomic site.
  • Open the created post with unsupported block.
  • Open the unsupported block on the web view.
  • Check that gutenberg opens on the web view without asking for credentials 🙏

@guarani can I ask you for a review? Thanks!

Also cc @marecar3 @aerych

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.

@etoledom etoledom added the Gutenberg Editing and display of Gutenberg blocks. label Jun 18, 2020
@etoledom etoledom added this to the 15.2 milestone Jun 18, 2020
@etoledom etoledom requested a review from guarani June 18, 2020 08:58
@etoledom etoledom self-assigned this Jun 18, 2020
@peril-wordpress-mobile
Copy link

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

@peril-wordpress-mobile
Copy link

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

Copy link
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.

Great work @etoledom! Everything is working as expected.


I followed the test steps above. Before running each of the following scenarios, I delete the existing WP app from my phone and clear Safari data (Settings | Safari | Clear History and Website Data) just to be sure I'm starting from a clean slate.

  1. Brand new Atomic site, not yet launched, unsupported blocks in a draft post
    • First attempt resulted in a blank web view, no loading indicator was shown. Safari inspector couldn't find a web page to inspect. Second attempt worked fine.
  2. Same Atomic site, now launched (public), using the same post (now published instead of draft)
  3. Regular WP.com site, not yet launched, unsupported blocks in a draft post
  4. Regular WP.com site, now launched (public), using the same post (now published instead of draft)

Sites used:

  • Atomic site: pschrottkyunsupportedblockatomic.wpcomstaging.com
  • Regular site: pschrottkyunsupportedblock.wordpress.com

The temporary issue in the first test scenario case may have been a network issue, I'm not sure. I went back and retested a couple of times and didn't see the issue again.

@etoledom etoledom merged commit 9f2a606 into develop Jun 19, 2020
@etoledom etoledom deleted the gutenberg/unsupported-fallback-atomic branch June 19, 2020 06:46
@etoledom
Copy link
Contributor Author

Thank you !

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.

2 participants