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

search & search results page - details #55

Closed
eplebel opened this issue May 3, 2019 · 13 comments
Closed

search & search results page - details #55

eplebel opened this issue May 3, 2019 · 13 comments

Comments

@eplebel
Copy link
Contributor

eplebel commented May 3, 2019

search & search results page details as per this mockup:
(no data model changes required for this issue)
search-results-page

search results:

  • articles and authors appear in the search results list (search/matching based on article title, author_list, and authors)
    • authors are displayed on their own "card" with a generic person icon (material design "person"), name, affiliation, and # of articles linked to their author page (name is bold, affiliation is italicized, and # of articles is secondary grey #999999)
    • clicking anywhere on author card brings user to respective author page
  • FILTER & SORT BY buttons work exactly as on homepage (including displaying applied filters as a list of closeable chips in its own row just below the search results/FILTER/SORT BY row)
  • SHOW MORE reveals 10 more results (exactly as on homepage)
  • if no results, display "No results found. Browse recently added articles." (with 'Browse' hyperlinked to homepage)

search box/autocomplete component:

  • autocomplete search box (similar to search box within the article selector (accessed via clicking LINK EXISTING ARTICLE button) on author page, example)
    • autocomplete lists any matching articles and authors based on entered search text as per mockup above:
      • articles: Article title and authors/publication year (same colors as on article card)
      • authors: person icon, author name, and affiliation (similar to search results "author card", but with smaller "person icon" and without # of articles)
        (clicking an item within the list brings the user to the respective article or author page)
@mickaobrien
Copy link
Contributor

@eplebel Do you want the article cards in the search results to have the Edit/Link/Delete actions?

@eplebel
Copy link
Contributor Author

eplebel commented Jul 24, 2019

@eplebel Do you want the article cards in the search results to have the Edit/Link/Delete actions?

ya that's fine for now

@mickaobrien
Copy link
Contributor

@eplebel Cool, thanks. And do you want the article cards to be expandable as well? Or should clicking on them go directly to the full article page?

@eplebel
Copy link
Contributor Author

eplebel commented Jul 24, 2019

yes article cards expandable , and clicking on article title should bring user to full article detail page.

for author card, clicking anywhere on the card should bring user to respective author page.

@mickaobrien
Copy link
Contributor

Should clicking on the article title go to the article page for all cards e.g. on the home page or the author page?

@eplebel
Copy link
Contributor Author

eplebel commented Jul 24, 2019

yes

mickaobrien added a commit that referenced this issue Jul 27, 2019
mickaobrien added a commit that referenced this issue Jul 31, 2019
@eplebel
Copy link
Contributor Author

eplebel commented Aug 14, 2019

looking good, but can you add search icon within search box so that user can go to search results page for a specific search: that is, typing "lebel" + ENTER (or clicking search icon) will bring user to https://curate-science-staging-2.appspot.com/app/search?q=lebel

(while of course keeping existing auto-complete functionality)

@mickaobrien
Copy link
Contributor

@eplebel Will do!

mickaobrien added a commit to mickaobrien/curate_science that referenced this issue Aug 16, 2019
mickaobrien added a commit to mickaobrien/curate_science that referenced this issue Aug 16, 2019
mickaobrien added a commit that referenced this issue Aug 19, 2019
mickaobrien added a commit that referenced this issue Aug 23, 2019
@eplebel
Copy link
Contributor Author

eplebel commented Sep 2, 2019

final outstanding issues for contract#1:

  • plug in search results page functionality (& add search icon within search box) so that user can go to search results page for a specific search: eg typing "lebel" + ENTER (or clicking search icon) will bring user to https://curate-science-staging-2.appspot.com/app/search?q=lebel (as mentioned above) (while of course keeping existing auto-complete functionality)
  • make searchbox autocomplete component at least 2x wider (to improve readability, especially for long article titles and/or long author lists )
    • HOME and END keys don't work within searchbox (eg type "lebel", then hit HOME, notice how nothing happens, which prevents quick clearing/deletion of keyword; if this isn't an easy fix, we can postpone).
  • filtering/sorting of articles is not yet working (though this may just have been temporarily left out)
  • when filtering/sorting, duplicate authors appear in the search results list (but perhaps this will be resolved once filtering/sorting is fixed/implemented (point above))

mickaobrien added a commit that referenced this issue Sep 6, 2019
Clicking on the search button takes the user to the search results page. I've added a new result at the top of the results list ('View all search results for *query*'), this is a workaround because the library used here (`react-select`) doesn't allow you to disable autofocussing yet - JedWatson/react-select#3484

Making clicking on the search button work required another workaround that involves storing the query when the input is blurred (due to issues discussed here - JedWatson/react-select#805). This means that clicking on the search button should work as expected but clicking outside the input and then later clicking the search button will go to the search page for the last stored query even though the input is empty. This isn't great but hopefully a rare enough case (why click on the search button for an empty search box?) that it's worth it to have it working like this for the moment.
mickaobrien added a commit that referenced this issue Sep 6, 2019
mickaobrien added a commit that referenced this issue Sep 6, 2019
@mickaobrien
Copy link
Contributor

mickaobrien commented Sep 6, 2019

@eplebel The HOME and END key logic is a bit tricky at the moment. The library used for this component (and the article selector autocomplete) is a bit weird, the focus is on the dropdown rather than the input so the HOME and END keys work to move up and down the list of suggestion but not within the input. I don't think there's any way around this for the moment (there is a related PR that might help eventually). There were a few issues with this for the basic search functionality as well i.e. going to the search results page on pressing enter. Ultimately I think this library should be replaced with something more appropriate, but that's maybe a job for another day.

The filters and sorting should work now. Let me know if there are any duplicates showing up still, I found one reason but I'm not sure it covers everything.

@eplebel
Copy link
Contributor Author

eplebel commented Sep 7, 2019

ok we'll just punt on the HOME/END key issue for now (thanks for all the info.... i didn't realize the pre-existing implementation for that component was that "weird", we definitely should use a more appropriate library, but something we'll have to fix later).

and yes the filters and sorting are working, and i haven't seen any duplicates, so i'm marking this page as done!

@eplebel eplebel closed this as completed Sep 7, 2019
@eplebel eplebel reopened this Sep 10, 2019
@eplebel
Copy link
Contributor Author

eplebel commented Sep 10, 2019

shoot, i just noticed this issue whereby figures, videos, talks, supp materials, and news coverage items are missing from article cards on search results page (but are showing correctly on homepage recent list and author page). though i've got a feeling this is likely an easy fix!

see screenshot below showing the same article with missing stuff on the search results page (left), and with all stuff on the homepage recent list (right):
Untitled

@mickaobrien

@mickaobrien
Copy link
Contributor

Should be fixed in this commit.

@eplebel eplebel closed this as completed Sep 10, 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

No branches or pull requests

2 participants