Add "Crop image previews" setting to files#25055
Add "Crop image previews" setting to files#25055juliusknorr merged 1 commit intonextcloud:masterfrom nina-py:18439-add-crop-image-previews-setting
Conversation
|
It's funny that the "Node / build" check is failing because I did check in the compiled files and running Also, please note that I added a test on the backend for the new setting but I haven't found a way to add a working test for the frontend code. If I add a test in var image = new FileInfo({
id: 123,
name: 'a-photo.jpeg',
mimetype: 'image/jpeg',
size: 1234,
etag: 'a01234c',
mtime: 123456
});
var $tr = fileList.add(image);
console.log($tr.find('.thumbnail').css('background-image'));...the output I get back is: url("http://localhost/core/img/filetypes/image.svg")...which is not very helfpul if I want to test changes to preview image URLs. On closer look I see that the |
|
Hi @kesselb, could I try running that |
|
I can't explain that build diff tbh but could it be related to the node env? Right now some of a newer node/npm and others have the slightly older one. It could be a mismatch there. IIRC there is also an issue with the latest npm due to missing or incompatible peer deps in our dependency tree. ^ that is what the Github action builds with. |
|
Thank you @ChristophWurst, I thought that might be the case. I have Node 14 installed locally, and my npm version is just a couple of minor updates newer than what the bot is using (6.14.10). I have successfully checked in compiled assets before (#24970), but that was a much smaller chunk of work. |
skjnldsv
left a comment
There was a problem hiding this comment.
Code looks good! Great work!!
ChristophWurst
left a comment
There was a problem hiding this comment.
Reading jquery code makes me cringe but it's a solid PR until we have a Vue rewrite 😜
|
Thank you @skjnldsv! @ChristophWurst, I haven't written any jQuery code for quite a while so it was a bit of time travel for me :). Looking forward to getting into Vue! |
|
/compile amend / |
Added a new user setting that toggles cropping on image previews in grid view. True (default value): crops each image to a square. False: keep original aspect ratio. Signed-off-by: Nina Pypchenko <22447785+nina-py@users.noreply.github.com> Closes #18439. Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>

Added a new user setting that toggles cropping on image previews in grid view.
True (default value): crops each image to a square. False: keep original aspect ratio.
Signed-off-by: Nina Pypchenko 22447785+nina-py@users.noreply.github.com
Closes #18439.