-
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
Fix immediately prompt for Camera permission in scan request flow #37817
Conversation
@cubuspl42 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@Julesssss Can you add build label, I need to test the camera in scan flow to make sure the old issue #34750 doesn't happen in this PR. |
Yep, build in progress. I also want to manually test some other cases:
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
The code looks good |
Would you execute these extra testing steps? I agree that we should ensure to cover all corner cases, and these are great starting points. |
I'm testing it, will upload the screenshot for it soon. |
androi-1.mp4
Record_2024-03-08-14-25-53_1498f0e32f9498230c0f1d86a461cae3.mp4@cubuspl42 Tested extra testing steps. |
Seem like I can't install adhoc for IOS because I'm not added to adhoc device list |
@dukenv0307 This might be a dumb question, but why is the ad-hock build needed? Why is a local build not suitable? |
We've had trouble doing this as Apple make the process very annoying, but send me your UUID and I'll try and add your device to our list.
Maybe there is another reason, but I use AdHoc builds for any test that requires us to background the mobile app, as I'm not convinced the dev builds behave exactly the same way. |
@cubuspl42 Just wanna test the camera on the real device and confirm that works when we accept the permission. In other cases of the PR, I tested it locally. |
@dukenv0307 If you're in the Apple Developer Program, you can build for the real device yourself. Otherwise, yeah, you'll need the ad-hock build. |
I was added to the list of devices to build Adhoc in IOS, it takes a few days to install Adhoc after adding. |
Please merge |
@cubuspl42 Merged main. |
My results for iOS / Web (physical iPhone): delay-camera-permission-prompt-ios-web-compressed.mp4Is this expected? |
Yeah, it's expected. |
Please update the testing steps then |
Update the test steps for manually case here #37817 or the case you tested above?
If it's the case that you tested above, I already mentioned it in the test steps. |
On this video, I'm showing that this step fails on iOS/Web:
I'm immediately prompted for the camera permission after opening the Request Money / Scan tab. |
@cubuspl42 I updated the test steps for each platform. |
I asked on the GH issue to confirm this: #37737 (comment) |
@cubuspl42 I updated the Explanier UI on mWeb, please help to review again. |
I found this issue on iOS Web (maybe affects Android Web too?): delay-camera-permission-prompt-ios-web-compressed.mp4If I navigate from "Manual" to the "Scan" tab after opening the new money request route, I get an infinite loader. I need to re-enter the tab to make things right. |
Yes, I also can reproduce this on Android Web. Fixing now. |
@dukenv0307 Are you working on this? 🙂 |
@cubuspl42 I fixed it here 1fee194, missed adding an update after it's fixed sorry. |
Please merge I'm testing the newest changes. |
@cubuspl42 I updated. |
Reviewer Checklist
Screenshots/VideosAndroid: Nativedelay-camera-permission-prompt-2-android-compressed.mp4Android: mWeb Chromedelay-camera-permission-prompt-2-android-web-compressed.mp4iOS: Nativedelay-camera-permission-prompt-2-ios-compressed.mp4iOS: mWeb Safaridelay-camera-permission-prompt-2-ios-web-compressed.mp4MacOS: Chrome / SafariMacOS: Desktop |
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.
Video captures look great to me, thanks both.
What... I didn't see that button 😕 |
Ignoring the flakey performance check |
@Julesssss looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
Not an emergency, the perf test is flakey |
🚀 Deployed to staging by https://github.com/Julesssss in version: 1.4.58-0 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.4.58-8 🚀
|
<ActivityIndicator | ||
size={CONST.ACTIVITY_INDICATOR_SIZE.LARGE} | ||
style={[styles.flex1]} | ||
color={theme.textSupporting} | ||
/> | ||
)} | ||
{cameraPermissionState === 'denied' && ( | ||
{cameraPermissionState !== 'granted' && isQueriedPermissionState && ( |
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.
We haven't handled the case when user denied and camera permission prompt never shows again. Resulting in #50485.
Details
Fix immediately prompt for Camera permission in scan request flow
Fixed Issues
$ #37737
PROPOSAL: #37737 (comment)
Tests / QA Steps
Offline tests
Same as above
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Screen.Recording.2024-03-06.at.16.46.49.mov
Record_2024-03-08-14-25-53_1498f0e32f9498230c0f1d86a461cae3.mp4
Android: mWeb Chrome
Screen.Recording.2024-03-18.at.23.01.55.mov
iOS: Native
Screen.Recording.2024-03-06.at.16.59.24.mov
iOS: mWeb Safari
original-813F2D99-A3E1-46F7-867D-CC240246AADB.mp4
MacOS: Chrome / Safari
Screen.Recording.2024-03-06.at.16.47.34.mov
MacOS: Desktop
Screen.Recording.2024-03-06.at.17.37.48.mov