Skip to content

RUM-7472: Fix center crop image is not cropped in wireframe#2479

Merged
ambushwork merged 1 commit into
developfrom
yl/sr/fix-image-scale
Jan 10, 2025
Merged

RUM-7472: Fix center crop image is not cropped in wireframe#2479
ambushwork merged 1 commit into
developfrom
yl/sr/fix-image-scale

Conversation

@ambushwork

Copy link
Copy Markdown
Member

What does this PR do?

The bug is introduced by this PR, it fixed the padding issue when cropping the image, but it broke the clip for center crop image when it has cropToPadding as false.

This PR is to fix the problem by differentiate the parent content size by cropToPadding attribute, so the clip wireframe can be applied anyway.

Motivation

Demo

Before After
image image

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@ambushwork
ambushwork force-pushed the yl/sr/fix-image-scale branch 2 times, most recently from 98aa44d to 381313d Compare January 8, 2025 16:46
@codecov-commenter

codecov-commenter commented Jan 8, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 28.57143% with 5 lines in your changes missing coverage. Please review.

Project coverage is 70.00%. Comparing base (ce2ed62) to head (4b9d3b3).
Report is 6 commits behind head on develop.

Files with missing lines Patch % Lines
...m/datadog/android/internal/utils/ImageViewUtils.kt 0.00% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2479      +/-   ##
===========================================
+ Coverage    69.87%   70.00%   +0.13%     
===========================================
  Files          788      788              
  Lines        29536    29536              
  Branches      4926     4929       +3     
===========================================
+ Hits         20636    20674      +38     
+ Misses        7528     7507      -21     
+ Partials      1372     1355      -17     
Files with missing lines Coverage Δ
...d/sessionreplay/recorder/mapper/ImageViewMapper.kt 82.98% <100.00%> (+3.81%) ⬆️
...m/datadog/android/internal/utils/ImageViewUtils.kt 0.00% <0.00%> (ø)

... and 38 files with indirect coverage changes

@ambushwork
ambushwork force-pushed the yl/sr/fix-image-scale branch from 381313d to 4b9d3b3 Compare January 9, 2025 13:58
@ambushwork
ambushwork marked this pull request as ready for review January 9, 2025 15:08
@ambushwork
ambushwork requested review from a team as code owners January 9, 2025 15:08
@ambushwork
ambushwork merged commit b13f742 into develop Jan 10, 2025
@ambushwork
ambushwork deleted the yl/sr/fix-image-scale branch January 10, 2025 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants