You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-02-07] [$500] Android - Center icon in EReceipt for Expensify transactions is blank #34907
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Version Number: 1.4.29-1 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:
changed the title [-]Android - Center icon in EReceipt for Expensify transactions is blank[/-][+][$500] Android - Center icon in EReceipt for Expensify transactions is blank[/+]on Jan 22, 2024
Please re-state the problem that we are trying to solve in this issue.
Center icon in EReceipt for Expensify transactions is black in color on Android
What is the root cause of that problem?
This looks like a regression introduced by the expo-image PR. Earlier SVG images were directly imported into the component using react-native-svg. After above PR Icon component was updated to use ImageSvg component to display svg images.
On native platform since svg is treated just like any other image format by expo-image, fill prop cannot be supplied directly. Instead fill color is applied to tintColor prop and applied to the expo image component.
The icon used in EReceiptThumbnail center icon is eReceiptIcon.svg. It has fillColor set to currentColor. Expo image library seems to have an issue with getting currentColor prop on Android. Instead it uses black color as fill. Any tintColor applied on top of black doesn't seem to work.
What changes do you think we should make in order to solve the problem?
Remove fill="currentColor" from the svg element.
Fill color for the receipt icon is already supplied via fill prop from EReceiptThumbnail component. So it works seemlessly on both web and native platforms. So fill="currentColor" can be safely removed.
@aswin-s Thanks for the proposal! I think your solution would not solve the issue though, if you look at the original PR that implemented EReceipts, the icon should have a colour.
@jjcoffeeexpo-image was introduced after this PR. EReceiptThumbnail uses Icon component to display the image. Icon component now usesImageSVG component to display SVG images. Looks like this is a regression from expo-image integration. I tested it both on web and android and the above change fixes the image on both platforms.
@aswin-s Thanks! I agree the fix works, normally we would require details as to why/how it works too (hence my confusion with thinking it would display without any colour). Are you able to update your proposal with that extra detail?
changed the title [-][$500] Android - Center icon in EReceipt for Expensify transactions is blank[/-][+][HOLD for payment 2024-02-07] [$500] Android - Center icon in EReceipt for Expensify transactions is blank[/+]on Jan 31, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.34-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@jjcoffee] The PR that introduced the bug has been identified. Link to the PR:
[@jjcoffee] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[@jjcoffee] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[@jjcoffee] Determine if we should create a regression test for this bug.
[@jjcoffee] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@johncschuster] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
The PR that introduced the bug has been identified. Link to the PR: Expo image #30905
The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: Expo image #30905 (comment)
A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N/A - just missed in testing
Determine if we should create a regression test for this bug. Yes, thought something similar may already exist
If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
Regression Test Proposal
Create an ECard transaction
Navigate to the transaction detail page
Verify that the icon at the centre of the EReceipt has a coloured fill that matches the background image
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
[-]Android - Center icon in EReceipt for Expensify transactions is blank[/-][+][$500] Android - Center icon in EReceipt for Expensify transactions is blank[/+]melvin-bot commentedon Jan 22, 2024
Job added to Upwork: https://www.upwork.com/jobs/~01df6f886be1e32b04
melvin-bot commentedon Jan 22, 2024
Triggered auto assignment to @johncschuster (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jan 22, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee (
External)lanitochka17 commentedon Jan 22, 2024
We think that this bug might be related to #wave5.
CC @dylanexpensify
aswin-s commentedon Jan 24, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Center icon in EReceipt for Expensify transactions is black in color on Android
What is the root cause of that problem?
This looks like a regression introduced by the expo-image PR. Earlier SVG images were directly imported into the component using react-native-svg. After above PR
Iconcomponent was updated to useImageSvgcomponent to display svg images.App/src/components/Icon/index.tsx
Lines 92 to 100 in cc64de9
For web platform the
fillprop supplied to ImageSVG is directly passed down to the SVG component. We are still using react-native-svg on web platform.App/src/components/ImageSVG/index.tsx
Line 10 in cc64de9
On native platform since svg is treated just like any other image format by
expo-image, fill prop cannot be supplied directly. Instead fill color is applied to tintColor prop and applied to the expo image component.App/src/components/ImageSVG/index.native.tsx
Line 7 in cc64de9
The icon used in
EReceiptThumbnailcenter icon iseReceiptIcon.svg. It has fillColor set tocurrentColor. Expo image library seems to have an issue with gettingcurrentColorprop on Android. Instead it uses black color as fill. Any tintColor applied on top of black doesn't seem to work.App/assets/images/eReceiptIcon.svg
Line 1 in 0efabc2
This is the reason EReceipt icon looks blank.
What changes do you think we should make in order to solve the problem?
Remove
fill="currentColor"from the svg element.Fill color for the receipt icon is already supplied via fill prop from EReceiptThumbnail component. So it works seemlessly on both web and native platforms. So
fill="currentColor"can be safely removed.App/src/components/EReceiptThumbnail.tsx
Line 100 in cc64de9
What alternative solutions did you explore? (Optional)
None
jjcoffee commentedon Jan 24, 2024
@aswin-s Thanks for the proposal! I think your solution would not solve the issue though, if you look at the original PR that implemented EReceipts, the icon should have a colour.
aswin-s commentedon Jan 24, 2024
@jjcoffee expo-image was introduced after this PR. EReceiptThumbnail uses Icon component to display the image. Icon component now uses
ImageSVGcomponent to display SVG images. Looks like this is a regression from expo-image integration. I tested it both on web and android and the above change fixes the image on both platforms.jjcoffee commentedon Jan 24, 2024
@aswin-s Thanks! I agree the fix works, normally we would require details as to why/how it works too (hence my confusion with thinking it would display without any colour). Are you able to update your proposal with that extra detail?
16 remaining items
[-][$500] Android - Center icon in EReceipt for Expensify transactions is blank[/-][+][HOLD for payment 2024-02-07] [$500] Android - Center icon in EReceipt for Expensify transactions is blank[/+]melvin-bot commentedon Jan 31, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jan 31, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.34-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-02-07. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jan 31, 2024
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
jjcoffee commentedon Feb 5, 2024
Regression Test Proposal
Do we agree 👍 or 👎
johncschuster commentedon Feb 7, 2024
Payment has been issued! I'll get the regression test steps updated shortly.
melvin-bot commentedon Feb 13, 2024
@johncschuster, @aswin-s, @jjcoffee, @marcaaron Eep! 4 days overdue now. Issues have feelings too...
marcaaron commentedon Feb 14, 2024
This one looks like it can be closed now?
johncschuster commentedon Feb 14, 2024
Yep! I left it open so I would get the Regression Test steps done, but it is otherwise complete!