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

Improve file manager and PDF.js interaction #839

Closed
2 tasks
Tracked by #903
jillpe opened this issue Oct 6, 2023 · 5 comments
Closed
2 tasks
Tracked by #903

Improve file manager and PDF.js interaction #839

jillpe opened this issue Oct 6, 2023 · 5 comments
Assignees

Comments

@jillpe
Copy link

jillpe commented Oct 6, 2023

Story

Currently, the file manager isn't selecting between PDFs for display in the viewer. If there are multiple PDFs, changing the representative media/thumbnail doesn't affect which one displays in the viewer.

Add the ability for the user to change which PDF is being displayed through the file manager selection.

Screenshots / Video

Screen.Recording.10-9-2023.at.2.45.PM.mp4

Testing Instructions

The following must be true before you begin:

  1. PDF.js feature flag is on. Admin Dashboard > Settings > Features
image
  1. Use a work that has imported a variety of file types (PDFS and Jpgs): https://demo.commons-archive.org/concern/generic_works/1d23ff36-15c5-4450-bf95-e01e1f83fcca?locale=en

Click on the file manager

  • when a user selects a non pdf file type as the representative media and click save. (NOTE: Yes, the save button looks disabled. please click it anyways) Go back to the work's show page. the UV displays the jpg.
  • when a user selects a pdf file as the representative media and click save. Go back to the work's show page. the PDJ.js viewer will display the selection.
@jillpe jillpe changed the title improve file manager and PDF.js interaction Improve file manager and PDF.js interaction Oct 6, 2023
@jillpe
Copy link
Author

jillpe commented Oct 6, 2023

Can you provide more details here? What do you you want to see here?

@ndroark
Copy link
Collaborator

ndroark commented Oct 6, 2023

Currently, the file manager isn't selecting between PDFs for display in the viewer. If there are multiple PDFs, changing the representative media/thumbnail doesn't affect which one displays in the viewer. I think the viewer displays the first uploaded or the first identified PDF associated with the work, but that may not actually be what it is doing.

If there is a non-pdf work (in this case, a jpeg), you can select it as representative and the system will load the IIIF viewer to display the image, but if afterward you select a pdf as representative, the system still displays the jpeg.

Ideally, the file manager should dictate what file is displayed, both in cases with multiple PDFs and no other file type, and with mixed file types. Users should be able to use the file manager to toggle between a Jpeg as representative (with the UV loading) and a PDF as representative (with whatever PDF viewer is set as default loading).

@kirkkwang
Copy link
Contributor

Hi @ndroark, when you say that you want the Users to be able to use the file manager, you mean public users? Not admins?

@ndroark
Copy link
Collaborator

ndroark commented Oct 6, 2023

No, only users with edit access to a work should be able to use the file manager for that work. That is the current functionality and we don't want to change that aspect of it.

kirkkwang added a commit that referenced this issue Oct 9, 2023
Currently, the file manager isn't selecting between PDFs for display in
the viewer.  If there are multiple PDFs, changing the representative
media/thumbnail doesn't affect which one displays in the viewer.  This
commit will add the ability for the user to change which PDF is being
displayed through the file manager.

Ref:
  - #839
@jillpe
Copy link
Author

jillpe commented Oct 12, 2023

SoftServ QA:
Work URL

https://demo.commons-archive.org/concern/generic_works/1d23ff36-15c5-4450-bf95-e01e1f83fcca?locale=en
Click on the file manager

  • when a user selects a non pdf file type as the representative media and click save.
    • (NOTE: Yes, the save button looks disabled. please click it anyways) Go back to the work's show page. the UV displays the jpg.
Screenshots

Image

Image

  • when a user selects a pdf file as the representative media and click save. Go back to the work's show page. the PDJ.js viewer will display the selection.
Screenshots

Image

Image

@jillpe jillpe closed this as completed Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

4 participants