LG-10973: Log heading and error message when warning shown#9255
Merged
night-jellyfish merged 6 commits intomainfrom Oct 2, 2023
Merged
Conversation
dawei-nava
reviewed
Sep 23, 2023
app/javascript/packages/document-capture/components/document-capture-warning.tsx
Outdated
Show resolved
Hide resolved
58f9fb7 to
449618a
Compare
aduth
reviewed
Sep 27, 2023
spec/javascript/packages/document-capture/components/document-capture-warning-spec.jsx
Outdated
Show resolved
Hide resolved
app/javascript/packages/document-capture/components/document-capture-warning.tsx
Outdated
Show resolved
Hide resolved
dawei-nava
reviewed
Sep 27, 2023
Contributor
There was a problem hiding this comment.
This works, another possible way is to wrap UknownError with forwardRef(looks like it returns paragraph element for all scenarios). and create the ref and avoid creating additional div
const errorMessageDisplayedRef = useRef<HTMLParagraphElement>(null)
dawei-nava
approved these changes
Oct 2, 2023
Contributor
dawei-nava
left a comment
There was a problem hiding this comment.
Ok for now, may be we can refactor the error part once Kelli audit all the alerts/errors.
added 6 commits
October 2, 2023 11:12
Technical notes: - currently there will probably only be one general or one pii error message. But in the off chance that that changes in the future, we wanted to account for that with the `join`.
aa67250 to
dc6379e
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎫 Ticket
Ticket: https://cm-jira.usa.gov/browse/LG-10973
🛠 Summary of changes
Currently, the
Frontend: IdV: warning shownevent does not tell us what error the user saw, only that an error message was displayed. There were a couple of times where a user's uploaded photo has a few errors, and we weren't sure which message they actually saw. For example, a case where this might appear is when the user uploaded a passport image with an unreadable address, we wanted to be sure that they saw the "wrong doc type" messaging and not the "couldn't read address" messaging.This change logs the heading and error shown so that in the future we can check what the user saw with relative ease.
📜 Testing Plan
log/events.logfor theFrontend: IdV: warning shownentryheadingproperty and check that it matches what you see on the pageerrorMessageDisplayedproperty and check that it matches what you see on the page👀 Screenshots
Not exactly a screenshot, but here is the change in logs for a DOB entry error (log shortened with
[...]):Before:
After: