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

Mapbox: query for an API key differently depending on platform #14442

Merged
merged 1 commit into from
Jan 23, 2020

Conversation

jeherve
Copy link
Member

@jeherve jeherve commented Jan 23, 2020

Changes proposed in this Pull Request:

An alternative to #14440

Testing instructions:

Basically repeat the #14307 tests:

Prerequisites

  • Have a Simple, Atomic, and Jetpack test sites ready.
  • Make sure none of them has a Mapbox token saved. In that case, before applying this PR, please remove it in the Mapbox Access Token field in the Map block sidebar.

Jetpack

  • Open the editor and insert a Map block.
  • Make sure the Map block loads in the placeholder state, and asks for a token.
  • Provide a token, and make sure the map loads correctly.
  • Make sure it's possible to change and remove the token in the Mapbox Access Token field in the block sidebar.
  • Save the post and check the front end.
  • Make sure the Map block is rendered correctly.
  • Update the token in the Mapbox Access Token field in the block sidebar with a random incorrect string.
  • Wait a bit for the API call to complete and then make sure the block reverted to the placeholder state, with an "incorrect token" error notice.

Simple

  • Apply D38065-code and sandbox the API.
  • Open the editor and insert a Map block.
  • Make sure the Map block loads without asking for an access token.
  • Make sure there is no Mapbox Access Token field in the block sidebar.
  • Save the post and check the front end.
  • Make sure the Map block is rendered correctly.

Atomic

  • Install and activate the Jetpack Beta plugin.
  • In wp-admin, navigate to Jetpack -> Jetpack Beta; search for the fix/map-block-missing-api-key-wpcom feature branch, and activate it.
  • Repeat the same testing steps for a Simple site (skip the first step).

Proposed changelog entry for your changes:

  • N/A

@jeherve jeherve added [Type] Bug When a feature is broken and / or not performing as intended [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. [Block] Map labels Jan 23, 2020
@jeherve jeherve added this to the 8.2 milestone Jan 23, 2020
@jeherve jeherve requested review from Copons and a team January 23, 2020 16:13
@jeherve jeherve self-assigned this Jan 23, 2020
@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello jeherve! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer, review, and approve D38067-code before merging this PR. Thank you!

@jeherve jeherve force-pushed the fix/mapbox-key-wpcom branch from dde0bf1 to 644066a Compare January 23, 2020 16:16
@matticbot
Copy link
Contributor

jeherve, Your synced wpcom patch D38067-code has been updated.

@jetpackbot
Copy link

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: February 11, 2020.
Scheduled code freeze: February 4, 2020

Generated by 🚫 dangerJS against 644066a

Copy link
Member

@zinigor zinigor left a comment

Choose a reason for hiding this comment

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

Works properly for me in both Jetpack and DotCom environments, looks good too!

@zinigor zinigor 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 Jan 23, 2020
@jeherve jeherve merged commit baeb9e4 into master Jan 23, 2020
@jeherve jeherve deleted the fix/mapbox-key-wpcom branch January 23, 2020 17:20
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Jan 23, 2020
@jeherve
Copy link
Member Author

jeherve commented Jan 23, 2020

r202042-wpcom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Map Touches WP.com Files [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants