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

Listings should not download files directly #5977

Open
wesleybl opened this issue Apr 23, 2024 · 7 comments
Open

Listings should not download files directly #5977

wesleybl opened this issue Apr 23, 2024 · 7 comments

Comments

@wesleybl
Copy link
Member

Is your feature request related to a problem? Please describe.
It's weird when you're in a listing and you click a file link and a download starts. Especially when the listing has files and pages mixed together. It has no indication that a list item is a file.

Describe the solution you'd like
The link to the file should not download the file but go to the file view. In Plone Classic it's like this.

Describe alternatives you've considered
The downloadableObjects setting should be empty by default.

@wesleybl
Copy link
Member Author

@giuliaghisini @sneridagh @nzambello opinions?

@davisagli
Copy link
Sponsor Member

This is intentional (it's annoying to make users click through an extra screen to download the file) but note that similar to the Link content type, the intended behavior is different based on whether or not the user has permission to edit the item. Users who can edit the file should be taken to its view; other users should get the download immediately.

It's a fair point that we might want to make it more clear that the link will start a download.

@djay
Copy link
Member

djay commented Apr 30, 2024

@davisagli other systems deal with this better by having the link have on hover option to edit instead or an edit icon next to the link but only if you have permission to edit. Normal users just see the link. This means that the link does the same thing no matter who you are. This is less confusing.

@ichim-david ichim-david changed the title Listings do not download files directly Listings should not download files directly May 2, 2024
@ichim-david
Copy link
Sponsor Member

This is intentional (it's annoying to make users click through an extra screen to download the file) but note that similar to the Link content type, the intended behavior is different based on whether or not the user has permission to edit the item. Users who can edit the file should be taken to its view; other users should get the download immediately.

It's a fair point that we might want to make it more clear that the link will start a download.

@davisagli if only it was that smart,


We don't really use any permission checking, we just have the check for token thus assuming this is how any logged in users should see something. This is something that I think Volto needs to develop better, an easier pattern of checking for permissions alongside a beefier validation system.

@wesleybl there is nothing special right now regarding listings and display of links, everything goes through UniversalLink and there you have the downloadableObjects option.

I would be in favor of bringing behavior parity between Volto and Plone Classic but if this is a no go we should see about having maybe an icon added within UniversalLink to indicate that it's a download like there are icons to indicate it's an external link.
Don't know how the Volto team feels about this, worst-case scenario you add it to your own project but if you mockup something I'm sure it can get at least the conversation going.

@wesleybl
Copy link
Member Author

wesleybl commented May 6, 2024

@davisagli @ichim-david I know there is a difference between authenticated and anonymous. I was talking about anonymous users.

I specifically talked about listings, because there are no visual differences between files and other types. In a "rich text", the manager can differentiate with texts and images.

But while there is no such visual difference, perhaps the downloadableObjects pattern should be an empty list?

@djay
Copy link
Member

djay commented May 13, 2024

@ichim-david I'd take that idea further and have a click on that icon (or another one) let the logged in user view the content object instead of download it. Clicking on the link itself then would work the same for everyone. This is much less confusing

@ichim-david
Copy link
Sponsor Member

@davisagli @wesleybl @djay I am all in favor of having options to change a default behavior in order to suit the needs of the users.
We could even have an option within the listing or search block to pass the downloadableObjects options and as such have it enabled on a case by case as needed.
Unfortunately unless we some more input from the @plone/volto-team I don't know what would be accepted by the larger core team. I expect most are busy now preparing for the Beethoven sprint.
I know that if someone has an idea it would be worth recording a video or posting some screenshots in order to see if there is any feedback on that proposal especially if we are talking about introducing front-facing changes for anonymous users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants