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(files): Provide default file action for file entry name (on click action) #46768

Merged
merged 3 commits into from
Aug 1, 2024

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Jul 25, 2024

Summary

This fixes two issues with the files actions:

  1. Current the actions were handled by the FileListEntryActions component, and then weirdly accessed through the shadow DOM like $parent.$refs.something this is not reactive and leads to situations where the default actions was not correctly injected -> Tooltip was wrong
  2. We had two places where the download action was defined, first the download action and second as a fallback in the name component. So this is consolidated into only one place: The download file action. Meaning the download file action is now a default action. And if this is not injected in the name component, then the user can not download -> no fallback needed.
  3. (basically 2.1) the fallback download action was not using the encoded source, thus e.g. names with # were not correctly downloaded.

Checklist

@susnux susnux added this to the Nextcloud 30 milestone Jul 25, 2024
@susnux susnux requested a review from skjnldsv as a code owner July 25, 2024 23:52
@susnux susnux changed the title Fix/files actions fix(files): Provide default file action for file entry name (on click action) Jul 25, 2024
@susnux
Copy link
Contributor Author

susnux commented Jul 25, 2024

/backport to stable29

@susnux
Copy link
Contributor Author

susnux commented Jul 25, 2024

/backport to stable28

@skjnldsv
Copy link
Member

Yeah, the old legacy link/action was too weird in the end.
It's much cleaner to only rely on the provided file actions, you're 100% right!

@susnux susnux force-pushed the fix/files-actions branch 8 times, most recently from 7d7ce01 to 739716c Compare July 31, 2024 23:50
This fixes non reactive default action text of the name component.
Also use download action as default action so that only one place
is needed to define how to download a file.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants