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.
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
feat: [M3-6743] - Create Subnet Drawer #9652
feat: [M3-6743] - Create Subnet Drawer #9652
Changes from 10 commits
8c1622a
825f32a
65ab739
822a4ab
eb251af
320e34b
bdd641b
efea558
3141e53
2fc008b
0825e59
e3323c6
6bd6014
0a9e42f
04003ee
df8b1d1
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
When we get a general error (would end up being stored on
errorMap.none
since it doesn't belong to a particular field -- you can try blocking network requests to*subnet*
to replicate this), it's persisting between drawer openings and closings currently.Might have to do something like
setErrorMap({})
in theuseEffect()
, although I'm not sure whyresetForm()
isn't taking care of this aspectThere 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.
thanks for catching, just pushed! Maybe it could be because I've a separate useState hook for the error map due to the SubnetNode, and Formik can't reset that with resetForm? Not too sure though, just a guess 💭
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 have a version where I don't use the SubnetNode on one of my branches -- the code for error handling is a bit cleaner (+ we can keep the formik in the same shape as the CreateSubnetPayload) in that case in exchange for a more cluttered form (but both versions should have the same functionality, if SubnetNode is as flexible as I'd originally intended it to be way back during VPCCreate).
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.
UI mocks updated to use 10.0.4.0/24 as default subnet ip value, so changed it here (+ had to update a lot of related tests)