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 conditional PDF split or PDF.js #200

Merged
merged 1 commit into from
Nov 29, 2023
Merged

Conversation

jeremyf
Copy link
Contributor

@jeremyf jeremyf commented Nov 28, 2023

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 [email protected]
Co-authored-by: Kirk Wang [email protected]

Copy link
Contributor

@laritakr laritakr left a comment

Choose a reason for hiding this comment

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

Wow. That's a lot!

I think I followed it.. just the question about the yml file that was added.

And of course, the lint fix.

# Only use for local development
version: '3.8'
services:
# Uncomment to allow for the use of a ruby debugger (byebug, pry, etc) in Docker.
Copy link
Contributor

Choose a reason for hiding this comment

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

The comment says this is uncommented for debugging... is this intended to be committed uncommented?

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:

- scientist-softserv/palni-palci#666
- scientist-softserv/palni-palci#675
- scientist-softserv/palni-palci#704
- scientist-softserv/palni-palci#705
- #162

Co-authored-by: Shana Moore <[email protected]>
Co-authored-by: Kirk Wang <[email protected]>
@jeremyf jeremyf merged commit 2ad14dd into main Nov 29, 2023
2 checks passed
@jeremyf jeremyf deleted the conditional-iiif-print branch November 29, 2023 19:47
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