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

Add support for ?view=grid query param to allow shared links to default to grid view #31159

Closed

Conversation

chuckdries
Copy link

@chuckdries chuckdries commented Feb 13, 2022

inspired by https://help.nextcloud.com/t/question-display-grid-view-when-sharing-a-folder-of-photos-via-url/56812/8

fixes #17762

  • I'm open to using a hash instead of a query param as the help forum post suggests. Query param just felt like it made more sense to me.
  • Does not implement any UI for setting this query param
  • Does not add any documentation that this query param exists
  • Subject to the same bug as the forum post: the user must double click the list view button to switch from grid to list view

I'm open to attempting to improve on any of the bullet points above if requested

…lt to grid view

Signed-off-by: Chuck Dries <chuck@chuckdries.com>
@szaimen szaimen added 3. to review Waiting for reviews enhancement labels Feb 14, 2022
@szaimen szaimen added this to the Nextcloud 24 milestone Feb 14, 2022
@szaimen szaimen requested review from a team, PVince81, artonge, skjnldsv, jancborchardt and nimishavijay and removed request for a team February 14, 2022 09:56
@szaimen szaimen added the design Design, UI, UX, etc. label Feb 14, 2022
Copy link
Member

@jancborchardt jancborchardt left a comment

Choose a reason for hiding this comment

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

Generally seems good but I can’t judge the code. :)
Relevant code to pick this up will then have to be implemented in

  • the Photos app
  • in Files, we could automatically invoke this in a share link when the sender has the folder view set to grid?

@jip149
Copy link

jip149 commented Feb 26, 2022

I'm not a nextcloud developer but this doesn't seem like a clean implementation. This is useful as a quick and dirty hack in the meantime for people needing the feature, but breaks too many things to be part of the official code.

Currently grid view is set to false in apps/files_sharing/lib/Controller/ShareController.php. Changing it to true works as expected: grid view is shown as initial view for all shared folders.

An UI setting should be added when creating share link for initial view, and the controller should use it to set initial value of 'showgridview'.

Of course this is all my humble opinion.

@chuckdries
Copy link
Author

I'm no php developer but I'll take a shot at that this weekend

@skjnldsv skjnldsv mentioned this pull request Mar 24, 2022
@blizzz blizzz mentioned this pull request Mar 31, 2022
This was referenced Apr 7, 2022
@blizzz blizzz modified the milestones: Nextcloud 24, Nextcloud 25 Apr 21, 2022
@seikobu
Copy link

seikobu commented Jun 6, 2022

I'm sorry, to ask here but I'm still figuring things out...
I'm looking for this specific feature (presenting grid-view for public shared links)

Do I read this history correctly, that it was merged to Nextcloud 24 RC 1?
I tried installing the latest/edge version from Snap wich seems to be based on 25 and adding "?view=grid" didn't work ... so I guess its not included?
On the other hand I found no way to install 24RC1 via snap as it seems it's not a implemented channel?

Any help would be appreciated 🙈

This was referenced Aug 12, 2022
@blizzz blizzz mentioned this pull request Aug 24, 2022
@chuckdries
Copy link
Author

This PR was not merged. Sorry, but I didn't get around to making the requested changes and no longer have time or desire to do so.

This was referenced Aug 30, 2022
@blizzz blizzz mentioned this pull request Sep 9, 2022
@chuckdries chuckdries closed this Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews design Design, UI, UX, etc. enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to default to grid view when sharing link
6 participants