Add nav parameter to autocomplete #1247
Merged
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.
Task/Issue URL: https://app.asana.com/0/1125189844152671/1200343978632902
Tech Design URL:
CC:
Description:
This PR introduces the new autocomplete parameter
is_nav. The extraisNav=truefield will then be used as a navigation query (meaning when the user clicks that autocomplete suggestion we load that URL). Results where this isfalseshould be treated as searches (even if they look like a URL).This PR also handles the case where
nav=nullin which case we default to the old way.Steps to test this PR:
Previous steps, setting up Charles
autocomplete.jsonresponse provided in the task.http://m.youtube.comyou) and in Charles map the response to theautocomplete.jsonfile.Test cases
isNav=false, clicking on it should do a search.isNav=falseand is a URL, clicking on it should do a search.isNav=true, clicking on it should load the URL.Internal references:
Software Engineering Expectations
Technical Design Template