-
Notifications
You must be signed in to change notification settings - Fork 59
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
Load icons / Image Enhancement #3242
Conversation
Signed-off-by: Lentumunai-Mark <[email protected]>
Signed-off-by: Lentumunai-Mark <[email protected]>
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.
Looks Good. I've left a few comments.
alpha = 1.0f, | ||
contentScale = ContentScale.Fit, |
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.
Is there any reason for this change?
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.
Using ContentScale.Fit
here ensures the image maintains its original aspect ratio. This prevents distortion and guarantees the entire image is visible, even if there's some empty space around it. useful for where preserving the complete image and its proportions is crucial
Settingalpha = 1.0f
here ensures the element maintains full opacity. This means it will be completely visible and not transparent at all
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.
Can we make both configurable?
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.
For the alpha
default to 1.0f
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.
Revert the colorFilter
so it can be used to change the tint for images of type svg
&& png
. Introduce a new property for type
(we will support svg
, png
and jpg
/jpeg
) default to SVG mostly used in icons.
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.
noted @ellykits
...oid/quest/src/main/java/org/smartregister/fhircore/quest/util/extensions/ConfigExtensions.kt
Outdated
Show resolved
Hide resolved
Signed-off-by: Lentumunai-Mark <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3242 +/- ##
=========================================
- Coverage 29.6% 29.3% -0.3%
- Complexity 658 693 +35
=========================================
Files 239 252 +13
Lines 11204 11955 +751
Branches 1948 2093 +145
=========================================
+ Hits 3323 3512 +189
- Misses 7447 7982 +535
- Partials 434 461 +27
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Signed-off-by: Lentumunai-Mark <[email protected]>
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.
Just add a few tests. This Looks good.
Signed-off-by: Lentumunai-Mark <[email protected]>
…into load-icons-enhancement
data class ImageConfiguration( | ||
val id: String, | ||
override val resourceType: String, | ||
val contentType: String, | ||
val data: String, | ||
) : Configuration() |
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 understand why this was needed. However with the fix on image generation via FHIR web it's unnecessary. The double decoding is not needed anymore, actually, this data class is a duplication of Binary resource so either way we do not need to create a new custom model.
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.
Noted @ellykits
will revert the implementation to only decode once, hence remove the config
Signed-off-by: Lentumunai-Mark <[email protected]>
…into load-icons-enhancement
Signed-off-by: Lentumunai-Mark <[email protected]>
IMPORTANT: Where possible all PRs must be linked to a Github issue
Fixes [link to issue]
Engineer Checklist
strings.xml
file./gradlew spotlessApply
and./gradlew spotlessCheck
to check my code follows the project's style guideCode Reviewer Checklist
strings.xml
file