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

WIP PDF Viewer #6575

Closed
wants to merge 1 commit into from
Closed

WIP PDF Viewer #6575

wants to merge 1 commit into from

Conversation

diocas
Copy link
Contributor

@diocas diocas commented Mar 10, 2022

To kickstart discussion.
This also doesn't fix the issue with the name missing when downloading, unfortunately.

#6167

@update-docs
Copy link

update-docs bot commented Mar 10, 2022

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@diocas diocas marked this pull request as draft March 10, 2022 15:01
@ownclouders
Copy link
Contributor

Results for oC10Files2 https://drone.owncloud.com/owncloud/web/23529/17/1

💥 The acceptance tests failed on retry. Please find the screenshots inside ...

webUIFilesActionMenu-fileFolderActionMenu_feature-L14.png

webUIFilesActionMenu-fileFolderActionMenu_feature-L14.png

💥 The acceptance tests pipeline failed. The build has been cancelled.

Copy link
Contributor

@kulmann kulmann left a comment

Choose a reason for hiding this comment

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

Didn't find a way around the Presentation mode not working, yet. But to be honest, that would not be a blocker for having this app, since the users still can download the pdf.

extensions: [
{
extension: 'pdf',
newTab: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO it's not needed anymore to open in a new tab whenever the top bar is visible (which is always the case now). Also, the closeApp helper offers a way back to the source file in the files app with just one line of code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think we will agree with this. We also consider opening in a new tab to be more consistent with other apps. Can I make it configurable? (the last time I looked at it, I think it would require some changes to pass the config here, but this would be an interesting thing to do for other apps as well).

packages/web-app-pdf-viewer/src/App.vue Outdated Show resolved Hide resolved
packages/web-app-pdf-viewer/src/components/ErrorScreen.vue Outdated Show resolved Hide resolved
this.filePath = this.currentFileContext.path

try {
let resource = await this.getFileInfo(
Copy link
Contributor

Choose a reason for hiding this comment

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

Can be simplified by using getFileContents which you made available via useAppDefaults, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The problem is that getFileContents returns text instead of blob.

Copy link
Member

Choose a reason for hiding this comment

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

Then let's add handling of blob as resolveType here

https://github.com/owncloud/owncloud-sdk/blob/b5df7ff922bfc9c1d70763267335df982331cbd4/src/helperFunctions.js#L343

This kind of logic should never be handled in an app imho

Copy link
Member

@dschmidt dschmidt Mar 18, 2022

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

@diocas Would you like me to take this over and adjust to that? (also some routing changes in my pipeline once again)

Copy link
Contributor

Choose a reason for hiding this comment

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

Available by bumping the owncloud-sdk to v3.0.0-alpha.3

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pascalwengerter feel free to take it, thanks (just add the cern tag to the new PR please)

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the feedback @diocas, it'll be @dschmidt who'll take over from here I think 🐎

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@ownclouders
Copy link
Contributor

Results for oC10Files2 https://drone.owncloud.com/owncloud/web/23812/17/1

💥 The acceptance tests failed on retry. Please find the screenshots inside ...

webUIFilesActionMenu-fileFolderActionMenu_feature-L14.png

webUIFilesActionMenu-fileFolderActionMenu_feature-L14.png

💥 The acceptance tests pipeline failed. The build has been cancelled.

@dschmidt dschmidt mentioned this pull request Mar 23, 2022
10 tasks
@pascalwengerter
Copy link
Contributor

Closed in favor of the more recent and polished #6654, thanks @diocas for the initiative! 😎

@diocas diocas deleted the pdf_viewer branch March 24, 2022 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants