-
Notifications
You must be signed in to change notification settings - Fork 60
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
RUM-7024: Make ImageViewMapper public #2375
base: develop
Are you sure you want to change the base?
Conversation
b7d6837
to
3a9ae25
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2375 +/- ##
===========================================
+ Coverage 70.30% 70.34% +0.04%
===========================================
Files 744 744
Lines 27721 27719 -2
Branches 4630 4630
===========================================
+ Hits 19488 19497 +9
+ Misses 6947 6931 -16
- Partials 1286 1291 +5
|
3a9ae25
to
cba5f65
Compare
@@ -47,12 +48,12 @@ internal class ImageViewMapper( | |||
|
|||
val drawable = view.drawable?.current ?: return wireframes | |||
|
|||
val parentRect = imageViewUtils.resolveParentRectAbsPosition(view) | |||
val contentRect = imageViewUtils.resolveContentRectWithScaling(view, drawable) | |||
val parentRect = ImageViewUtils.resolveParentRectAbsPosition(view) |
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.
what's the purpose of changing this line?
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.
Warning
This here is a regression going in the wrong way: replacing a call to an interface dependency with a call to a singleton object
is not something we want to do.
We can create a public constructor with a default that will automatically inject the ImageViewUtils
if none is provided but we shouldn't rely directly on the object
@@ -47,12 +48,12 @@ internal class ImageViewMapper( | |||
|
|||
val drawable = view.drawable?.current ?: return wireframes | |||
|
|||
val parentRect = imageViewUtils.resolveParentRectAbsPosition(view) | |||
val contentRect = imageViewUtils.resolveContentRectWithScaling(view, drawable) | |||
val parentRect = ImageViewUtils.resolveParentRectAbsPosition(view) |
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.
Warning
This here is a regression going in the wrong way: replacing a call to an interface dependency with a call to a singleton object
is not something we want to do.
We can create a public constructor with a default that will automatically inject the ImageViewUtils
if none is provided but we shouldn't rely directly on the object
What does this PR do?
Exposes
ImageViewMapper
so that it can be used by cross-platform frameworks.Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)