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

Simple Search #136

Closed
artlowel opened this issue Aug 3, 2017 · 0 comments
Closed

Simple Search #136

artlowel opened this issue Aug 3, 2017 · 0 comments
Assignees
Milestone

Comments

@artlowel
Copy link
Member

artlowel commented Aug 3, 2017

This task depends on #134

Create an initial version of a search page.

It should have a search component at the top, containing an input box, a scope select and a "go" link, styled as a button

Underneath it should show a SearchResultsComponent, that makes use of the ObjectListComponent to show a paginated list of search results, with the gear showing to select the number of results per page and sort options.

The ObjectListComponent will need to be adapted to work with SearchResult objects. The way the different DSO's are rendered should be the same (positioning of thumbnails, values of the link and the descriptions, etc) the difference with SearchResults should be that if one of the used metadata fields exists in the hitHiglights array, the hit-highlighted value should be used (and rendered as HTML) instead of the DSO's.

The SearchComponent and SearchResultsComponents should be "dumb", meaning they shouldn't connect to the SearchService directly, but get their values and send their events using inputs and outputs.

The SearchPageComponent is the "smart" component that listens to the events from the SearchComponent, uses them to call the SearchService's search method, and push the results to the SearchResultComponent's input.

The SearchPageComponent should also ensure the query and all its parameters are reflected in the URL, so you can link to a specific query.

It would be great to have a search as you type feature, where, if you stop typing for a configurable amount of time (I'd start with about 200ms and see how that feels) a search is automatically executed. RxJS's debounce operator will likely be useful for that.

Note that even if it has search as you type, the search button is still necessary for clients without javascript

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants