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

Map Block, With Asynchronous Loader #28498

Merged
merged 246 commits into from
Nov 14, 2018
Merged

Map Block, With Asynchronous Loader #28498

merged 246 commits into from
Nov 14, 2018

Conversation

jeffersonrabb
Copy link
Contributor

@jeffersonrabb jeffersonrabb commented Nov 13, 2018

Changes proposed in this Pull Request

This is identical to the Map block PR except that it replaces the Calypso loadScript utility with a custom async loader utility that manages scripts and stylesheets. In the Map block, this utility is used to load the Mapbox script and stylesheet at runtime. At some point in the future, making a library like this available in Gutenberg core might be a valuable addition for plugin authors (cc: @mtias).

Also, Map block has been removed from the Jetpack preset and added to Jetpack Beta, so JETPACK_BETA_BLOCKS constant will need to be set to test.

Testing instructions

Jurassic Ninja link: https://jurassic.ninja/create/?gutenberg&gutenpack&shortlived&jetpack-beta&calypsobranch=try/map+loader&branch=try/google-maps-api-key

  • Click Set Up Jetpack
  • Click Start with free
  • Click Activate recommended features
  • SSH in using connection string and password found in the persistent admin notice in the site’s wp-admin
  • cd ~/apps/$USER/public
  • wp config set JETPACK_BETA_BLOCKS true --raw --type=constant
  • Navigate to Settings->Jetpack Constants
  • Check JETPACK_BETA_BLOCKS and Save.
  • Create new Post, add block, search for Map
  • Follow instructions to get Mapbox key

… Refactor of Frontend Management's handling of block children to avoid altering the DOM. Refactor of view.js files with component and config as properties of a single object, for greater uniformity and less code in the preset view file.
…on and popover will always be shown together. The dashed icon is no longer a button for invoking the popover. Add Marker UI will be visible when map is first revealed. Icon in Block Controls shows the Add Marker UI.
…ation often caused the infowindow to jump (sometimes off screen) making it difficult or impossible to continue editing.
…t which looked suspicious. San Francisco is new default center point (to help me test using client's location, since I live in NY)
Copy link
Member

@sirreal sirreal left a comment

Choose a reason for hiding this comment

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

This block is great and we need to get it merged. Several folks have already gone over it, but there are certainly a few things left to do.

With this PR it will be included in the Jetpack beta blocks and nowhere else, which makes this relatively safe.

Let's get together a list of the remaining bits that will be handled in smaller, more targeted follow-up PRs and 🚢 🚢 🚢

@sirreal sirreal added Jetpack [Status] Ready to Merge [Goal] Gutenberg Working towards full integration with Gutenberg [Type] New feature Google Maps and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Nov 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Goal] Gutenberg Working towards full integration with Gutenberg Google Maps Jetpack
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants