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

Set user-agent to Gutenberg WebView #12249

Merged
merged 5 commits into from
Jun 29, 2020

Conversation

marecar3
Copy link
Contributor

This request was failing after login affecting Gutenberg Web View for Unsupported blocks.

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

Example of user-agent that we set to user-agent:
user-agent: Mozilla/5.0 (Linux; Android 10; Pixel 3 Build/QQ2A.200501.001.B2; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.106 Mobile Safari/537.36 wp-android/alpha-230

To test:

  • Have a post on your non-Atomic site ready with an unsupported block.
  • Log out of WPAndroid app.
  • Delete the app.
  • Build from this PR.
  • Run Metro server (to have the Unsupported blocks option available).
  • Login and navigate to the post with the unsupported block.
  • Open the post.
  • Open the unsupported block on Gutenberg Web-View.
  • Check that it doesn't prompt for login-in.

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.

cc @aerych

@marecar3 marecar3 added the Gutenberg Editing and display of Gutenberg blocks. label Jun 22, 2020
@marecar3 marecar3 added this to the 15.2 milestone Jun 22, 2020
@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Jun 22, 2020

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

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Jun 22, 2020

You can test the changes on this Pull Request by downloading the APK here.

@marecar3 marecar3 requested a review from khaykov June 23, 2020 14:19
@khaykov khaykov self-assigned this Jun 25, 2020
@khaykov
Copy link
Member

khaykov commented Jun 25, 2020

I spend some time trying to setup GB environment and I keep getting various errors, I don't have much context about what's going wrong, so It's hard to fix them. I'm going unassign myself, so maybe someone with working environment cant take a look at this PR 🙇

@khaykov khaykov removed their assignment Jun 25, 2020
…logging-in

# Conflicts:
#	WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostActivity.java
#	libs/editor/WordPressEditor/src/main/java/org/wordpress/android/editor/GutenbergEditorFragment.java
@marecar3
Copy link
Contributor Author

I spend some time trying to setup GB environment and I keep getting various errors, I don't have much context about what's going wrong, so It's hard to fix them. I'm going unassign myself, so maybe someone with working environment cant take a look at this PR 🙇

Hey @khaykov, could you give it another chance?
I just merge latest develop into this branch which could solve the problem

Copy link
Member

@khaykov khaykov left a comment

Choose a reason for hiding this comment

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

I managed to make it work! Thanks for the fix @marecar3 , it works as expected. I was not able to reproduce the issue by removing setUserAgentString. Is there something else I can do to confirm it?

@marecar3
Copy link
Contributor Author

I managed to make it work! Thanks for the fix @marecar3 , it works as expected. I was not able to reproduce the issue by removing setUserAgentString. Is there something else I can do to confirm it?

Thanks a lot @khaykov for helping with this, that would be all!

@marecar3 marecar3 merged commit 77dd950 into develop Jun 29, 2020
@khaykov khaykov deleted the gutenberg/fix-guten-web-auth-issue-after-logging-in branch June 29, 2020 17:59
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