Open martinoshub opened 3 years ago
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 :
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).
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.
The ideal would be :
yes. But two years later a "#grid" or "&ui=grid" would be great :-)
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.