Chat previews now expanded with aspect ratio#4469
Closed
PVince81 wants to merge 3 commits into
Closed
Conversation
Instead of cropping the previews in the conversation to a square, they are now using a limited height but their width is computed based on aspect ratio. This is done by passing different arguments to the previews endpoint so it delivers a preview with the matching size. Adjusted styles around the preview to make it look better. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Closed
Member
|
I'm fine with this, but this is up to @jancborchardt's call :) |
|
|
||
| .loading { | ||
| display: inline-block; | ||
| height: 128px; |
Member
There was a problem hiding this comment.
I think we once also discussed to use more height, e.g. 300? cc @jancborchardt
But not sure what the endpoint does if the image is actually smalled?
Member
Author
There was a problem hiding this comment.
I can check with it. otherwise there's a "mode=fill" option which I'm not sure what it does, might fit
Member
Author
Member
Author
There was a problem hiding this comment.
okay I found the ticket with the decision to make it 384px: #3746 (comment)
I'll adjust
Member
Author
Was 128, expanded to 384 so it can fill a bit more width as well and look better. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Center the spinner as it looks better overall, except for when the picture is narrow in the end. But we can't detect the image size beforehand, so this will do for most use cases. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Member
Author
|
closing in favor of #4472 which improves the same code further (and I'd like to avoid conflicts) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Instead of cropping the previews in the conversation to a square, they
are now using a limited height but their width is computed based on
aspect ratio. This is done by passing different arguments to the
previews endpoint so it delivers a preview with the matching size.
Adjusted styles around the preview to make it look better.
Fixes #3746
This was mentionned in #1805 (comment)
Manual Tests