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

fix all the searches #1

Closed
6 tasks done
nathandunn opened this issue Sep 26, 2018 · 6 comments · Fixed by #3
Closed
6 tasks done

fix all the searches #1

nathandunn opened this issue Sep 26, 2018 · 6 comments · Fixed by #3

Comments

@nathandunn
Copy link
Contributor

nathandunn commented Sep 26, 2018

I may break this into multiple issues, but this is everything I have for now.

adapted from: #1 (comment)

  • Filter button itself shouldn't be multiselect moved to Filter button itself shouldn't be multiselect  #2
  • home page should use the same filter as the one at the top
  • Have the filters menu at the left of navbar (equivalent to what is on the node pages already). There is a single vue widget driving both of these so the trick would be to adapt the homepage autocomplete to look more like navbar autocomplete. Doing so will remove the
  • That "filters" button (in both places, home and navbar) should instead say "All"
  • add 'e.g.:' before the search examples (ND . . I didn't see this)
  • remove 'marfan syndrome disease' as one of the examples. 'syndrome disease' is an odd pairing.

  • ~~Wire up the "search in all results" to give you what you get here https://alpha.monarchinitiative.org/search/marfan ~~ moved to create text search option #5

  • autopopulate the first item of autocomplete results as "search < foo > in all results"; it is appropriate that this item be preselected so that if the user presses 'enter' they get to the search results page with facets. (ND: I think this is a bad idea UI-wise and is more complex to implement than what I put in there (by default if nothing is selected, do the full search). This follows the UI convections of both AMZN and GOOGLE )

===

  • add a search button to the right of the search bar (home page version only) (this is configurable with the show-search-button)
@DoctorBud
Copy link
Contributor

The 'text search' feature is probably most easily implemented by porting the VueJS code in monarch-app over into a VueJS SFC. The components are:

  • templates/search_results.mustache (for the HTML template)
  • js/search_results.js (for the behavior of the component)
  • The webapp.js function searchApiHandler (server-side) needs to be replaced with a client-side implementation that uses BL.
  • There's a BL function already used for autocomplete in BioLink.js called getSearchTermSuggestions(). An analogous function could be created that does text search (and it has to deal with paging).

@DoctorBud
Copy link
Contributor

And if you DO port the VueJS search, the paging should work right. Right now, every time you say "Show me more results", it just makes the page longer. That's sort of bogus and unwieldy. Might have been a side-effect of a SOLR limitation on paging? But hopefully BL has better paging support.

@jmcmurry
Copy link
Member

jmcmurry commented Sep 26, 2018

Home page search should look like this:

image

The specific items in order of importance are:

  • autopopulate the first item of autocomplete results as "search < foo > in all results"; it is appropriate that this item be preselected so that if the user presses 'enter' they get to the search results page with facets.
  • Wire up the "search in all results" to give you what you get here https://alpha.monarchinitiative.org/search/marfan
  • Have the filters menu at the left of navbar (equivalent to what is on the node pages already). There is a single vue widget driving both of these so the trick would be to adapt the homepage autocomplete to look more like navbar autocomplete. Doing so will remove the
  • That "filters" button (in both places, home and navbar) should instead say "All"
  • On reflection, I feel that the filter button itself shouldn't be multiselect; it should be a dropdown as it is in HPO; making it multiselect overloads/overcomplicates autocomplete. Raises issues like when to display or close the dropdown, what do display in the button if it is hidden etc. etc. If someone is trying to get the result of multiple categories they can select "in all results" and facet results from there. Since we don't have 25 categories, I don't feel that this is too much to ask of users. It is also easier to build and life is short.
  • add 'e.g.:' before the search examples
  • remove 'marfan syndrome disease' as one of the examples. 'syndrome disease' is an odd pairing.
  • add a search button to the right of the search bar (home page version only)

Thanks!

@nathandunn
Copy link
Contributor Author

@jmcmurry I need to be able to edit the issues so I can update the check boxes.

Also, its better to let me edit the todo-list based on your comments.

@jmcmurry
Copy link
Member

@nathandunn np for you to edit both the list and the check boxes; you should have perms to do so now.

@jmcmurry
Copy link
Member

Just an FYI, the longer term vision of autocomplete rendering is described here with rationale.
The JAX HPO autocomplete comes close.

iimpulse pushed a commit that referenced this issue Sep 12, 2019
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 a pull request may close this issue.

3 participants