-
Notifications
You must be signed in to change notification settings - Fork 984
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
status timeline: set image max width to avoid overflow of horizontally long images #13211
status timeline: set image max width to avoid overflow of horizontally long images #13211
Conversation
Jenkins BuildsClick to see older builds (4)
|
:height image-max-dimension | ||
:max-width :100% |
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.
could you please elaborate on how this will work?
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.
The modification here is to the container view which contains the image component.
problem : In case of horizontally long images the image width would be bigger than the device width and the image would overflow outside of the view.
Solution : set the container view to have a max-width of 100% which ensures that no matter what is the width of the image (which is in the child component) in question it would never overflow because of the max-width property.
Screenshot before fix :
Screenshot after fix :
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.
oh i see, but now the image is cut on the left?
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.
Its center aligned actually, Some images can be reallly long horizontally and to accommodate them there were 2 options :
- Either reduce the height to match the aspect ratio ( because of long length )
OR - Center align them with a fixed height
The second one seemed more readable to me given our constraints of device width
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.
Also when you tap on these images it opens them in a modal view in full
95% of end-end tests have passed
Failed tests (4)Click to expand
Passed tests (75)Click to expand
|
96% of end-end tests have passed
Failed tests (3)Click to expand
Passed tests (76)Click to expand
|
@siddarthkay thank you for PR. Ready for merge. |
@siddarthkay please squash commits before merge |
@flexsurfer : yes I will take care from next time onwards, I messed up using the merge script with this PR :( |
3c23a66
to
c4d2fba
Compare
[comment]: Fixes #13149
Platforms
Android
iOS
status: ready