This repository has been archived by the owner on Feb 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 230
feat(configure): expose configure method #637
Merged
Merged
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
It's still a WIP, as I haven't checked perfectly how we can reset values to their defaults with this pattern, but it should be pretty close to the end behaviour 🙂, so if you want to have a look already, don't hesitate 👍 I'll also add some additional documentation before merging, but I'm still trying to figure what the correct way of writing it would be. |
JonathanMontane
force-pushed
the
feat/configure
branch
from
November 15, 2018 17:16
11d18d4
to
568a93c
Compare
JonathanMontane
changed the title
Feat/configure
feat(configure): expose configure method
Nov 15, 2018
…controls and parameters
… explain static vs reconfigurable options
JonathanMontane
force-pushed
the
feat/configure
branch
from
November 19, 2018 22:46
04970a9
to
c0a0e2f
Compare
raphi
approved these changes
Nov 21, 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.
LGTM 👍🚀
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.
Summary
We created a
setUseDeviceLocation
to allow dynamic control of theuseDeviceLocation
in a previous PR. This PR supersedes it with an improved API that allows one to reconfigure all of the query parameters and some of the controls dynamically (includesuseDeviceLocation
).The idea is that there are a lot of use case where one might want to modify the behaviour of the search based on user input, and this was not possible before. For instance, if the user selected a country we can now dynamically restrict the search to that country so the performances will be greatly improved and the relevance will be better too.
I also took the liberty of moving some of the options in the documentation, so that non-modifiable options appear at the beginning of the page (container, appId, apiKey, style) and advanced non-modifiable options appear at the very end.
This PR removes the syntax:
in favour of
The configure method applies partial updates to the configuration: