Skip to content

LG-12829: add conditional links for selfie help center articles#10415

Merged
amirbey merged 4 commits intomainfrom
amirbey/LG-12829-selfie-help-center-articles
Apr 15, 2024
Merged

LG-12829: add conditional links for selfie help center articles#10415
amirbey merged 4 commits intomainfrom
amirbey/LG-12829-selfie-help-center-articles

Conversation

@amirbey
Copy link
Contributor

@amirbey amirbey commented Apr 11, 2024

🎫 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

  • Fail doc auth with selfie due to a liveness failure in the portrait match and observe the link routes to the Doc Auth content in the help center and the destination link contains the anchor (Note: the anchored content will not be deployed to login.gov help center until selfie go live)
  • Fail doc auth with selfie due to a portrait match failure and observe the link routes to the Doc Auth content in the help center

👀 Screenshots

Liveness: LG-12903-liveness-en LG-12903-liveness-es LG-12903-liveness-fr
FaceMatch: LG-12903-pm-fail-en LG-12903-pm-fail-es LG-12903-pm-fail-fr

@amirbey amirbey self-assigned this Apr 11, 2024
Copy link
Contributor

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?

Suggested change
selfieHelpCenterLink += '#anchor'
const helpCenterURL = new URL(helpCenterLink)
helpCenterURL.hash = 'anchor';
selfieHelpCenterLink = helpCenterURL.toString();

Copy link
Contributor

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.

Copy link
Contributor

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

@amirbey amirbey requested review from a team, charleyf and dawei-nava and removed request for a team April 13, 2024 01:35
@amirbey amirbey changed the title add conditional links for selfie help center articles LG-12829: add conditional links for selfie help center articles Apr 13, 2024
@amirbey amirbey marked this pull request as ready for review April 13, 2024 01:41
@amirbey amirbey requested a review from night-jellyfish April 15, 2024 16:08
Copy link
Contributor

@dawei-nava dawei-nava left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

amirbey added 4 commits April 15, 2024 15:00
changelog: Upcoming Features, Document Authentication, Add help center articles assisting user failing selfie match
@amirbey amirbey force-pushed the amirbey/LG-12829-selfie-help-center-articles branch from eb3705e to 70f69b1 Compare April 15, 2024 19:01
@amirbey amirbey merged commit 8074c00 into main Apr 15, 2024
@amirbey amirbey deleted the amirbey/LG-12829-selfie-help-center-articles branch April 15, 2024 19:42
@mitchellhenke mitchellhenke mentioned this pull request Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants