-
Notifications
You must be signed in to change notification settings - Fork 111
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
LG-12829: add conditional links for selfie help center articles #10415
Conversation
let selfieHelpCenterLink = helpCenterLink; | ||
let selfieHelpCenterLinkText = t('doc_auth.errors.general.selfie_failure_help_link_text'); | ||
if (isFailedSelfieLivenessOrQuality) { | ||
selfieHelpCenterLink += '#anchor' |
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.
WDYT of using a URL
object to parse + manipulate this?
selfieHelpCenterLink += '#anchor' | |
const helpCenterURL = new URL(helpCenterLink) | |
helpCenterURL.hash = 'anchor'; | |
selfieHelpCenterLink = helpCenterURL.toString(); |
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 also have a similar abstraction addSearchParams
. I could imagine abstracting a similar addHashAnchor
or generalized addParams
if we wanted to have a simple one-liner tool available, if we think this is a common pattern.
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.
Another thought, having this URL be an anchor is maybe just an implementation detail? What if both URLs were passed from the server as configs? Simplifies the frontend logic
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.
LGTM
changelog: Upcoming Features, Document Authentication, Add help center articles assisting user failing selfie match
eb3705e
to
70f69b1
Compare
馃帿 Ticket
Link to the relevant ticket:
LG-12829
馃洜 Summary of changes
Add a link to the error message that directs the user to the help center when selfie match fails.
馃摐 Testing Plan
馃憖 Screenshots
Liveness:
FaceMatch: