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

ISSUE-436: PDFJS 4.x + VTT Content Search API + Mirador 4.0 alpha 2 + ML #437

Merged
merged 37 commits into from
Jun 19, 2024

Conversation

DiegoPino
Copy link
Member

@DiegoPino DiegoPino commented Apr 4, 2024

See #436

  • New ML supporting Code for Annotations + JS Triggers
  • Newest PDF.js via module import/async (might need to pass the actual paths from PHP, but this also works)
  • Theme level/template level accessibility and margins. Anyone can override the template
  • New Option (simple/not so simple). Once I have the code the not so simple will enable native PDF.js search by using the pdfViewer class and the bus/dispatch/search controller. UPDATE: Or maybe I use the PDF Search Controller directly without the viewer. That would give me more control.
  • Mirador 3.3.0 (default) and Mirador 4.0 alpha 2. (The former has CSS issues by the way, z-index)
  • IIIF Content Search API with VTT and Plain Text (time/space mutation) processing + new settings
  • JS improvements + small CSS
  • New Twig template based Ajax/JS processors (data properties) for Views (on load/on click) and for Annotations (miniOCR) saved in Flavors with new Solr based Endpoint in our Annotations REST API

Not a lot since we have so far next/prev. But it does work. Tab selection. Passes the tests.
@DiegoPino DiegoPino self-assigned this Apr 4, 2024
@DiegoPino DiegoPino added enhancement New feature or request Javascript Favourite language of a PHP developer Field Formatter The thing that glues the pieces and adds glitter UX Like UI but with an X Working Group's 💜 Imagined, curated and loved by the Working Group Search and Discovery Mess around and find out labels Apr 4, 2024

var scale = 1.5;
var viewport = page.getViewport({scale: scale});
import("https://cdn.jsdelivr.net/npm/[email protected]/build/pdf.min.mjs").then((pdfjsLib) => {
Copy link
Member Author

@DiegoPino DiegoPino Apr 4, 2024

Choose a reason for hiding this comment

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

These two here could be settings passed by PHP .... have to think about it

… pure text

to the Content Search API
@alliomeria (will explain tomorrow)
… too

Next step is to make 3 different queries based on what processors we have (so far this just does OCR so X/Y and Time)
And add JMESPATH expressions to extract VTTs and Plain Text from annotations associated to a canvas.
@alliomeria more soon! (we are close :)
+ Plus a whole veggie garden of code to support VTT
@alliomeria 4.0.0 alpha-2 at least allows an user to pick a subtitle, does not enable one by default though.
…st yet

So we can still dispatch an event, but not from our Window Dom, but from the parent/initialized Archipelago DIV (will it work? who knows ... but probably was not working before anyways hahaha)
…ernal items level.

So basically a new JMESPATH selector (wish i had better things to do on a weekend)
…ion OR

a Canvas as target.

None of these work with Mirador sadly (at least so far)
.. but i have not yet implemented the extra "hits" structure for V1
or "Annotations" for V2 that allow the before and after to be used.
@alliomeria will explain during our call
@DiegoPino DiegoPino changed the title ISSUE-436: PDFJS 4.x ISSUE-436: PDFJS 4.x + VTT Content Search API Apr 30, 2024
@DiegoPino DiegoPino changed the title ISSUE-436: PDFJS 4.x + VTT Content Search API ISSUE-436: PDFJS 4.x + VTT Content Search API + Mirador 4.0 alpha 2 Apr 30, 2024
@alliomeria you will have a great presentation. I'm not sure about OR (me) though!
…s on single images

Not ready. Lot's to do still. This is 🌰
But i will have to remove tons of code afterwards (means this commit basically does not work because of a Drupal bug that leads to all Drupal.views stored globally being deleted when two ajax views are present in the same page and one uses the Pager of one... damn)
…extual one

Also, for contextual ones, use the "exception" value instead of NULL
So we can avoid passing "NULL" and end being not validated because of that.
$executable->exposed_data = $filters; was the trick ..
@DiegoPino DiegoPino changed the title ISSUE-436: PDFJS 4.x + VTT Content Search API + Mirador 4.0 alpha 2 ISSUE-436: PDFJS 4.x + VTT Content Search API + Mirador 4.0 alpha 2 + ML May 27, 2024
So far so good. But the Actual Search needs adapting for non OCR so we return a proper annotation
@alliomeria need to share the IIIF Manifest that drives this. Very similar to VTT
When multiple canvas, videos,audios, text are all present in the Content
Search Results
…ht take that time

@alliomeria i think i got it this time. But i can't say for sure. At least nothing breaks and the canvas swapping does work
@DiegoPino DiegoPino added this to the 1.4.0 milestone Jun 19, 2024
@DiegoPino
Copy link
Member Author

@alliomeria Merging. Will keep working on the new issue/features in other branches, this one just became too huge.
TODO:

  • Document the new data-property (twig/html) driven Ajax/JS interactions. (for us too bc I will forget how this all works). I will make a pull request tomorrow AM + OpenAPI one too

@DiegoPino DiegoPino merged commit 6cac775 into 1.4.0 Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Field Formatter The thing that glues the pieces and adds glitter Javascript Favourite language of a PHP developer Search and Discovery Mess around and find out UX Like UI but with an X Working Group's 💜 Imagined, curated and loved by the Working Group
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant