Skip to content

Commit 7ff843f

Browse files
samoussHaroenv
authored andcommitted
fix(stories): hide Places (#4152)
**Summary** This PR disable the Places example inside Storybook until the widget is compatible with 4.x.x.
1 parent 7e277dc commit 7ff843f

File tree

1 file changed

+33
-32
lines changed

1 file changed

+33
-32
lines changed

stories/geo-search.stories.js

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { storiesOf } from '@storybook/html';
22
import { action } from '@storybook/addon-actions';
33
import { withHits, withLifecycle } from '../.storybook/decorators';
44
import createInfoBox from '../.storybook/utils/create-info-box';
5-
import instantsearchPlacesWidget from 'places.js/instantsearchWidget';
5+
// import instantsearchPlacesWidget from 'places.js/instantsearchWidget';
66
import injectScript from 'scriptjs';
77

88
const API_KEY = 'AIzaSyBawL8VbstJDdU5397SUX7pEt9DslAwWgQ';
@@ -93,37 +93,38 @@ stories
9393
);
9494

9595
// With Places
96-
stories.add(
97-
'with position from Places',
98-
withHitsAndConfigure(({ search, container, instantsearch }) =>
99-
injectGoogleMaps(() => {
100-
const placesElement = document.createElement('input');
101-
const mapElement = document.createElement('div');
102-
mapElement.style.marginTop = '20px';
103-
104-
container.appendChild(placesElement);
105-
container.appendChild(mapElement);
106-
107-
search.addWidgets([
108-
instantsearch.widgets.configure({
109-
aroundRadius: 20000,
110-
}),
111-
112-
instantsearchPlacesWidget({
113-
container: placesElement,
114-
defaultPosition: ['37.7793', '-122.419'],
115-
}),
116-
117-
instantsearch.widgets.geoSearch({
118-
googleReference: window.google,
119-
container: mapElement,
120-
enableClearMapRefinement: false,
121-
initialZoom,
122-
}),
123-
]);
124-
})
125-
)
126-
);
96+
// @TODO reactivate story once the widget is compatible with 4.x.
97+
// stories.add(
98+
// 'with position from Places',
99+
// withHitsAndConfigure(({ search, container, instantsearch }) =>
100+
// injectGoogleMaps(() => {
101+
// const placesElement = document.createElement('input');
102+
// const mapElement = document.createElement('div');
103+
// mapElement.style.marginTop = '20px';
104+
105+
// container.appendChild(placesElement);
106+
// container.appendChild(mapElement);
107+
108+
// search.addWidgets([
109+
// instantsearch.widgets.configure({
110+
// aroundRadius: 20000,
111+
// }),
112+
113+
// instantsearchPlacesWidget({
114+
// container: placesElement,
115+
// defaultPosition: ['37.7793', '-122.419'],
116+
// }),
117+
118+
// instantsearch.widgets.geoSearch({
119+
// googleReference: window.google,
120+
// container: mapElement,
121+
// enableClearMapRefinement: false,
122+
// initialZoom,
123+
// }),
124+
// ]);
125+
// })
126+
// )
127+
// );
127128

128129
// Only UI
129130
stories

0 commit comments

Comments
 (0)