-
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
Adds initial mhv-supply-reordering application #33224
Conversation
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.
}, | ||
}; | ||
|
||
// eslint-disable-next-line no-unused-vars |
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 disabled here
], | ||
}; | ||
|
||
// eslint-disable-next-line no-unused-vars |
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 disabled here
], | ||
}; | ||
|
||
// eslint-disable-next-line no-unused-vars |
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 disabled here
@@ -0,0 +1,18 @@ | |||
const delay = require('mocker-api/lib/delay'); // eslint-disable-line no-unused-vars |
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 disabled here
@@ -0,0 +1,68 @@ | |||
/* eslint-disable camelcase */ |
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 disabled here
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.
This is excellent work! I really love seeing all the decomposition and how much cleaner everything is. I have a few small comments but don't see anything show-stopping at all.
|
||
A web-component-pattern is a group of web-component-fields that can span one or more pages (e.g. - a multi-page form). These can be found at `src/platform/forms-system/src/js/web-component-patterns`. | ||
|
||
## Form Flow |
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.
I love this thorough README and the docs references!
@@ -0,0 +1,12 @@ | |||
import React from 'react'; |
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.
really like these clean little components
const STATE_NAMES = filteredStates.map(state => state.label); | ||
|
||
/* | ||
const NONBLANK_PATTERN = '^.*\\S.*'; |
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.
Is the commented out code being kept for a specific reason?
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.
There's still some work to be completed with this component. I'll clear out any commented code.
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.
sorry if I jumped the gun on the review!
import React, { useState } from 'react'; | ||
import UnsavedFieldNote from './UnsavedFieldNote'; | ||
|
||
const EditEmail = ({ data, goToPath, setFormData }) => { |
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.
Are we doing any validation on the entered email address?
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.
Hmmm.... Not yet, but we should!
|
||
const SuppliesUnavailable = ({ supplies }) => { | ||
const cards = supplies | ||
?.sort((a, b) => a.productName.localeCompare(b.productName)) |
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.
It could be nice to move this logic to a sortedSupplies
utility function
something went wrong on our end. | ||
</p> | ||
<p className="vads-u-font-weight--bold vads-u-margin-y--1 vads-u-font-family--serif"> | ||
What you can do |
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.
Should this be a heading? Genuinely not sure.
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.
Couldn't hurt to make this an h4, but I might hold off changing it until an a11y review.
suppliesUi, | ||
} from '../utils/helpers'; | ||
|
||
const numberOfSuppliesPhrase = count => { |
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.
maybe we could move this to a shared utility and use it other places the pattern occurs? (I know I saw it at least one other place)
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.
@@ -0,0 +1,105 @@ | |||
// eslint-disable-next-line no-unused-vars |
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 disabled here
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.
The structure/setup for supply reordering is looking good.
|
||
## App | ||
|
||
Form app generated with `yarn app:new`. Changes to the following files were reverted, since `VA_FORM_IDS.FORM_VA_2346A` already exists. |
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.
correction: yarn app:new
--> yarn new:app
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.
I think this is good to move forward. Just some minor feedback below.
One piece of feedback is that you might consider moving/merging your mocks into src/platform/mhv/api/mocks
. This is something I keep meaning to discuss around the mhv-landing-page mocks as well, since it seems potentially useful to buy into the shared MHV mocks.
I also approve this assuming you'll address the proptypes warnings in a future PR, though I am ambivalent on the value of proptypes validation myself.
* Adds initial mhv-supply-reorder form app * Adds mocks * Adds alerts * Moves breadcrumbs to IntroductionPage * Sets useTopBackLink: true in formConfig (large continue button) * Show subtitle on IntroductionPage, only * Sets 'Finish this order later' content for save link * Removes margin from paragraph in informative va-alert * Sets Select supplies as first page * Sets supply count, 'No supplies selected/found' text * Adds formatDate helper * Adds checkboxes for selecting supplies * Adds product description * Updates readme * No e2e specs, yet * Adds unit specs
Are you removing, renaming or moving a folder in this PR?
Examples of a TeamSite: https://va.gov/health and https://benefits.va.gov/benefits/. This scenario is also referred to as the "injected" header and footer. You can reach out in the
#sitewide-public-websites
Slack channel for questions.Did you change site-wide styles, platform utilities or other infrastructure?
Summary
vagovprod: false
so that app is only available in lower environments.Related issue(s)
Testing done
containers/Alerts.jsx
andcomponents/Alert*.jsx
Screenshots
Note: This field is mandatory for UI changes (non-component work should NOT have screenshots).
What areas of the site does it impact?
(Describe what parts of the site are impacted if code touched other areas)
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?