Skip to content

LG-10300: Add optional info alert to in person proofing location search#9172

Merged
tomas-nava merged 14 commits intomainfrom
tomas/lg-10300-add-redirect-info-alert-to-in-person-location-search
Sep 11, 2023
Merged

LG-10300: Add optional info alert to in person proofing location search#9172
tomas-nava merged 14 commits intomainfrom
tomas/lg-10300-add-redirect-info-alert-to-in-person-location-search

Conversation

@tomas-nava
Copy link
Contributor

@tomas-nava tomas-nava commented Sep 8, 2023

🎫 Ticket

LG-10300

🛠 Summary of changes

Add an optional info alert to the in person proofing location search results telling the user that they must enroll before visiting the Post Office. The alert will be shown when the user is searching for locations in the help center.

Also hides the "Select a Post Office location below..." message when no onSelect method is passed to the InPersonLocations component, which is the same way that the "Select" buttons beside each location result are toggled.

📜 Testing Plan

Running the application locally, enter the in-person proofing flow and confirm that the location results display as expected, specifically that no info alert displays, and that the "Select a Post Office..." message displays.

Then, edit app/javascript/packages/document-capture/components/in-person-location-full-address-entry-post-office-search-step.tsx as follows, starting on line 124:

        <InPersonLocations
          locations={locationResults}
          onSelect={null} // <-- changed line
          address={foundAddress.address || ''}
          // v new lines v
          resultsHeaderComponent={() => (
            <Alert type="info" className="margin-bottom-4">
              <strong>You must start this process on Login.gov before going to the Post Office.</strong> <a href="https://login.gov">Learn more about verifying your identity in person.</a>
            </Alert>
          )}
        />

and revisit the location search page. Confirm that the results now include the info alert, and no longer show the "Select a Post Office..." message.

👀 Screenshots

no changes

no-changes

showing info alert and no "Select" messages or buttons (English)

changes-en

showing info alert and no "Select" messages or buttons (Spanish)

changes-es

showing info alert and no "Select" messages or buttons (French)

changes-fr

Tomas Apodaca added 5 commits September 8, 2023 07:40
changelog: User-Facing Improvements, In-person Proofing, Add info alert for users searching locations in help center
Move the InPersonLocationRedirectAlert to the address search component
group, which means it won't have access to the MarketingSiteContext, so
we need to pass it a URL to render.

Also adds AddressSearch props interface so infoAlertURL can be optional.
allthesignals

This comment was marked as resolved.

@tomas-nava

This comment was marked as resolved.

@allthesignals

This comment was marked as resolved.

@tomas-nava
Copy link
Contributor Author

translations have been added to identity-site in 18F/identity-site/pull/1164 @allthesignals

@gina-yamada
Copy link
Contributor

Do you think we need to version up so this new prop will be available when we publish next? Also, I missed this so I will do it in my next PR- but maybe a good idea to update the README for address-search too?

Copy link
Contributor

@allthesignals allthesignals left a comment

Choose a reason for hiding this comment

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

LGTM, just 1 more thing 😇

@tomas-nava
Copy link
Contributor Author

Do you think we need to version up so this new prop will be available when we publish next? Also, I missed this so I will do it in my next PR- but maybe a good idea to update the README for address-search too?

I updated the README in 1e5f442 @gina-yamada

Copy link

@carmenrosalop carmenrosalop left a comment

Choose a reason for hiding this comment

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

Looks good, Tomas!

Tomas Apodaca added 2 commits September 11, 2023 07:52
@tomas-nava
Copy link
Contributor Author

tomas-nava commented Sep 11, 2023

Do you think we need to version up so this new prop will be available when we publish next?

I updated the version in f99411a @gina-yamada

@tomas-nava tomas-nava merged commit f4bcac3 into main Sep 11, 2023
@tomas-nava tomas-nava deleted the tomas/lg-10300-add-redirect-info-alert-to-in-person-location-search branch September 11, 2023 15:32
@aduth aduth mentioned this pull request Sep 11, 2023
@gina-yamada
Copy link
Contributor

gina-yamada commented Sep 18, 2023

I am wondering if we should be adding prop resultsHeaderComponent on FullAddressSearch? https://cm-jira.usa.gov/browse/LG-10785

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