Skip to content
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

Improve Search Autocomplete UI #4

Merged
merged 1 commit into from
Nov 13, 2019
Merged

Improve Search Autocomplete UI #4

merged 1 commit into from
Nov 13, 2019

Conversation

meowsus
Copy link
Contributor

@meowsus meowsus commented Nov 6, 2019

No description provided.

def trending_searches
@trending_searches ||= begin
Workarea::Insights::TrendingSearches.current.results.map do |v|
v['query_id']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The query_id helps group similar queries (e.g. shirts and shirt), so we'll want to use the full query string to avoid output like red_shirt.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem like this is resolved? You'll want to output the query_string.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@meowsus looks like this is still outputting query_id

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Derf. Missed this.

@meowsus meowsus changed the title wip Improve Search Autocomplete UI Nov 8, 2019
def trending_searches
@trending_searches ||= begin
Workarea::Insights::TrendingSearches.current.results.map do |v|
v['query_id']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem like this is resolved? You'll want to output the query_string.

@tubbo
Copy link
Contributor

tubbo commented Nov 11, 2019

I think you need to wrap the route in a scope block, otherwise you can't pass a locale through to it. here's what the route looks like when you run rails app:routes:

autocomplete_search GET    /search/autocomplete(.:format)                            workarea/storefront/searches#autocomplete

for comparison, here's the route coming out of base:

search GET    (/:locale)/search(.:format)                               workarea/storefront/searches#show {:locale=>/en/}

@bencrouse
Copy link
Contributor

@tubbo that is a good, but unrelated catch. can you open a separate PR?

def trending_searches
@trending_searches ||= begin
Workarea::Insights::TrendingSearches.current.results.map do |v|
v['query_id']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@meowsus looks like this is still outputting query_id

@meowsus
Copy link
Contributor Author

meowsus commented Nov 13, 2019

This PR uncovered a bug in base that @bencrouse is fixing currently. Once it's merged I'll hit the build again. (workarea-commerce/workarea#228)

* Hide UI when input is empty
* Add contentable area to UI
* Display Trending Products/Searches when no results are available
* Add append point for content search

SEARCHAUTO-1
@meowsus meowsus requested a review from tubbo November 13, 2019 18:19
@meowsus meowsus merged commit cdb2b27 into master Nov 13, 2019
@meowsus meowsus deleted the improve/SEARCHAUTO-1 branch November 13, 2019 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants