Allow higher max width (16:9) for landscape image embeds#32626
Open
weirdreality wants to merge 2 commits intoelement-hq:developfrom
Open
Allow higher max width (16:9) for landscape image embeds#32626weirdreality wants to merge 2 commits intoelement-hq:developfrom
weirdreality wants to merge 2 commits intoelement-hq:developfrom
Conversation
bb58162 to
23aa598
Compare
Member
|
Could you upload a screenshot showing what this looks like so a designer can take a look? |
Author
|
With window width shrunk to 1500 (after that the image shrinks to fit the screen anyway): The image from #19869: |
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.






References #19869
"Landscape" images (images with width > height) are forced into a maximum width or height of 324 pixels, which can be too small on modern screens. Considering that Element is also most often used on landscape screens, and inspired by behavior in other chat clients (namely Discord as mentioned in #19869 (comment)), the limit for the width is increased by a ratio of 16:9 to give a maximum width of 576 pixels. This would help with the extreme cases as mentioned in #19869.
I would not consider #19869 fully fixed as there is still the behavior for "portrait" images added in 8860916 which reduces the maximum width further to 9:16 of 324 which is 183 pixels. This happens on any image where the height is higher than the width, even by 1 pixel. I would suggest removing this behavior in favor of just the landscape dimensions, or deciding whether to use it based on the screen/viewport dimensions and not the size of individual images. I could do this in this PR if requested but I wouldn't know about writing tests as I am not familiar with this codebase.
The issue 7188 mentioned in 8860916 seems completely unrelated so I can't find the reasoning for why this was put in at all.
Checklist
public/exportedsymbols have accurate TSDoc documentation.