-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add feature flag to disable autocomplete #375
Conversation
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.
Looks good to me, just a suggestion on a flip
By moving the env var to be only needed here we'll also want to change the suggestion in the docs on how this is configured so we don't have a variable of disableSearchAutocomplete anymore - as we won't need a global one - and can instead suggest just adding an env var to the Search API V2 definition.
This adds a feature flag to disable autocomplete in case of unforeseen problems by returning an empty set of completion results in the response. This is controlled by the env var `ENABLE_AUTOCOMPLETE`, and will allow us to consolidate the logic behind disabling autocomplete in a single place instead of having it scattered across several apps (as the component will not render completions if no results are returned).
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.
Just a couple of small things in the docs.
This adds a feature flag to disable autocomplete in case of unforeseen
problems by returning an empty set of completion results in the
response.
This is controlled by the env var
ENABLE_AUTOCOMPLETE
, and will allowus to consolidate the logic behind disabling autocomplete in a single
place instead of having it scattered across several apps (as the
component will not render completions if no results are returned).