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

Album/Grid view by default on shared folder #29013

Open
martinoshub opened this issue Oct 1, 2021 · 2 comments
Open

Album/Grid view by default on shared folder #29013

martinoshub opened this issue Oct 1, 2021 · 2 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement feature: sharing

Comments

@martinoshub
Copy link

martinoshub commented Oct 1, 2021

A very typical use case for NextCloud would be to upload photos to a folder and share it with a family member, who is a less technical person and/or may not spot the tiny grid toggle button in the top right hand corner. To them, the file list view by default is a massive letdown - a grid of thumbnails would serve them much better.

I'm lost as to why an option to link to the grid view is still a problem in the current version (22).

I've googled suggestions and solutions. They range from this option existing (or even being the default) in previous versions, through ability to add #grid-view at the end of the URL (which no longer works), to manually hacking into JS files to sort-of get this result (and then lose this feature on the next update).

I'm not even asking for this to be a fancy option in the Share box, I would be happy if I could simply just append #grid-view at the end of a shared URL and send that link to people (without having to create an account for them).

Adding the ability to show public shared folders in an album (grid) view would be a great overall improvement to Nextcloud in my opinion. It can't be that hard, just make the page listen to a # parameter and simulate a click on the grid toggle button. Thanks in advance for considering this request.

Edit: the 'hacky' way in the current version to make it default to a grid view (instead of a list view) is:

line 401: apps/files_sharing/lib/Controller/ShareController.php
$folder->assign('showgridview', true);

Still, a URL hash option and/or a config.php variable would be great though, I haven't dug that deep.

@martinoshub martinoshub added 0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement labels Oct 1, 2021
@Jerome-Herbinet
Copy link
Member

Adding or restoring support for a parameter at the end of a URL seems fine to me, but it doesn't seem to me to be a sustainable solution from a UX/UI point of view.

The ideal would be :

  1. to add this choice in the sharing options (desktop browser interface + mobile client + sharing options in the file explorer when the desktop synchronization client is installed)
  2. to store this choice by default in the database, where the sharing parameters are located (this is in my humble opinion cleaner, more durable, and more scalable)

I realize that this would be a lot more work than just using a parameter at the end of the URL, but it would be a big advantage.

Indeed, for years, when I share photos, most people don't see (or understand) that it is possible to change the view.

Also, as someone who shares photos from the "Nextcloud Photos" app, this behavior is even more incomprehensible (frustrating) because in this app, images are displayed in thumbnail mode all the time (so why would the shared view be different from the view in Nextcloud Photos).

That said, I did understand that the side panel and its tab dedicated to sharing comes from Nextcloud Files (common core).

@h4knet
Copy link

h4knet commented Aug 30, 2022

in NC 23.0.8 it's on line 428.

From:

                        // default to list view
                        $folder->assign('showgridview', false);

To:

                        // default to grid view
                        $folder->assign('showgridview', true);

You also have to change the line 441 in order to have the corect number of images loaded by default :

                        // default to list view
                        $shareTmpl['showgridview'] = false;

To:

                        // default to grid view
                        $shareTmpl['showgridview'] = true;

It's working correctly for me ! Thanks for the research.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement feature: sharing
Projects
None yet
Development

No branches or pull requests

4 participants