This repository has been archived by the owner on Dec 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 386
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Deploy preview for react-instantsearch ready! Built with commit 33e22ca https://deploy-preview-1171--react-instantsearch.netlify.com |
samouss
force-pushed
the
feat/geo-part-one
branch
from
April 18, 2018 13:52
c0c8702
to
10f3371
Compare
vvo
reviewed
Apr 19, 2018
packages/react-instantsearch/src/connectors/connectGeoSearch.js
Outdated
Show resolved
Hide resolved
samouss
force-pushed
the
feat/geo-part-one
branch
from
April 20, 2018 09:53
fb7af03
to
18ac971
Compare
vvo
reviewed
May 15, 2018
packages/react-instantsearch/src/connectors/connectGeoSearch.js
Outdated
Show resolved
Hide resolved
bobylito
reviewed
May 24, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some content comments. Will add more later :)
packages/react-instantsearch/src/connectors/connectGeoSearch.js
Outdated
Show resolved
Hide resolved
packages/react-instantsearch/src/connectors/connectGeoSearch.js
Outdated
Show resolved
Hide resolved
packages/react-instantsearch/src/connectors/connectGeoSearch.js
Outdated
Show resolved
Hide resolved
packages/react-instantsearch/src/connectors/connectGeoSearch.js
Outdated
Show resolved
Hide resolved
packages/react-instantsearch/src/connectors/connectGeoSearch.js
Outdated
Show resolved
Hide resolved
packages/react-instantsearch/src/connectors/connectGeoSearch.js
Outdated
Show resolved
Hide resolved
samouss
force-pushed
the
feat/geo-part-one
branch
3 times, most recently
from
June 19, 2018 16:25
1e1201d
to
23769fc
Compare
samouss
force-pushed
the
feat/geo-part-one
branch
from
June 20, 2018 07:51
23769fc
to
e6f3918
Compare
* feat(geo): add refine on interaction [PART-3] (#1192) * feat(geo): add Redo component [PART-4] (#1201) * feat(geo): add Control component [PART-5] (#1205) * feat(geo): refactor & external update [PART-6] (#1207) * feat(geo): custom Marker [PART-7] (#1214) * feat(geo): add Marker & HTMLMarker interactions [PART-8] (#1227) * feat(geo): add stories [PART-9] (#1236) * feat(geo): add docs [PART-10] (#1289)
samouss
added a commit
that referenced
this pull request
Jul 4, 2018
<a name="5.2.0"></a> # [5.2.0](v5.2.0-beta.2...v5.2.0) (2018-07-04) ### Bug Fixes * **translatable:** avoid create a new function on every render ([#1383](#1383)) ([1285b3b](1285b3b)) ### Features * **core:** export translatable ([#1351](#1351)) ([6d5a89d](6d5a89d)) * **maps:** add connector & widget ([#1171](#1171)) ([16e288a](16e288a)), closes [#1189](#1189) [#1192](#1192) [#1201](#1201) [#1205](#1205) [#1207](#1207) [#1214](#1214) [#1227](#1227) [#1236](#1236) [#1289](#1289)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the first part of the work for the GeoSearch widget. The second part will be the widget itself implemented (with Google Maps) with this connector. Most of the API is fixed but I will update the PR if something is missing during the widget implementation.
At the end in this version we don't support all the APIs that InstantSearch support. It's because with the current implementation of React InstantSearch it's very complicated to update the internal state of the widget from the outside. So we only manage the state of the search in the connector.
Issue:
The part that might change is the one where we compute the current position. This position is used (mainly) to move the map to the correct bounds when we don't have results. It might change because with the current implementation we can only read the position from the path
aroundLatLng
in thesearchState
. It's perfect for a custom widget (like Places for example), the widget needs to write the position at this path (an example will be built in Storybook). But when the position is set byConfigure
we need to look at a different pathconfigure.aroundLatLng
. We have some solutions:aroundLatLng
→configure.aroundLatLng
Update:
shouldComponentUpdate
hook ofcreateConnector
from the connector definition. To enable a full customisation we should be able to re-render the content of the marker. But thecreateConnector
prevent this update based on his props & state. Now we can bypass this limitation by implementing theshouldUpdate
function on the connector.