-
Notifications
You must be signed in to change notification settings - Fork 3k
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: App shows blank screen when user denies camera access #6969
fix: App shows blank screen when user denies camera access #6969
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
@phivh thank you! Could you please copy the line above as per the instructions and comment it here. That is a mandatory step for any contributor. Cheers! |
// eslint-disable-next-line max-len | ||
USER_CAMERA_CONSENT_DENIED: 'Unexpected result Intent. It might be a result of incorrect integration, make sure you only pass Onfido intent to handleActivityResult. It might be due to unpredictable crash or error. Please report the problem to [email protected]. Intent: null \n resultCode: 0', |
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.
Let's wrap this in a new line and remove the Eslint comment.
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.
There are some reasons that I would like to keep it as it is.
- Linting required single quote, if we want to wrap the message we need to use backquote `` it will cause an error by lint rule. However, the condition to match this message variable should be 100% match when the error cause, if we wrap it into 2 lines, the condition couldn't work as expected.
- From my point of view, this is a message under constant variable and not a block logic code so it should not a big deal.
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.
Ok. Anyways, it is not a blocker.
src/languages/es.js
Outdated
cameraRequestTitle: '"New Expensify" Would Like to Access the Camera', | ||
cameraRequestMessage: 'Uh-oh, you have not granted us camera access. We need that to complete this verification', |
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.
Please ask for these translations on the Slack channel or on the issue.
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 agree with Rajat's changes. And i will try to confirm the coly of the messages.
src/languages/en.js
Outdated
@@ -522,6 +522,8 @@ export default { | |||
tryAgain: 'Try again', | |||
verifyIdentity: 'Verify identity', | |||
genericError: 'There was an error while processing this step. Please try again.', | |||
cameraRequestTitle: '"New Expensify" Would Like to Access the Camera', |
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 will also need to ask Marketing team to confirm these translations. I will try to take care of it in the OG issue
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.
Thanks for the follow-up. I will wait until getting these official messages.
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.
@phivh Thank you for understanding, this might be a bit longer than usual given the holidays. Apologies for the delay.
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.
@mountiny I see, no problem. This is also a chance for me to get more understanding of the process.
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.
@phivh Could you actually use the key cameraPermissionsNotGranted
we have couple lines above here?
Line 514 in bec6d3a
cameraPermissionsNotGranted: 'Camera permissions not granted', |
Replate this line with the aforementioned line and swap the translations keys where you have used it to cameraPermissionsNotGranted
. And remove this standalone key. I have checked and it seems it was not used anywhere.
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 have let the test run. Thank you for your patience on this one. Amazing work so far on this issue 🙌
src/languages/en.js
Outdated
@@ -522,6 +522,8 @@ export default { | |||
tryAgain: 'Try again', | |||
verifyIdentity: 'Verify identity', | |||
genericError: 'There was an error while processing this step. Please try again.', | |||
cameraRequestTitle: '"New Expensify" Would Like to Access the Camera', |
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.
@phivh Thank you for understanding, this might be a bit longer than usual given the holidays. Apologies for the delay.
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.
Requesting one change to the copy. I will follow soon with the Spanish translation.
@mountiny we will also need Spanish translations |
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.
Approving and leaving the translations to @mountiny
🎀 👀 🎀 C+ reviewed
@parasharrajat waiting for the translations :) |
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 have written down some requested changed to the translations. As a title, we would use a copy which was already in the translations page, but it was not used anywhere. So let's just use that key and not forget to change it in the place we need.
Thank you for your patience and for making these updates here @phivh
src/languages/en.js
Outdated
@@ -522,6 +522,8 @@ export default { | |||
tryAgain: 'Try again', | |||
verifyIdentity: 'Verify identity', | |||
genericError: 'There was an error while processing this step. Please try again.', | |||
cameraRequestTitle: '"New Expensify" Would Like to Access the Camera', |
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.
@phivh Could you actually use the key cameraPermissionsNotGranted
we have couple lines above here?
Line 514 in bec6d3a
cameraPermissionsNotGranted: 'Camera permissions not granted', |
Replate this line with the aforementioned line and swap the translations keys where you have used it to cameraPermissionsNotGranted
. And remove this standalone key. I have checked and it seems it was not used anywhere.
src/languages/en.js
Outdated
@@ -522,6 +522,8 @@ export default { | |||
tryAgain: 'Try again', | |||
verifyIdentity: 'Verify identity', | |||
genericError: 'There was an error while processing this step. Please try again.', | |||
cameraRequestTitle: '"New Expensify" Would Like to Access the Camera', | |||
cameraRequestMessage: 'Uh-oh, you have not granted us camera access. We need that to complete this verification', |
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.
Let's use this copy preferably please.
cameraRequestMessage: 'Uh-oh, you have not granted us camera access. We need that to complete this verification', | |
cameraRequestMessage: 'You have not granted us camera access. We need access to complete verification.', |
src/languages/es.js
Outdated
@@ -522,6 +522,8 @@ export default { | |||
tryAgain: 'Intentar otra vez', | |||
verifyIdentity: 'Verificar identidad', | |||
genericError: 'Hubo un error al procesar este paso. Inténtalo de nuevo.', | |||
cameraRequestTitle: '"New Expensify" Would Like to Access the Camera', |
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.
Use the cameraPermissionsNotGranted
key instead of this and translations should be couple lines above.
src/languages/es.js
Outdated
@@ -522,6 +522,8 @@ export default { | |||
tryAgain: 'Intentar otra vez', | |||
verifyIdentity: 'Verificar identidad', | |||
genericError: 'Hubo un error al procesar este paso. Inténtalo de nuevo.', | |||
cameraRequestTitle: '"New Expensify" Would Like to Access the Camera', | |||
cameraRequestMessage: 'Uh-oh, you have not granted us camera access. We need that to complete this verification', |
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.
Lastly, the translation here is following.
cameraRequestMessage: 'Uh-oh, you have not granted us camera access. We need that to complete this verification', | |
cameraRequestMessage: 'No has habilitado los permisos para acceder a la cámara. Necesitamos acceso para completar la verificaciôn.', |
Hi @mountiny @parasharrajat |
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.
Great @phivh! Can you just please move the cameraPermissionsNotGranted
to the onfidoStep
in the translations? Can you also merge main
and test it for the last time and we can merge! 🎉 Thank you very much for your work and patience with the translations, this usually does not take so long. Christmas 🎄
@@ -56,7 +56,7 @@ class Onfido extends React.Component { | |||
errorMessage, | |||
)) { | |||
Alert.alert( | |||
this.props.translate('onfidoStep.cameraRequestTitle'), | |||
this.props.translate('cameraPermissionsNotGranted'), |
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.
Could we please move the cameraPermissionsNotGranted
to the onfidoStep
? It is not used anywhere else and it is uncommon to have the keys in the first level.
@mountiny I moved the key |
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.
@phivh Thank you very much! I have thoroughly enjoyed working on this with you and I hope to work with you on plenty more!
@phivh, Great job getting your first Expensify/App pull request over the finish line! 🎉 I know there's a lot of information in our contributing guidelines, so here are some points to take note of 📝:
So it might take a while before you're paid for your work, but we typically post multiple new jobs every day, so there's plenty of opportunity. I hope you've had a positive experience contributing to this repo! 😊 |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Thanks @mountiny @parasharrajat |
🚀 Deployed to production by @roryabraham in version: 1.1.27-1 🚀
|
Details
Fixed Issues
$ #6841
Tests
QA Steps
Tested On
Screenshots
Web
N/A
Mobile Web
N/A
Desktop
N/A
iOS
ios.mp4
Android
android.mp4