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(resource): add document viewer with download (DSP-1791) #485

Merged
merged 12 commits into from Jul 19, 2021

Conversation

kilchenmann
Copy link
Contributor

@kilchenmann kilchenmann commented Jul 16, 2021

resolves DSP-1791

In this PR I actually wanted to integrate a simple download button for pdf file representations. But the main work was to generalise how we handle the different representation types. Previous everything was prepared for still images only. This is why I had to create a general FileRepresentation type. Additional I integrated a simple angular pdf viewer (ng2-pdf-viewer) and styled it the same way as we already did for the opeansedragon viewer for still images. I just had to adjust the still image viewer resp. I had to move the style to our main styling files to use the same setup for the new document viewer.

@kilchenmann kilchenmann self-assigned this Jul 16, 2021
@kilchenmann kilchenmann added dependencies Pull requests that update a dependency file enhancement New feature or request refactor Refactor or redesign labels Jul 16, 2021
@kilchenmann
Copy link
Contributor Author

kilchenmann commented Jul 16, 2021

This is how the still image viewer looks like:
Screen Shot 2021-07-16 at 16 26 12

And here's the new document viewer:
Screen Shot 2021-07-16 at 16 26 02

It's a first iteration and the viewer can still be improved with a lot of features. But for the moment this should be enough.

Copy link
Contributor

@waychal waychal left a comment

Choose a reason for hiding this comment

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

For me open file in new tab button is not working but it is expected as I am using the test server for dsp-api. Other than that everything looks fine to me.

I will let @mdelez to approve the PR as he could also test the open file in new tab functionality.

Copy link
Collaborator

@mdelez mdelez left a comment

Choose a reason for hiding this comment

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

Works great and I can open my files in a new tab :)

@kilchenmann kilchenmann merged commit ce51bce into main Jul 19, 2021
@kilchenmann kilchenmann deleted the wip/dsp-1791-document-viewer branch July 19, 2021 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request refactor Refactor or redesign
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants