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
Show file tree
Hide file tree
Changes from 239 commits
Commits
Show all changes
246 commits
Select commit Hold shift + click to select a range
eb67549
Initial commit of directories and placeholder blocks.
jeffersonrabb Sep 27, 2018
f2a927a
Configs rewritten as a single object with comma-separated properties.…
jeffersonrabb Oct 8, 2018
5d758e5
Replaced incorrect const with let in for loop.
jeffersonrabb Oct 8, 2018
d4787ce
Clean branch with temp blocks deleted, as a starting point for others.
jeffersonrabb Oct 8, 2018
b5c756d
Map block, initial commit.
jeffersonrabb Oct 8, 2018
74af045
On-block approach to adding Map Points.
jeffersonrabb Oct 9, 2018
65766a9
Editable info windows, and many other refinements.
jeffersonrabb Oct 9, 2018
1d5cc78
SVG for markers instead of raster images.
jeffersonrabb Oct 10, 2018
7faefab
Changes to the UI for hiding/showing the Add Marker button. Dashed ic…
jeffersonrabb Oct 10, 2018
fb970f3
Bug fix: clear active marker after deletion, to avoid another marker'…
jeffersonrabb Oct 10, 2018
6c2edeb
Color and Map Theme pickers.
jeffersonrabb Oct 10, 2018
99b4af1
Missing map theme component.
jeffersonrabb Oct 10, 2018
4431eee
Close button for location search popover.
jeffersonrabb Oct 10, 2018
6f6b4be
Hover animation on Map Theme buttons.
jeffersonrabb Oct 10, 2018
741f7b0
Fix for JS error occurring in frontend.
jeffersonrabb Oct 10, 2018
ad5685f
Removing artificial height constraint in frontend.
jeffersonrabb Oct 10, 2018
011f316
Refactoring the frontend initialization, moving code into each block'…
jeffersonrabb Oct 10, 2018
987bd15
Don't recalculate map bounds if the info window is open. The recalcul…
jeffersonrabb Oct 10, 2018
e5197fa
Adding Map block to the Jetpack preset.
jeffersonrabb Oct 10, 2018
acbedc9
Removing some unused React functions.
jeffersonrabb Oct 10, 2018
5191ef4
Key attributes in iterated markup.
jeffersonrabb Oct 10, 2018
b3b9c35
Resolved - its a theme support question.
jeffersonrabb Oct 11, 2018
f02f912
Removing an errant console log as well as some unused variables.
jeffersonrabb Oct 11, 2018
a61def0
Some syntax clean-up.
jeffersonrabb Oct 11, 2018
dd897b8
More syntax and legibility improvements. Removed an ancient setTimeou…
jeffersonrabb Oct 11, 2018
82a6fc2
Removal of sidebar Locations component, which is now redundant. Marke…
jeffersonrabb Oct 11, 2018
d693302
Use browser geolocation to set map center if no points have been prov…
jeffersonrabb Oct 11, 2018
dd1452e
Minor changes to the infowindow, fix to zoom bug.
jeffersonrabb Oct 11, 2018
30c49d8
Check to insure initialization occurs only view-side.
jeffersonrabb Oct 12, 2018
5449ace
Z-index fix for Add Marker popover, to keep it from appearing above v…
jeffersonrabb Oct 12, 2018
0efd694
Multi-line object formatting.
jeffersonrabb Oct 12, 2018
c5e2b2d
Less jarring background color.
jeffersonrabb Oct 12, 2018
51cc707
Better approach to determining if view.js is loaded in Editor or View…
jeffersonrabb Oct 12, 2018
40a57a8
Removal of all jQuery. Calypso loadScript library used to dynamically…
jeffersonrabb Oct 12, 2018
325e538
Do not render markers until map exists.
jeffersonrabb Oct 12, 2018
4263be1
Comments, readability improvements, clean-up.
jeffersonrabb Oct 12, 2018
480696c
TextareaControl instead of TextControl for caption field in popover.
jeffersonrabb Oct 12, 2018
82ff721
Reinstatement of Locations component, for testing.
jeffersonrabb Oct 12, 2018
fb7666e
Fixes to two bugs that could break clickable markers. THe first preve…
jeffersonrabb Oct 13, 2018
ba0f065
Right padding to separate the arrow in nested panels from the text.
jeffersonrabb Oct 13, 2018
3181a22
Removing unused subcomponents directory. Will be reinstated in future…
jeffersonrabb Oct 13, 2018
3df859c
Removing console log statement.
jeffersonrabb Oct 13, 2018
b2b70f7
Circle CI lint & translate issues.
jeffersonrabb Oct 13, 2018
97a30bc
Removed incorrect second key attribute.
jeffersonrabb Oct 13, 2018
a4f9b7d
Missed one linting fix.
jeffersonrabb Oct 13, 2018
68ffb7a
Switch to Theme Colors for Marker Color.
jeffersonrabb Oct 13, 2018
f8212f0
Removal of an unused event, fix to the z-index of the Add Point popover.
jeffersonrabb Oct 13, 2018
eede270
Don't show the Locations component unless there is at least one marker.
jeffersonrabb Oct 13, 2018
fc75969
Update block sizing after alignment change.
jeffersonrabb Oct 13, 2018
cf8c9ac
Removing unused color values, now that theme colors are used instead.
jeffersonrabb Oct 13, 2018
36a4d0a
Lookup component - simplified rewrite of Autocomplete component desig…
jeffersonrabb Oct 16, 2018
de0ae1c
Removing caption.
jeffersonrabb Oct 17, 2018
cf87034
Removing Geolocation feature - too slow and too invasive without a po…
jeffersonrabb Oct 17, 2018
3009a9c
Lookup key command accessibility to mirror Autocomplete.
jeffersonrabb Oct 17, 2018
15c7a89
Marker caption defaults to address.
jeffersonrabb Oct 17, 2018
022ca84
Implementation of withSpokenMessages to match Autocomplete.
jeffersonrabb Oct 17, 2018
762ff13
Set anchor point of map markers so that the point of the graphic is p…
jeffersonrabb Oct 17, 2018
933b877
Refactor to reduce size of view script and address view script enqueu…
jeffersonrabb Oct 17, 2018
072f509
Replacing lodash clone() with Array.slice(0) to remove dependency. A …
jeffersonrabb Oct 18, 2018
1326789
Moved all WordPress dependencies into External dependencies block. Re…
jeffersonrabb Oct 19, 2018
7f06bd6
Replacing all bound event handlers with arrow functions. Removing unn…
jeffersonrabb Oct 19, 2018
2a2c3f9
Missed localization.
jeffersonrabb Oct 19, 2018
cf4dfe2
Remove Add Point icon asset from block, move to CDN instead.
jeffersonrabb Oct 19, 2018
f9e9496
Renamed CONFIG->settings.
jeffersonrabb Oct 19, 2018
1cbfd2a
Neglected to add this file after rename. Also, lowercase keywords.
jeffersonrabb Oct 19, 2018
29944ff
CSS class name changes to match Calypso guidelines.
jeffersonrabb Oct 19, 2018
f57991a
Correcting indentation issues in two files.
jeffersonrabb Oct 20, 2018
2360440
Jetpack text domain for all localizations. Also, caught a few unlocal…
jeffersonrabb Oct 22, 2018
fd8a77b
Sytax updates with Prettier.
jeffersonrabb Oct 22, 2018
68771da
Removing 'atavist' from block registration name.
jeffersonrabb Oct 23, 2018
5f0c938
Removing all atavist references, and styles.
jeffersonrabb Oct 23, 2018
bf7f6a0
One missing localization text domain, some JsPrettier formatting.
jeffersonrabb Oct 23, 2018
d2d5f51
Changing block name prefix from a8c to jetpack.
jeffersonrabb Oct 23, 2018
e45afae
Use Jetpack REST API for Google Maps API Key.
jeffersonrabb Oct 23, 2018
1920bb1
Google Maps API key retrieval by API in view.
jeffersonrabb Oct 24, 2018
4bbe248
API key deletion. Notices on API update error.
jeffersonrabb Oct 24, 2018
4fac59a
Placeholder with API key field for first-time users who have not yet …
jeffersonrabb Oct 24, 2018
df86050
Google Maps API Key form field in its own PanelGroup. Markers & Googl…
jeffersonrabb Oct 24, 2018
6d85144
Some tweaks to the Google Maps API form element area.
jeffersonrabb Oct 24, 2018
925707c
Change to Service API Keys endpoint.
jeffersonrabb Oct 25, 2018
9608c88
A better change to the Service API Keys endpoint.
jeffersonrabb Oct 25, 2018
28808a5
Changes to the /service-api-keys/ parameters.
jeffersonrabb Oct 25, 2018
8bfb1cc
Merge branch 'master' into atavist/map-block-v2
jeffersonrabb Oct 25, 2018
dadf5f8
Better apiFetch promise, using second param of .then() as the catch.
jeffersonrabb Oct 25, 2018
10ccbdf
Additional keyword, removed translation for "jetpack" as it is a bran…
jeffersonrabb Oct 26, 2018
7ce9855
Bug fix: frontend Google Maps API retrieval was out of date with rece…
jeffersonrabb Oct 26, 2018
1c47ada
Removing left/right alignment options.
jeffersonrabb Oct 26, 2018
8ac2e2a
New approach to map styles, with four options available (Roadmap, Ter…
jeffersonrabb Oct 26, 2018
c2009e1
Switch to Mapbox from Google Maps.
jeffersonrabb Oct 31, 2018
d8f438b
Mapbox error management.
jeffersonrabb Nov 1, 2018
6b34ca1
Replace jQuery ajax() with pure Javascript.
jeffersonrabb Nov 1, 2018
e6e946c
Fallback to Open Street Map embed, which will be visible if block is …
jeffersonrabb Nov 1, 2018
a548742
Some visual and textual improvements to the Map Theme picker.
jeffersonrabb Nov 1, 2018
b6cc9a1
Fix to the opacity of marker pins - they are now 90% opaque.
jeffersonrabb Nov 1, 2018
ef5c1d5
Improvements to the styling of Map popups.
jeffersonrabb Nov 1, 2018
c7fa98e
Give focus to the location search text field whenever it is displayed.
jeffersonrabb Nov 1, 2018
acf8bf3
New opening screen Mapbox copy.
jeffersonrabb Nov 1, 2018
b8617e3
When dropping from two points down to one, set zoom to 12 so the sing…
jeffersonrabb Nov 2, 2018
76eaf81
When point is added, check to see if identical point has already been…
jeffersonrabb Nov 2, 2018
ee85e9b
Lodash import fixes.
jeffersonrabb Nov 2, 2018
d2c809e
Lodash import fixes.
jeffersonrabb Nov 2, 2018
2deab74
Refactor of property observer functions to be more explicit and 'grep…
jeffersonrabb Nov 2, 2018
82585a7
Bug fix to make popup text fields editable without hiding the popup. …
jeffersonrabb Nov 2, 2018
3fef44a
Merge branch 'try/map-block-mapbox' into atavist/map-block-v2
jeffersonrabb Nov 2, 2018
3306a87
Renaming block so that directory structure matches block name. Change…
jeffersonrabb Nov 2, 2018
864ec24
Revised fallback approach: list of marker points, each linked to Goog…
jeffersonrabb Nov 2, 2018
c1fe92a
Fix to fallback for map with no markers.
jeffersonrabb Nov 2, 2018
b54cc37
Merge branch 'master' into atavist/map-block-v2
jeffersonrabb Nov 5, 2018
6fe4149
Merge branch 'master' into atavist/map-block-v2
jeffersonrabb Nov 7, 2018
8da8394
Add a launch site task to the checklist
scruffian Nov 8, 2018
43e7f45
Merge branch 'master' into atavist/map-block-v2
jeffersonrabb Nov 9, 2018
ea07f2e
Include Map Theme picker assets in the block bundle.
jeffersonrabb Nov 9, 2018
0964c39
Debouncer for map resizing.
jeffersonrabb Nov 9, 2018
3019be8
Asynchronous script and stylesheet loader, initial commit.
jeffersonrabb Nov 9, 2018
c43c173
Explicit filetype (js|css) for Async loader.
jeffersonrabb Nov 12, 2018
be76a5a
Don't let users launch their site once it's already launched
scruffian Nov 12, 2018
df7ec2c
Make this condition more succinct.
spen Nov 12, 2018
faf30de
Filename convention fix for directory of Async Loader.
jeffersonrabb Nov 13, 2018
cf921ac
Merge pull request #28404 from Automattic/add/launch-to-checklist
scruffian Nov 13, 2018
69f6b3b
Removing map from the preset, adding to the beta list.
jeffersonrabb Nov 13, 2018
0bbf9b2
Initial commit of directories and placeholder blocks.
jeffersonrabb Sep 27, 2018
bc8505e
Configs rewritten as a single object with comma-separated properties.…
jeffersonrabb Oct 8, 2018
61ce89c
Replaced incorrect const with let in for loop.
jeffersonrabb Oct 8, 2018
053e26a
Clean branch with temp blocks deleted, as a starting point for others.
jeffersonrabb Oct 8, 2018
6804174
Map block, initial commit.
jeffersonrabb Oct 8, 2018
a681ce1
On-block approach to adding Map Points.
jeffersonrabb Oct 9, 2018
4e3cbd5
Editable info windows, and many other refinements.
jeffersonrabb Oct 9, 2018
64fdaf5
SVG for markers instead of raster images.
jeffersonrabb Oct 10, 2018
a9c7eb8
Changes to the UI for hiding/showing the Add Marker button. Dashed ic…
jeffersonrabb Oct 10, 2018
e28d6f2
Bug fix: clear active marker after deletion, to avoid another marker'…
jeffersonrabb Oct 10, 2018
5524f31
Color and Map Theme pickers.
jeffersonrabb Oct 10, 2018
54bd4df
Missing map theme component.
jeffersonrabb Oct 10, 2018
d818eed
Close button for location search popover.
jeffersonrabb Oct 10, 2018
b9d8c79
Hover animation on Map Theme buttons.
jeffersonrabb Oct 10, 2018
b2a30f7
Fix for JS error occurring in frontend.
jeffersonrabb Oct 10, 2018
f01bca9
Removing artificial height constraint in frontend.
jeffersonrabb Oct 10, 2018
ad66207
Refactoring the frontend initialization, moving code into each block'…
jeffersonrabb Oct 10, 2018
848b316
Don't recalculate map bounds if the info window is open. The recalcul…
jeffersonrabb Oct 10, 2018
e0cbe22
Adding Map block to the Jetpack preset.
jeffersonrabb Oct 10, 2018
b508362
Removing some unused React functions.
jeffersonrabb Oct 10, 2018
d1438b5
Key attributes in iterated markup.
jeffersonrabb Oct 10, 2018
04a4fa1
Resolved - its a theme support question.
jeffersonrabb Oct 11, 2018
09761d5
Removing an errant console log as well as some unused variables.
jeffersonrabb Oct 11, 2018
4af5a02
Some syntax clean-up.
jeffersonrabb Oct 11, 2018
c739166
More syntax and legibility improvements. Removed an ancient setTimeou…
jeffersonrabb Oct 11, 2018
e65d086
Removal of sidebar Locations component, which is now redundant. Marke…
jeffersonrabb Oct 11, 2018
a2a0304
Use browser geolocation to set map center if no points have been prov…
jeffersonrabb Oct 11, 2018
69647c6
Minor changes to the infowindow, fix to zoom bug.
jeffersonrabb Oct 11, 2018
2e7ebd3
Check to insure initialization occurs only view-side.
jeffersonrabb Oct 12, 2018
9366f98
Z-index fix for Add Marker popover, to keep it from appearing above v…
jeffersonrabb Oct 12, 2018
7fa160d
Multi-line object formatting.
jeffersonrabb Oct 12, 2018
f5abd24
Less jarring background color.
jeffersonrabb Oct 12, 2018
9f4a579
Better approach to determining if view.js is loaded in Editor or View…
jeffersonrabb Oct 12, 2018
1608354
Removal of all jQuery. Calypso loadScript library used to dynamically…
jeffersonrabb Oct 12, 2018
cd739f8
Do not render markers until map exists.
jeffersonrabb Oct 12, 2018
05a0f93
Comments, readability improvements, clean-up.
jeffersonrabb Oct 12, 2018
00a879b
TextareaControl instead of TextControl for caption field in popover.
jeffersonrabb Oct 12, 2018
b347ad4
Reinstatement of Locations component, for testing.
jeffersonrabb Oct 12, 2018
e78c94d
Fixes to two bugs that could break clickable markers. THe first preve…
jeffersonrabb Oct 13, 2018
6594641
Right padding to separate the arrow in nested panels from the text.
jeffersonrabb Oct 13, 2018
f81e007
Removing unused subcomponents directory. Will be reinstated in future…
jeffersonrabb Oct 13, 2018
73d3006
Removing console log statement.
jeffersonrabb Oct 13, 2018
10ca905
Circle CI lint & translate issues.
jeffersonrabb Oct 13, 2018
ed594b8
Removed incorrect second key attribute.
jeffersonrabb Oct 13, 2018
a32a397
Missed one linting fix.
jeffersonrabb Oct 13, 2018
621affa
Switch to Theme Colors for Marker Color.
jeffersonrabb Oct 13, 2018
bd9abde
Removal of an unused event, fix to the z-index of the Add Point popover.
jeffersonrabb Oct 13, 2018
a9ba552
Don't show the Locations component unless there is at least one marker.
jeffersonrabb Oct 13, 2018
b299264
Update block sizing after alignment change.
jeffersonrabb Oct 13, 2018
afbfe6e
Removing unused color values, now that theme colors are used instead.
jeffersonrabb Oct 13, 2018
89147b7
Lookup component - simplified rewrite of Autocomplete component desig…
jeffersonrabb Oct 16, 2018
4a3dffd
Removing caption.
jeffersonrabb Oct 17, 2018
9b74fe6
Removing Geolocation feature - too slow and too invasive without a po…
jeffersonrabb Oct 17, 2018
be864ed
Lookup key command accessibility to mirror Autocomplete.
jeffersonrabb Oct 17, 2018
1a72055
Marker caption defaults to address.
jeffersonrabb Oct 17, 2018
f2e3119
Implementation of withSpokenMessages to match Autocomplete.
jeffersonrabb Oct 17, 2018
7334b71
Set anchor point of map markers so that the point of the graphic is p…
jeffersonrabb Oct 17, 2018
71a172e
Refactor to reduce size of view script and address view script enqueu…
jeffersonrabb Oct 17, 2018
826766d
Replacing lodash clone() with Array.slice(0) to remove dependency. A …
jeffersonrabb Oct 18, 2018
3f20319
Moved all WordPress dependencies into External dependencies block. Re…
jeffersonrabb Oct 19, 2018
2bd9026
Replacing all bound event handlers with arrow functions. Removing unn…
jeffersonrabb Oct 19, 2018
7b74f16
Missed localization.
jeffersonrabb Oct 19, 2018
6d40beb
Remove Add Point icon asset from block, move to CDN instead.
jeffersonrabb Oct 19, 2018
c3cbacb
Renamed CONFIG->settings.
jeffersonrabb Oct 19, 2018
bfb02f5
Neglected to add this file after rename. Also, lowercase keywords.
jeffersonrabb Oct 19, 2018
bb4d8ea
CSS class name changes to match Calypso guidelines.
jeffersonrabb Oct 19, 2018
c89a8c2
Correcting indentation issues in two files.
jeffersonrabb Oct 20, 2018
90c8bb1
Jetpack text domain for all localizations. Also, caught a few unlocal…
jeffersonrabb Oct 22, 2018
5911bfd
Sytax updates with Prettier.
jeffersonrabb Oct 22, 2018
c017a48
Removing 'atavist' from block registration name.
jeffersonrabb Oct 23, 2018
3ed6bbd
Removing all atavist references, and styles.
jeffersonrabb Oct 23, 2018
2c36221
One missing localization text domain, some JsPrettier formatting.
jeffersonrabb Oct 23, 2018
420d28e
Changing block name prefix from a8c to jetpack.
jeffersonrabb Oct 23, 2018
07890bd
Use Jetpack REST API for Google Maps API Key.
jeffersonrabb Oct 23, 2018
74cab7c
Google Maps API key retrieval by API in view.
jeffersonrabb Oct 24, 2018
a8c964a
API key deletion. Notices on API update error.
jeffersonrabb Oct 24, 2018
5fe8766
Placeholder with API key field for first-time users who have not yet …
jeffersonrabb Oct 24, 2018
f5519dd
Google Maps API Key form field in its own PanelGroup. Markers & Googl…
jeffersonrabb Oct 24, 2018
24d8a36
Some tweaks to the Google Maps API form element area.
jeffersonrabb Oct 24, 2018
97df982
Change to Service API Keys endpoint.
jeffersonrabb Oct 25, 2018
bf71438
A better change to the Service API Keys endpoint.
jeffersonrabb Oct 25, 2018
28bfb23
Changes to the /service-api-keys/ parameters.
jeffersonrabb Oct 25, 2018
4e37463
Better apiFetch promise, using second param of .then() as the catch.
jeffersonrabb Oct 25, 2018
ed96974
Additional keyword, removed translation for "jetpack" as it is a bran…
jeffersonrabb Oct 26, 2018
87b39cb
Bug fix: frontend Google Maps API retrieval was out of date with rece…
jeffersonrabb Oct 26, 2018
6fde6b9
Removing left/right alignment options.
jeffersonrabb Oct 26, 2018
23187c7
New approach to map styles, with four options available (Roadmap, Ter…
jeffersonrabb Oct 26, 2018
1a267ec
Switch to Mapbox from Google Maps.
jeffersonrabb Oct 31, 2018
63f6cc1
Mapbox error management.
jeffersonrabb Nov 1, 2018
2cd49e5
Replace jQuery ajax() with pure Javascript.
jeffersonrabb Nov 1, 2018
046e27b
Fallback to Open Street Map embed, which will be visible if block is …
jeffersonrabb Nov 1, 2018
4788603
Some visual and textual improvements to the Map Theme picker.
jeffersonrabb Nov 1, 2018
72d4906
Fix to the opacity of marker pins - they are now 90% opaque.
jeffersonrabb Nov 1, 2018
4a17d6f
Improvements to the styling of Map popups.
jeffersonrabb Nov 1, 2018
eae3ab8
Give focus to the location search text field whenever it is displayed.
jeffersonrabb Nov 1, 2018
e2ddea6
New opening screen Mapbox copy.
jeffersonrabb Nov 1, 2018
a7be82b
When dropping from two points down to one, set zoom to 12 so the sing…
jeffersonrabb Nov 2, 2018
9a66f4d
When point is added, check to see if identical point has already been…
jeffersonrabb Nov 2, 2018
52e5e5f
Lodash import fixes.
jeffersonrabb Nov 2, 2018
661682c
Refactor of property observer functions to be more explicit and 'grep…
jeffersonrabb Nov 2, 2018
1cd0d84
Bug fix to make popup text fields editable without hiding the popup. …
jeffersonrabb Nov 2, 2018
9d34e2e
Renaming block so that directory structure matches block name. Change…
jeffersonrabb Nov 2, 2018
df96aa7
Revised fallback approach: list of marker points, each linked to Goog…
jeffersonrabb Nov 2, 2018
d53da3f
Fix to fallback for map with no markers.
jeffersonrabb Nov 2, 2018
accea60
Include Map Theme picker assets in the block bundle.
jeffersonrabb Nov 9, 2018
73e394c
Debouncer for map resizing.
jeffersonrabb Nov 9, 2018
c95dcf4
Asynchronous script and stylesheet loader, initial commit.
jeffersonrabb Nov 9, 2018
baedfaa
Explicit filetype (js|css) for Async loader.
jeffersonrabb Nov 12, 2018
a597218
Filename convention fix for directory of Async Loader.
jeffersonrabb Nov 13, 2018
a3704b1
Removing map from the preset, adding to the beta list.
jeffersonrabb Nov 13, 2018
40094aa
Merge branch 'try/map+loader' of github.com:Automattic/wp-calypso int…
jeffersonrabb Nov 13, 2018
d51de00
Removing import docblocks.
jeffersonrabb Nov 13, 2018
774f983
Replace asyncloader with Webpack Dynamic Imports.
jeffersonrabb Nov 14, 2018
eaebff0
Removing 'jetpack' domain argument from all __().
jeffersonrabb Nov 14, 2018
a3e3c31
Bringing AddPoint UI svg into the bundle.
jeffersonrabb Nov 14, 2018
35139cb
Removing unused Internal Dependencies headers.
jeffersonrabb Nov 14, 2018
e54988e
Accidentally added Google Maps, not Mapbox npm library. Switching here.
jeffersonrabb Nov 14, 2018
f473f89
Two minor changes to map bounds calculation to avoid unnecessary calls.
jeffersonrabb Nov 14, 2018
b1bf1b4
Typo in plugins README.
jeffersonrabb Nov 14, 2018
fb1156c
Removing an artifact from when Mapbox library was loaded globally.
jeffersonrabb Nov 14, 2018
28f78a0
Removing Jetpack keyword.
jeffersonrabb Nov 14, 2018
efe5f2c
Use webpackChunkName to apply a human-readable name to Mapbox library…
jeffersonrabb Nov 14, 2018
5f50193
Remove Map block from Calypso, in preparation for merge.
jeffersonrabb Nov 14, 2018
f9accac
Removing plugins folder, to be re-instated in future PR.
jeffersonrabb Nov 14, 2018
489d5be
Revised import for __().
jeffersonrabb Nov 14, 2018
dbd2982
Removing Atavist preset.
jeffersonrabb Nov 14, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions client/gutenberg/extensions/map/add-point/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/** @format */

/**
* External dependencies
*/

import { __ } from '@wordpress/i18n';
jeffersonrabb marked this conversation as resolved.
Show resolved Hide resolved
import { Component } from '@wordpress/element';
import { Button, Dashicon, Popover } from '@wordpress/components';

/**
* Internal dependencies
*/

import LocationSearch from '../location-search';
import './style.scss';
export class AddPoint extends Component {
render() {
const { onClose, onAddPoint, onError, api_key } = this.props;
return (
<Button className="component__add-point">
{ __( 'Add marker' ) }
<Popover className="component__add-point__popover">
<Button className="component__add-point__close" onClick={ onClose }>
<Dashicon icon="no" />
</Button>
<LocationSearch
onAddPoint={ onAddPoint }
label={ __( 'Add a location' ) }
api_key={ api_key }
onError={ onError }
/>
</Popover>
</Button>
);
}
}

AddPoint.defaultProps = {
onAddPoint: () => {},
onClose: () => {},
onError: () => {},
};

export default AddPoint;
19 changes: 19 additions & 0 deletions client/gutenberg/extensions/map/add-point/oval.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions client/gutenberg/extensions/map/add-point/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/** @format */

.component__add-point {
position: absolute;
left: 50%;
top: 50%;
z-index: 1;
width: 32px;
height: 38px;
margin-top: -19px;
margin-left: -16px;
background-image: url( ./oval.svg );
background-repeat: no-repeat;
text-indent: -9999px;
box-shadow: none;
background-color: transparent;
&.components-button:not( :disabled ):not( [aria-disabled='true'] ):focus {
background-color: transparent;
box-shadow: none;
}
&:focus,
&:active {
background-color: transparent;
box-shadow: none;
}
}
.component__add-point__popover {
// Default z-index for components-popover places it above Edit Post Header and Notices
&.components-popover,
&.components-popover:not( .is-mobile ).is-bottom {
z-index: 20;
}
.components-button:not( :disabled ):not( [aria-disabled='true'] ):focus {
background-color: transparent;
box-shadow: none;
}
.components-popover__content {
padding: 0.1rem;
}
.components-location-search {
margin: 0.5rem;
}
}
.component__add-point__close {
margin: 0;
padding: 0;
border: none;
box-shadow: none;
float: right;
path {
color: #aaa;
}
}
Loading