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

Add basic selection behavior to content search results #2675

Closed
jkeck opened this issue Jun 10, 2019 · 2 comments · Fixed by #2696
Closed

Add basic selection behavior to content search results #2675

jkeck opened this issue Jun 10, 2019 · 2 comments · Fixed by #2696
Assignees
Labels
ContentSearch 🔎 IIIF Content Search API

Comments

@jkeck
Copy link
Member

jkeck commented Jun 10, 2019

I think the selection behavior on the Annotation panel is a good model for what we want to do on the search panel. For example, in the mockup below, result item #3 is the currently selected item and has the darker, "selected" background color (same as on the Annotation panel). At the same time, I am mousing over result item #2, so it gets the lighter, "hover" background color:

Screen Shot 2019-06-11 at 4 50 32 PM

If I was to click result item #2 to select it, its background color would change to the darker gray. And the background color for result item #3 would be removed.

And, of course, all associated elements (result hit navigation in the header, the canvas shown, the result item highlight on the canvas) would be updated based on my new selection of result #2, as covered in #2683 and #2684.

One difference from the annotation panel is hovering a result item in the results panel body area doesn't change the hit highlighting on the canvas, since for the results we want to show all hits on the current canvas, while on the annotation panel we only highlight on the canvas the selected and hovered annotations, not all annotations on the canvas.

@jkeck jkeck added the Mirador3 label Jun 10, 2019
@mejackreed mejackreed added the ContentSearch 🔎 IIIF Content Search API label Jun 10, 2019
@mejackreed
Copy link
Collaborator

In a break out session (6/12/2019) we had some realization that there is a slight variation between content search display and annotations. Content search results should be displayed (blue) color by default (Implemented in #2693 and #2689).

Selections can happen in yellow by clicking.

@ggeisler
Copy link
Collaborator

Another aspect that is different from annotations that might not be immediately obvious (if it is, sorry for the unnecessary explanation), though I allude to it in some specific ticket to do items: there is always one, and only one, search result item selected. In other words, there should always be one hit on the canvas that is highlighted in yellow (and highlighted correspondingly in the panel).

When the results are first loaded, the first result item is selected and thus highlighted automatically, and after that it is whichever result item the user chooses to select. (In a paged scenario, it would also be the first one on a newly navigated-to page).

That's different from annotations, but consistent with how search results work in other contexts, such as searching a web page via the browser, or searching directly in a PDF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ContentSearch 🔎 IIIF Content Search API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants