Skip to content

LG-11984: document capture selfie hint text#9901

Merged
amirbey merged 13 commits intomainfrom
amirbey/LG-11984-selfi-hint-text
Jan 17, 2024
Merged

LG-11984: document capture selfie hint text#9901
amirbey merged 13 commits intomainfrom
amirbey/LG-11984-selfi-hint-text

Conversation

@amirbey
Copy link
Contributor

@amirbey amirbey commented Jan 11, 2024

🎫 Ticket

LG-11984

🛠 Summary of changes

Display the selfie capture hint text to the user on the acuant capture canvas.

📜 Testing Plan

  • in the Idv (using hybrid or mobile standard flow), launch the acuant sdk by attempting to upoad a selfie photo
  • move your face around the frame and verify the hint text at the top of the screen

👀 Screenshots

selfie_face_not_found

@amirbey amirbey self-assigned this Jan 11, 2024
@amirbey amirbey changed the title Amirbey/lg 11984 selfi hint text LG-11984: selfie hint text Jan 11, 2024
@amirbey amirbey changed the title LG-11984: selfie hint text LG-11984: document capture selfie hint text Jan 11, 2024
@amirbey amirbey marked this pull request as ready for review January 11, 2024 20:54
Copy link
Contributor

@charleyf charleyf left a comment

Choose a reason for hiding this comment

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

This looks good to me. I did help write this though, so it would be nice (not required IMO) for someone else to review.

Copy link
Contributor

Choose a reason for hiding this comment

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

I keep waffling whether it's better to have this function, or remove it and just use setImageCaptureText 🤷

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's six one way and a half a dozen the other. 🤷🏻‍♀️

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch, these strings should not be embedded directly.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return isReady ? (
// The <p> to display the text over the selfie capture can be moved to another component
// without too much work, putting it here to keep it conceptually grouped with the selfie capture canvas
return isReady ? (

Copy link
Contributor

Choose a reason for hiding this comment

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

Either way, personally think it's too much for an additional component just for 3 lines of static code, actually just one line.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, interesting. Seems like that comment might be more confusing than it's worth. Agreed that the <p> should't be it's own component.

What I meant was that it actually doesn't matter where the <p> is (as long as it's in the selfie components) because the CSS removes it from the document flow.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is the single quote needed?

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

Copy link
Contributor

@eileen-nava eileen-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 👍🏻

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's six one way and a half a dozen the other. 🤷🏻‍♀️

@amirbey amirbey force-pushed the amirbey/LG-11984-selfi-hint-text branch from db3f7ef to aeef738 Compare January 17, 2024 16:56
@amirbey amirbey merged commit 788bfcd into main Jan 17, 2024
@amirbey amirbey deleted the amirbey/LG-11984-selfi-hint-text branch January 17, 2024 17:51
return isReady ? (
<div id={acuantCaptureContainerId} />
<div id={acuantCaptureContainerId}>
<p className="document-capture-selfie-feedback">{imageCaptureText}</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

Our use of BEM naming conventions aligns neatly 1-to-1 with React components, where if we had a CSS class name of document-capture-selfie-feedback, I'd expect it to be assigned in a component DocumentCaptureSelfieFeedback. I think that could make sense to split out as a component. As currently implemented, I'd assume it would be called something like acuant-selfie-capture-canvas__selfie-feedback, being an element (BEM) within AcuantSelfieCaptureCanvas.

@extend %pad-common-id-card;
}
// Styles for the text that appears over the selfie capture screen to help users position their face for a good photo
.document-capture-selfie-feedback {
Copy link
Contributor

Choose a reason for hiding this comment

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

Following prior comment, an advantage of BEM is it generally avoids issues with needing to qualify (nest) CSS selectors, so I'd expect this to be defined at a top-level.

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.

5 participants