-
Notifications
You must be signed in to change notification settings - Fork 143
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
Feature/privacy statement cx 1711 #316
Conversation
…onfido/onfido-sdk-ui into feature/privacy-statement-cx-1711
Travis automatic deployment: https://staging-316-pr-onfido-sdk-ui-onfido.surge.sh |
Travis automatic deployment: https://release-316-pr-onfido-sdk-ui-onfido.surge.sh |
Travis automatic deployment: https://staging-316-pr-onfido-sdk-ui-onfido.surge.sh |
Travis automatic deployment: https://release-316-pr-onfido-sdk-ui-onfido.surge.sh |
Travis automatic deployment: https://staging-316-pr-onfido-sdk-ui-onfido.surge.sh |
Travis automatic deployment: https://release-316-pr-onfido-sdk-ui-onfido.surge.sh |
Travis automatic deployment: https://staging-316-pr-onfido-sdk-ui-onfido.surge.sh |
Travis automatic deployment: https://release-316-pr-onfido-sdk-ui-onfido.surge.sh |
Travis automatic deployment: https://316-pr-onfido-sdk-ui-onfido.surge.sh |
Travis automatic deployment: https://staging-316-pr-onfido-sdk-ui-onfido.surge.sh |
Travis automatic deployment: https://release-316-pr-onfido-sdk-ui-onfido.surge.sh |
Travis automatic deployment: https://316-pr-onfido-sdk-ui-onfido.surge.sh |
src/components/Capture/capture.js
Outdated
onWebcamError: this.onWebcamError, | ||
error: this.state.error, | ||
...other}}/> | ||
<div> |
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.
This wrapping div
looks unnecessary, no?
@import (less) "../Theme/constants.css"; | ||
|
||
.privacy { | ||
height: calc(~"100% - 112px"); |
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.
calc
isn't a less mixin, or anything - it's a native CSS function
You should just be able to do calc(100% - 112px
), right?
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.
what do we need calc for?
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 need it because the privacy component has an absolute positioning and we want to make sure that its height never covers the footer so it has a 100% height minus the height (including paddings/margins) of the footer.
@stephencookdev If I use calc(100% - 112px)
it gets computed as height: calc(-12%);
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.
so we can't use padding instead? Also, the computation is a bit weird, does padding have a height os 12%?
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.
No, calc
does not work as expected with LESS that's why I'm using the following syntax calc(~"100% - 112px");
see this issue.
I cannot use a padding but I could get rid of absolute positioning and give it a fixed height
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 added a comment for now as this behaviour is also used in the confirm screen where there is already a comment explaining why we are using calc
. This will have to be refactored as part of the header/footer positioning ticket
{i18n.t('privacy.small_print_p1')} | ||
<a href='https://onfido.com/termofuse' target='_blank'>{i18n.t('privacy.terms_link')}</a> | ||
{i18n.t('privacy.small_print_p2')} | ||
<a href='https://onfido.com/privacy' target='_blank'>{i18n.t('privacy.privacy_link')}</a> |
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.
This is a really brittle way of doing i18n
You're assuming that any language you want to translate to will fit into the structure you've written here. But you might get a language where it sounds way more natural to order this as "Onfido Terms of Use you are agreeing to" (Japanese is like that, I think)
We're handling this elsewhere by explicitly storing i18n as markdown, and parsing that. But it's fairly heavyweight, we can just get away with it for now. You might want to either make an explicit fragment class, or trust your translations and use dangerouslySetInnerHtml
through a translation wrapper (as sort of discussed here)
But also feel free to just kick the bucket down with this one. It'll definitely bite you at some point though, so bear it in mind
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.
That's a very good point. I will have look at fixing this tomorrow.
Travis automatic deployment: https://staging-316-pr-onfido-sdk-ui-onfido.surge.sh |
Travis automatic deployment: https://staging-316-pr-onfido-sdk-ui-onfido.surge.sh |
Travis automatic deployment: https://release-316-pr-onfido-sdk-ui-onfido.surge.sh |
Travis automatic deployment: https://316-pr-onfido-sdk-ui-onfido.surge.sh |
src/components/Capture/capture.js
Outdated
@@ -43,6 +45,11 @@ class Capture extends Component { | |||
if (allInvalid) this.onFileGeneralError() | |||
} | |||
|
|||
acceptTerms = () => { | |||
this.props.actions.acceptTerms() | |||
this.setState({privacyTermsAccepted: true}) |
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.
isn't this a prop already?
|
||
class PrivacyStatement extends Component { | ||
componentDidMount() { | ||
sendScreen(['privacy']) |
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't just use the tracking component wrapper for this?
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 can but the screen name on woopra will be appended to the capture component one, resulting in something like screen_document_front_capture_privacy
and we just want screen_privacy
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 wonder if we should have as an option to get rid of the prefixes
@import (less) "../Theme/constants.css"; | ||
|
||
.privacy { | ||
height: calc(~"100% - 112px"); |
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.
what do we need calc for?
actions.setDocumentType(documentType) | ||
actions.acceptTerms() |
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 have a comment on why we are accepting this. also, if the UI order changes and privacy shows after the cross device can be started, this will introduce a bug, which is something to bear in mind.
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.
At the moment, you will never be able to reach cross device if you don't accept the privacy terms, even if you change the steps order. The acceptance criteria didn't say that the privacy screen should not be showed for face capture so I am double checking with @seewah what's the expected behaviour
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.
After our conversation this morning, we agreed on showing the privacy screen also for the face step. Given the current implementation, the terms will always be accepted when the user reaches the cross device client. I could send the termsAccepted
prop to the cross device client and trigger this action once we have received it but it seems redundant to me because a user cannot reach the cross device flow without accepting terms first.
# Conflicts: # dist/onfido.min.js
Travis automatic deployment: https://staging-316-pr-onfido-sdk-ui-onfido.surge.sh |
Travis automatic deployment: https://release-316-pr-onfido-sdk-ui-onfido.surge.sh |
Travis automatic deployment: https://316-pr-onfido-sdk-ui-onfido.surge.sh |
Travis automatic deployment: https://staging-316-pr-onfido-sdk-ui-onfido.surge.sh |
Travis automatic deployment: https://release-316-pr-onfido-sdk-ui-onfido.surge.sh |
Travis automatic deployment: https://316-pr-onfido-sdk-ui-onfido.surge.sh |
webpack.config.babel.js
Outdated
@@ -90,6 +90,8 @@ const baseStyleRules = (disableExtractToFile = false) => | |||
const PROD_CONFIG = { | |||
'ONFIDO_API_URL': 'https://api.onfido.com', | |||
'ONFIDO_SDK_URL': 'https://sdk.onfido.com', | |||
'ONFIDO_TERMS_URL': 'https://onfido.com/termofuse', |
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.
oops sorry my bad it should be /termsofuse (I realise I mistyped termofuse in the ticket!)
webpack.config.babel.js
Outdated
@@ -102,6 +104,8 @@ const TEST_CONFIG = { ...PROD_CONFIG, PUBLIC_PATH: '/', 'MOBILE_URL' : '/' } | |||
const STAGING_CONFIG = { | |||
'ONFIDO_API_URL': 'https://apidev.onfido.com', | |||
'ONFIDO_SDK_URL': 'https://sdk-staging.onfido.com', | |||
'ONFIDO_TERMS_URL': 'https://dev.onfido.com/termofuse', |
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.
oops sorry my bad it should be /termsofuse (I realise I mistyped termofuse in the ticket!)
Apart from my comment re: termsofuse (as opposed to termofuse) I am happy with the ticket. @rfreitas you suggested you would make the change. Do you mind doing that, and I can accept and merge thanks! |
Travis automatic deployment: https://staging-316-pr-onfido-sdk-ui-onfido.surge.sh |
Travis automatic deployment: https://release-316-pr-onfido-sdk-ui-onfido.surge.sh |
Travis automatic deployment: https://316-pr-onfido-sdk-ui-onfido.surge.sh |
OK one more issue, on Safari, the onfido logo is obscured on the privacy screen. @stefaniacardenas please work with @danielspagnolo to see what options we have. I see this as a blocker for now. |
Travis automatic deployment: https://staging-316-pr-onfido-sdk-ui-onfido.surge.sh |
Travis automatic deployment: https://release-316-pr-onfido-sdk-ui-onfido.surge.sh |
Travis automatic deployment: https://316-pr-onfido-sdk-ui-onfido.surge.sh |
Problem
Users should be aware of the Privacy Policy and Onfido Terms of Use before submitting their documents.
Solution
Added legal documentation view before first document capture to assist client with user privacy notifications and compliance.
Checklist
put
n/a
if item is not relevant to PR changes