-
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
[$125] mWeb/Chrome - Scan - Flash icon appears then disappears in Scan tab #29442
Comments
Triggered auto assignment to @kadiealexander ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Scan - Flash icon appears then disappears in Scan tab (Reproducible with mSafari as well). What is the root cause of that problem?We will show the flash if flash is available and make it invisible by decrease the opacity to zero in here when the flash is not available App/src/pages/iou/ReceiptSelector/index.js Lines 242 to 255 in 9b5f8c4
Because What changes do you think we should make in order to solve the problem?That's quite confused to make it visible and then disappears like that, we should handle the flash button like the way we handle it on our mobile side by only disabling it if we didn't have the permission or it's not available. What alternative solutions did you explore? (Optional)N/A |
Job added to Upwork: https://www.upwork.com/jobs/~019c363d1d939d77a1 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts ( |
Upwork job price has been updated to $125 |
@hungvu193 is this regression from something? |
@mountiny @hungvu193 This appears to be a bug introduced from #28411, specifically from here Wouldn't say it's a regression just a bug that wasn't caught during testing since this behavior didn't exist before on mWeb |
IMO this isn't a blocker and just something @lukemorawski can fix as a follow up |
PROPOSAL (UPWORK) In this situation, there are two straightforward solutions. Solution 1: Make the default value of "isTorchAvailable" "false." This is a quick and easy solution, but it may result in a slight delay for users who have granted torch permissions. However, I propose an alternative solution to address this issue. Solution 2: Introduce an additional variable called "indicator" with a default value of "true." When we gather information about the availability of the torch, set "isTorchAvailable" to either true or false, and set "indicator" to the opposite of "isTorchAvailable." This allows us to determine whether we have received the necessary data and are ready to display the screen. I've chosen this approach to keep the code concise. When the user opens the camera, we will display an Activity Indicator that covers the full screen to hide the background, based on this condition: For example: //...
const [isTorchAvailable, setIsTorchAvailable] = useState(true);
const [indicator, setIndicator] = useState(true);
//...
//...
<NavigationAwareCamera
// ...
// ...
onTorchAvailability={(availability) => { setIsTorchAvailable(availability); setIndicator(!isPageLoaded); }}
// ...
/>
//..
//..
//..
const mobileCameraView = () => {
if (isTorchAvailable === indicator) {
// Show the indicator
} else {
// Show the rest of the screen
}
} |
📣 @yakupafsin! 📣
|
Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
@yakupafsin In the future, stick to the proposal template. Be sure to read the contributing guidelines. In the context of this issue, I think we're not looking for proposals right now, as @lukemorawski might just fix this in a follow-up. |
@cubuspl42 Fixed the issue, creating a PR for that. |
Issue not reproducible during KI retests. (First week) |
I asked a question on #29569 to classify the state of this issue |
This issue has not been updated in over 15 days. @AndrewGable, @allroundexperts, @kadiealexander eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
Issue not reproducible during KI retests. (Second week) |
Issue not reproducible during KI retests. (Third week) |
@allroundexperts @AndrewGable I also can't reproduce this, should we close it? |
Yes, I think its safe to close this @kadiealexander. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.3.83-1
Reproducible in staging?: Yes
Reproducible in production?: No. New feature on staging.
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:
Action Performed:
Expected Result:
Depending on whether flash is supported, the flash icon should either appear or not appear at all
Actual Result:
When the Scan tab is first opened, the camera flash icon on the bottom right corner appears and then disappears
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Android: Native
Android: mWeb Chrome
Bug6234478_1697117658906.Screen_Recording_20231012_200316_Chrome.mp4
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: