-
-
Notifications
You must be signed in to change notification settings - Fork 300
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
Custom album covers #875
Custom album covers #875
Conversation
implement custom album covers 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)
keep track of photoID of current cover of albums. facilitates setting custom album covers of the parent.
Still WIP. Incoming changes. Please wait for #873 to be merged. |
@evoludolab please check. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall.
I still need to look at the front end, and I'd like to try it out...
Wow this is cool! Unfortunately I have a day job and won't have time to check until later |
That's why I tweaked it to be the rightmost one... As to it being intrusive, we use badges all over the place already, so adding one more doesn't seem like a big stretch...
We don't currently have tooltips in that area of the UI -- I think we may be using them only in the menu bar? I suppose we could add some but I'm not sure how necessary it is in this case, as the badge appears immediately after the user sets a cover, so it should be pretty obvious what it indicates. Of course, after a while one might forget... |
I'm wondering about the security implications here. Shouldn't we at least be checking that the new cover Photo belongs to the user? I think the upload middleware would automagically do it if the request field was called |
Then we just need to update the Ajax query to send a photoId :) |
Done... |
@kamil4 nothing against badges and I am clearly in favour of marking the cover - makes everything more transparent! What about adding a more discreet marker similar to albums that contain sub albums? Concerning tooltips I was more thinking of visitors that wonder what the orange badge means. But that seems quite cosmetic and probably better suited for a separate discussion. |
Visitors do not see badges. |
@ildyria Oh, did not yet notice... In that case long live the orange badge! |
As far as I can tell everything works like a charm. I am looking forward to studying all your changes and improvements carefully to get a better understanding of Lychee. It's been a pleasure - thanks! |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Draft pull request to implement setting custom cover images for albums, see #442
This pull request implements the back end for setting custom album covers. The corresponding pull request for the front end extends the context menu for photos and albums with Set/Remove Album cover to set/remove custom album covers of the parent album, see LycheeOrg/Lychee-front#239
cover_id
column andcover
relationship to AlbumtoReturnArray()
function which simplifies the code at multiple placescover
image is greedy fetched to lower the number of SQL queries.Future work (for another PR):
IMPORTANT:
album.description
to store the information of custom covers. It requires a new columncover
in thealbum
table, which is beyond my pay grade.SQL query inAlbumController.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 donesupport 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