scientist-softserv / atla-hyku

Other
0 stars 0 forks source link

🎁 Add conditional PDF split or PDF.js #200

Closed jeremyf closed 7 months ago

jeremyf commented 7 months ago

This is a preliminary commit to add conditional logic for either rendering PDF.js or IIIF viewer for split pages.

There is a particular case where QA might appear to fail:

  1. Set the Tenant to use UV
  2. Create a work with a PDF (this will split the page)
  3. Go to the work's page, you'll see the UV
  4. Set the Tenant to use PDF.js
  5. Refresh the work page, and you should see PDF.js but instead will see the UV.

To work around this (and realistically how most people will experience this):

  1. Set the Tenant to use UV
  2. Create a work with a PDF
  3. Go to the Dashboard
  4. Click the work's URL
  5. You should see a UV for the PDF
  6. Close the work's page
  7. Change the tenant to use PDF.js
  8. Go to the Dashboard
  9. Click the work's URL

The conjecture is that there's some iframe and/or turbolinks caching. Given that this is an edge case regarding toggling on and off a tenant feature, we think the work around is adequate.

Related to:

Co-authored-by: Shana Moore shana@scientist.com Co-authored-by: Kirk Wang kirk.wang@scientist.com