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

[Enhancement] Set album visibility recursively #1411

Open
mrpijey opened this issue Jul 22, 2022 · 13 comments
Open

[Enhancement] Set album visibility recursively #1411

mrpijey opened this issue Jul 22, 2022 · 13 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@mrpijey
Copy link

mrpijey commented Jul 22, 2022

At the moment you can set a single albums visibility to public or sensitive, but would be great to allow this to do this recursively to allow it to affect all sub-albums as well.

If you have a large gallery with lots of sub-galleries and what to change the visibility settings for all of them you have to do it manually one by one today, or go directly into the database which is impossible for hundreds of sub-albums.

@ildyria
Copy link
Member

ildyria commented Jul 22, 2022

That could be done, but there are use cases where you don't want that behaviour. e.g. if some of your sub albums are hidden.

@mrpijey
Copy link
Author

mrpijey commented Jul 22, 2022

Of course, but there are also are user cases when you do. So put a proper "do you really want to this?" option on it so you can't accidently do it. Or put it in the admin menu or something where it can't be done without proper thought.

@nagmat84
Copy link
Collaborator

nagmat84 commented Jul 22, 2022

This issue is a duplicate. I will look for the duplicate ID as soon as I am in front of a proper PC. The idea by @mrpijey is actually rather old.

For each album one can either select that the album inherits the settings of its parent album or the user can define independent settings.

Then, when the user defines visibility settings, the user can either select

a) the new settings shall only apply to the current album and all child albums which have been inheriting the previous settings will become independent
b) the settings shall apply to the current album and all child albums which are currently inheriting the settings of the current album
c) the settings shall apply to the current album and all child albums shall be reset to inherit these settings even those albums which had independent settings before

This is basically the same approach as used by the NTFS filesystem and is probably the "gold plate solution".

I would actually love to implement that and it is on my todo list after the unfortunate web installer, but until then there are still so many other things which need to be refactored.

@mrpijey
Copy link
Author

mrpijey commented Aug 4, 2022

Well I guess this issue can be closed then if it's a duplicate. Unfortunately there are other issues with this software that prevents me from using it so I will have to look for alternatives, or wait until these issues are fixed.

Thank you.

@ildyria ildyria added the duplicate This issue or pull request already exists label Aug 4, 2022
@ildyria
Copy link
Member

ildyria commented Aug 4, 2022

Duplicate of #1084 indeed. However, I will be closing #1084 and keep this one as there are more "usable" material here.

@ildyria ildyria added enhancement New feature or request and removed duplicate This issue or pull request already exists labels Aug 4, 2022
@ildyria ildyria changed the title Set album visibility recursively [Enhancement] Set album visibility recursively Aug 4, 2022
@ildyria
Copy link
Member

ildyria commented Aug 4, 2022

Some thoughts & design proposal.

Implementation

  • : add Column inherits_protection_policy in the base_albums or albums table.
  • : when changing visibility (radio button or drop down?)
    • : 0 - Propagate to sub-albums with the inherits_protection_policy flag on (i.e. refresh sub-albums visibility).
    • : 1 - Only apply to current album +
      first-level sub-albums keep their current visibility settings and become independent (note that second-level+ sub-albums keep their inheritance).
    • : 2 - Force propagation to sub-albums unconditionally (will also force current visibility inheritance propagation).

Defaults

  • : add default setting 0|1 for default_inherits_protection_policy in configs table for newly created albums.
  • : add default setting 0|1|2 for propagate change to sub albums in config table to add the propagation setting in the visibility dialog box. I would suggest 0.

Implementations thoughts:

  1. apply change to current album
  2. apply propagation if necessary.
    When applying refresh do a _lft to _rgt scaning and update in function of parent.

Open questions

  • Do we want to have 0|1|2 or refresh|cut|force ?
  • Do we also propagate hidden (make i optional?)

@kamil4
Copy link
Contributor

kamil4 commented Aug 4, 2022

@mrpijey If you don't mind, go ahead and list your other issues as well. We may not be able to address them right away, but knowing what the big "pain points" are is helpful in driving our longer-term development. Ideally, we should probably have some poll on our website where users could vote on their "favorite" issues and such...

@kamil4
Copy link
Contributor

kamil4 commented Aug 4, 2022

@ildyria So inherits_protection_policy is a boolean?

What would that look like in the GUI? Would inherits_protection_policy behave a bit like current is_public? Would it be on top of all the other options in the album visibility dialog (even on top of is_public) and if it's toggled to on, everything else becomes disabled (other than perhaps requires_link aka hidden)?

Should the 0/1/2 options be buttons at the bottom (replacing the current Save)? I think it would be neat if it could be done that way but I worry that it wouldn't be practical (we couldn't put any longer explanations in the buttons so their function would become cryptic, like the old DOS Abort/Retry/Fail). So I guess radio-buttons at the bottom of the album visibility dialog?

@ildyria
Copy link
Member

ildyria commented Aug 4, 2022

@ildyria So inherits_protection_policy is a boolean?

Yes.

What would that look like in the GUI? Would inherits_protection_policy behave a bit like current is_public? Would it be on top of all the other options in the album visibility dialog (even on top of is_public) and if it's toggled to on, everything else becomes disabled (other than perhaps requires_link aka hidden)?

yes.

Should the 0/1/2 options be buttons at the bottom (replacing the current Save)?

No. Not possible, our modals only allows 2 options: cancel and execute

So I guess radio-buttons at the bottom of the album visibility dialog?

That or a drop-down selection.

@HStep20
Copy link

HStep20 commented Jun 17, 2023

After spinning it up this morning, Im surprised to see that this isn't the default. I expect that there are more complex things going on behind the scenes as the conversation in #1150 seems to indicate, but having to manually enter every album and set it to visible instead of setting the parent album to visible with it 'trickling down' seems like unfortunate UX. Im looking at alternatives for Piwigo which handles albums amazing, but has started getting very slow for me recently with only around 3k photos.

@ildyria
Copy link
Member

ildyria commented Jun 17, 2023

I currently have a small problem with lychee, the change I made to the access policy actually slowed down Lychee significantly, so that is something I want to investigate. My problem is that I barely have time to work on Lychee.
So yes, there are plenty of issues open, and I would happily have more people contribute.

2 of our best dev are sort of AWOL so we are pretty much only 2 active dev left on this project with very much time to spare.
If someone wants to implement this, I already gave some pattern ideas. It just needs to be implemented. :|

@ildyria ildyria added the good first issue Good for newcomers label Jun 17, 2023
@HStep20
Copy link

HStep20 commented Jun 23, 2023

This is probably a totally different issue, but I'm curious on your thoughts on managing visibility at a photo level instead of an Album level. One of my issues that Ive run into is that I may have some photos from an album I want public, but not all of them. This doubly comes into play when looking at how 'Smart Albums' function by showing the images of only public albums.

If 'publicity' were handled at a photo level, we would be able to 'trickle down' smart albums into full publicity based on their 'smart settings' instead of being required to share the entire album, just to get one photo from the album to show up in a smart album. I export my photos from lightroom with a star tag on it, so I can create 3/4/5 star albums, but that is highly dependent on the picture itself and not the album/folder it is currently in.

Generally, I create an 'Album Highlights' style album of photos from x album, rated 4/5 stars for display, so being able to only share out the 4/5 star photos of an album would be amazing for users. I keep my 1/2/3 stars for myself/memories/learning from bad photos, but they don't need to be public.

@ildyria
Copy link
Member

ildyria commented Jun 24, 2023

This is probably a totally different issue, but I'm curious on your thoughts on managing visibility at a photo level instead of an Album level. One of my issues that Ive run into is that I may have some photos from an album I want public, but not all of them. This doubly comes into play when looking at how 'Smart Albums' function by showing the images of only public albums.

If 'publicity' were handled at a photo level, we would be able to 'trickle down' smart albums into full publicity based on their 'smart settings' instead of being required to share the entire album, just to get one photo from the album to show up in a smart album. I export my photos from lightroom with a star tag on it, so I can create 3/4/5 star albums, but that is highly dependent on the picture itself and not the album/folder it is currently in.

Generally, I create an 'Album Highlights' style album of photos from x album, rated 4/5 stars for display, so being able to only share out the 4/5 star photos of an album would be amazing for users. I keep my 1/2/3 stars for myself/memories/learning from bad photos, but they don't need to be public.

This is actually more tricky that it seems. Album visibility is better because it allows to immediately set the full set of pictures as visible. I do agree it is not convenient for your use-case though.

Currently with the latest refactoring, this induced a large slowdown on the gallery, the more albums/pictures you have and the worst it becomes. I am currently investigating to avoid those problems further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Status: Long term
Development

No branches or pull requests

5 participants