-
Notifications
You must be signed in to change notification settings - Fork 128
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build MVP for reworked navigation of ContactInfo update prefilled pattern pages - PT 1 #34026
Build MVP for reworked navigation of ContactInfo update prefilled pattern pages - PT 1 #34026
Conversation
… refactor ContactInfo and Edit comps
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.
ESLint is disabled
vets-website
uses ESLint to help enforce code quality. In most situations we would like ESLint to remain enabled.
What you can do
See if the code can be refactored to avoid disabling ESLint, or wait for a VSP review.
src/applications/_mock-form-ae-design-patterns/shared/components/ContactInfo/ContactInfo.jsx
Show resolved
Hide resolved
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.
Great work! Approved
Are you removing, renaming or moving a folder in this PR?
Did you change site-wide styles, platform utilities or other infrastructure?
Summary
General functionality and updates
src/applications/_mock-form-ae-design-patterns/shared/components/ContactInfo
the plan is to move this into platform forms-system when it is readyContactInfo
component is wrapped in aContactInfoLoader
component that will check for the missing fields and navigate a user automatically to the first required field editing page of the set.ContactInfoSucessAlerts.jsx
was created to house the success alerts that are displayed at the top of the page when a user arrives on the summary page after updating at least one field.useRouterMetadata
anduseContactInfo
, that help get things like missing fields, required fields, and related route state in a consistent way. This is how we can check what page a user should be navigated to after they finish adding a piece of missing data.Configuring use and related feature toggle
profileContactInfo({config})
and a falsey option ofconfig.prefillPatternEnabled
exists, then the re-directs WILL NOT happen. This would be the default, until we determine the work to be ready for production.prefillPatternEnabled
option, there is a feature toggle calledaedpPrefill
that is also checked to determine if the new behavior should be used.aedpPrefill
toggle and theconfig.prefillPatternEnabled
need to be true for the pattern to be used. This double check allows a toggle to be turned on and only specific forms to opt into the new pattern, but also provided a kill switch if there are issues that require immediate deactivation of this pattern implementation.Remaining work and unresolved issues (this doesn't all need to be reviewed, but wanted a place to put this and build the next set of tickets from)
email,updated
is what is stored in the session storage location ofonReviewPageContactInfoEdit
(which isn't the greatest name especially in the context of the new pattern, but will have to be worked around regardless)email,updated|mobilePhone,updated|mailingAddress|errored
etc and that could be parsed and used accordingly.Further Considerations
Related issue(s)
Testing done
TO TEST LOCALLY
open the Blue Task of pattern 2 and click through the pages. The mock api is set up to show a user with no contact info, so you can put in one piece of info at a time to see the updates go in and the user be ushered to the next page.
Tested locally. Will be providing e2e and unit tests as this gets closer to done.
Updated BlueTask e2e test to use the new components, and got it passing and showing new UI
Screenshots
ContactInfo summary page after updates are made to page
What areas of the site does it impact?
Just the authenticated patterns mock form app for now. The plan is to move this into platform and get adoption from other forms teams
Acceptance criteria
Quality Assurance & Testing
Error Handling
Authentication
Requested Feedback
(OPTIONAL) What should the reviewers know in addition to the above. Is there anything specific you wish the reviewer to assist with. Do you have any concerns with this PR, why?