-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
fix: task background image getting cropped #36261
Merged
Merged
Changes from 7 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
9ff4961
fix: animated background getting cropped on android
aswin-s 8122391
Merge remote-tracking branch 'upstream/main' into fix/issue-33922
aswin-s cd340a8
Merge remote-tracking branch 'upstream/main' into fix/issue-33922
aswin-s e623767
fix: action item taking extra space
aswin-s eaa7e04
fix: clean lint
aswin-s e6e18f6
fix: background image horizontal shift on sensor value change
aswin-s 977512b
refactor: move image offset values outside of component
aswin-s deee8d4
Merge remote-tracking branch 'upstream/main' into fix/issue-33922
aswin-s 1a076af
Merge remote-tracking branch 'upstream/main' into fix/issue-33922
aswin-s 5ab88ef
Merge remote-tracking branch 'upstream/main' into fix/issue-33922
aswin-s 310d81f
Merge remote-tracking branch 'upstream/main' into fix/issue-33922
aswin-s c0f2995
Merge remote-tracking branch 'upstream/main' into fix/issue-33922
aswin-s e7902fe
fix: extra space among report action items
aswin-s 4cb39ce
fix: clamp translateY value
aswin-s d9fec75
Merge remote-tracking branch 'upstream/main' into fix/issue-33922
aswin-s 33bcc45
Merge remote-tracking branch 'upstream/main' into fix/issue-33922
aswin-s File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
I am worried about this change.
Please compare this branch vs staging on all platforms. There should be no 1px difference
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.
Especially, test sensor
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.
Here is video testing sensors on physical iOS device.
ios_out.mp4
I've added a top offset
top: IMAGE_OFFSET_Y,
to prevent the image from getting clipped while tilting on Android devices. This actually pushes the image down by 40px. If you think we don't need to fix it (as this is the experience on prod at the moment), I'll leave it same as before.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 the earlier implementation stretched out the image to 200% and then positioned the image back in view by translating the image by setting negative
IMAGE_OFFSET_X
. This caused issues on web while resizing. Instead in current implementation, I'm keeping image width at100%
but then scale it 15% to account for the additional span required while tilting the device.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.
@staszekscp what do you think about this change? Since you recently worked on this file.
Also, we're trying to fix regression caused by your PR
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.
I think the regression was caused by this line, so I would look there for a fix. I've added it, because I wanted to move the background image a bit upwards following designers' suggestion.
I suppose that the cropped image problem can be rather related to wrong container size, not the animation itself. The animation moves the image outside of container boundaries, and as a result it gets cropped.
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.
Thanks for the feedback.
@aswin-s let's not touch animation logic if possible
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.
@aimane-chnaif I don't see a way without modifying the animation logic. As we need to remove the '200%' width set for background image to fix the issue on web. In fact the core logic of the animation is still the same, all I have changed is using scale to position the image instead of setting 200% width and then positioning using negative margin.
We may also try generating adhoc build for this branch for extensive testing on native devices.