Skip to content
This repository has been archived by the owner on Dec 25, 2023. It is now read-only.

Custom album covers #239

Merged
merged 13 commits into from
Jan 20, 2021
Merged

Custom album covers #239

merged 13 commits into from
Jan 20, 2021

Conversation

evoludolab
Copy link
Contributor

Draft pull request to implement setting custom cover images for albums, see LycheeOrg/Lychee#442

This pull request implements the front end for setting custom album covers by extends the context menu for photos and albums with Set/Remove Album cover to set/remove custom album covers of the parent album. The corresponding changes in the back end are in a separate pull request LycheeOrg/Lychee#875

IMPORTANT:

  • ⚠️ this draft uses album.description to store the information of custom covers. It requires a new column cover in the album table, which is beyond my pay grade.
  • SQL query in AlbumController.php should be reviewed (this is completely unfamiliar territory...)
  • something seems amiss with the gulpfile because iconic.svg does not get processed (the new icon needs to be manually added to resources/views/includes/svg.blade.php and resources/views/view.blade.php)
  • only English localization done
  • support for 3 distinct images for albums dropped (seems overkill given that 2 are barely visible); if this is acceptable some code cleaning and streamlining would be recommended

context menu on photos allows to set/remove cover of parent allbum

IMPORTANT: this is abusing album.description to store id of cover photo (needs to be changed once album table includes column for covers)

IMPORTANT: something seems amiss with the gulpfile because iconic.svg does not get processed (the new icon needs to be manually added to resources/views/includes/svg.blade.php and resources/views/view.blade.php)

IMPORTANT: support for 3 distinct images for albums dropped (overkill given that 2 are barely visible)
extend context menu for selecting the cover of a submenu as the custom cover of the parent
Copy link
Contributor

@kamil4 kamil4 left a comment

Choose a reason for hiding this comment

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

Minor comments overall. Still need to try it...

scripts/main/albums.js Outdated Show resolved Hide resolved
scripts/main/build.js Outdated Show resolved Hide resolved
scripts/main/build.js Show resolved Hide resolved
scripts/main/build.js Outdated Show resolved Hide resolved
scripts/main/contextMenu.js Outdated Show resolved Hide resolved
scripts/main/contextMenu.js Outdated Show resolved Hide resolved
scripts/main/contextMenu.js Show resolved Hide resolved
@kamil4
Copy link
Contributor

kamil4 commented Jan 18, 2021

OK, I added the missing pieces for selecting a subalbum as cover; can you guys test?

Smart albums now display "public" badge for if the Starred or Recent albums are public. I'm undecided if I like that or not... It's probably an improvement, although I may tweak the ordering...

@sonarcloud
Copy link

sonarcloud bot commented Jan 18, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 5 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ildyria
Copy link
Member

ildyria commented Jan 19, 2021

I'm unsure about having the cover badge showing up for albums. For pictures it is pretty obvious but for album I feel this is overkill. 🤔

@kamil4
Copy link
Contributor

kamil4 commented Jan 19, 2021

I'm unsure about having the cover badge showing up for albums. For pictures it is pretty obvious but for album I feel this is overkill. thinking

I don't get it. To me they seem like exactly the same case? A user can select for a cover of an album either a photo from the album as or a cover from a subalbum. In either case we give the same visual indication. Why should one be obvious and the other an overkill?

@ildyria
Copy link
Member

ildyria commented Jan 19, 2021

I will check. :)

@evoludolab
Copy link
Contributor Author

In my original attempt only the context menu entry and the colour of its accompanying icon changed for a currently selected photo/sub album. This was subtle to the point of obscurity... I am with @kamil4 and already got totally used to the badges. My initial concerns with them completely evaporated after @ildyria pointed out that badges are only visible for the owner of the album.

@ildyria ildyria merged commit 5ad5a22 into LycheeOrg:master Jan 20, 2021
@evoludolab evoludolab deleted the custom-covers branch January 30, 2021 18:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants