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

feat: item media annotation search #2456

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

rwd
Copy link
Contributor

@rwd rwd commented Oct 17, 2024

Composables:

  • update itemMediaPresentation:
    • add support for searching annotations via the IIIF Search API service on the Presentation manifest, and storing results and hits in new refs
    • add a new ref for the active annotation
  • create activeTab:
    • helper for when using Bootstrap Vue tab to pre-select the active tab based on the hash in the route, and to update the route hash when the active tab changes

Components:

  • update ItemHero:
    • stop computing the full text query and prop-drilling it down from here
  • update ItemMediaPresentation:
    • stop handling annotation updates, which annotation components should do directly via useItemMediaPresentation composable
  • update ItemPreviewCard:
    • add props to set route query and hash on item links
  • update ItemPreviewCardGroup:
    • compute the full text query (from a search) and pass to ItemPreviewCard, plus default to the annotation search tab via the hash if one is present
  • update ItemMediaSidebar:
    • new tab for annotation search
    • tab selection based on route hash, via activeTab composable
  • update MediaAnnotationList:
    • update active annotation directly via useItemMediaPresentation composable, not by emitting it
    • when active annotation changes, update the route for the relevant page and the annotation ID itself
    • on load, if there is an annotation ID in the route query, make that the active annotation
    • add a query prop which takes a search term, and if present searches annotations rather than fetching those for the current page/canvas
    • when searching, display hit highlights
  • create MediaAnnotationSearch:
    • renders a form with a text input field for entering a search query
    • when the form is submitted, search the IIIF Search API service by rendering as a child component MediaAnnotationList with the search query passed to it

Copy link

JIRA ticket: EC-6945

@rwd rwd marked this pull request as ready for review October 17, 2024 09:47
Copy link

Preview deployment: https://pr-2456.portal-js.dev.eanadev.org/

Copy link

sonarcloud bot commented Oct 23, 2024

return { fetchPresentation, hasAnnotations, page, resource, resourceCount, setPage, setPresentationFromWebResources };

return {
activeAnnotation,
Copy link
Member

Choose a reason for hiding this comment

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

This is being passed as a prop to MediaImageViewer. Wouldn't it make more sense to have the viewer use it from the composable directly? Or is there some reactivity that comes from passing it in as a prop?

page,
pageForAnnotationTarget,
Copy link
Member

Choose a reason for hiding this comment

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

this doesn't actually seem to be used in the Presentation at this point.

resource,
resourceCount,
selectAnnotation,
Copy link
Member

Choose a reason for hiding this comment

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

This is also not used here anymore since it's moved to the annotationList.

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.

2 participants