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

fix: Show PDF even when download hidden on public share #3872

Merged
merged 5 commits into from
Aug 7, 2024

Conversation

elzody
Copy link
Contributor

@elzody elzody commented Aug 3, 2024

Summary

Issue seemed to be caused by loading files.js in addition to public.js, so the logic was just moved to the newer implementation in public.js.

TODO

  • When the download button is not set to be hidden, should the shared document automatically open at all?

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Documentation (manuals or wiki) has been updated or is not required

Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
@elzody elzody added bug Something isn't working 2. developing Work in progress javascript Pull requests that update Javascript code regression labels Aug 3, 2024
@elzody elzody self-assigned this Aug 3, 2024
src/public.js Outdated Show resolved Hide resolved
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
@elzody
Copy link
Contributor Author

elzody commented Aug 5, 2024

/backport to stable29

@elzody
Copy link
Contributor Author

elzody commented Aug 5, 2024

/backport to stable28

@elzody
Copy link
Contributor Author

elzody commented Aug 5, 2024

/backport to stable27

@elzody elzody changed the title Fix/show when download hidden fix: Show PDF even when download hidden on public share Aug 6, 2024
src/public.js Outdated
OC.Plugins.register('OCA.Files.NewFileMenu', NewFileMenu)
}

if (isPdf()) {
Copy link
Member

Choose a reason for hiding this comment

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

I think we should only trigger this if it is actually "download hidden share" or if the files_pdfviewer app is disabled. Otherwise the regular pdf viewer should be preferred.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I'm understanding you correctly, it should be fixed in my recent commits -- essentially, if the download is hidden or the files_pdfviewer is not enabled, open the PDF in richdocuments. Also open in richdocuments if it's an office document. otherwise, let the viewer handle it

Copy link
Member

Choose a reason for hiding this comment

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

Yes, just went through testing the different constellations and looks all good 👍

Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress bug Something isn't working javascript Pull requests that update Javascript code regression
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Public share of a PDF file with download set to "hidden" does not open automatically
2 participants