-
Notifications
You must be signed in to change notification settings - Fork 364
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-6816] - Add AGLB Create Route Drawer #9806
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.
Looks great!
Optional change but we might want to make this form have more dynamic error handling to stick to our UX best practices.
I started doing this in the RuleDrawer.tsx
for example. Our patterns around dynamic error handling are a bit all over the place because formik makes it difficult so feel free to explore the options.
packages/manager/src/features/LoadBalancers/LoadBalancerDetail/Routes/CreateRouteDrawer.tsx
Outdated
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.
Looks awesome! 🎉
✅ confirmed tests
✅ confirmed drawer appears
✅ confirmed error message appears if no label put in
Had a couple of questions, both in comments and below:
- the mockup has the text 'Routes Creation info' beneath the drawer title -- do we still plan on including this text or are there more up to date mockups I can cross reference?
- For vpc error handling, we had a few tickets (see M3-7170) where we ensured errors did not persist after making changes to a field. Would we want to include that behavior here/with other AGLB forms? This is what currently happens - typing in the label field doesn't get rid of the error:
Co-authored-by: Connie Liu <139280159+coliu-akamai@users.noreply.github.com>
@coliu-akamai The new way of error handling should clear the error now.
@bnussman-akamai I omitted the text because it didn't seem legit - thoughts? |
{error?.find((e) => e.field === 'protocol')?.reason} | ||
<FormHelperText error> | ||
{formik.touched.protocol | ||
? typeof formik.errors.protocol === 'string' |
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.
Had to narrow this type because it returned string | undefined
and capitalize
doesn't like that.
@jaalah-akamai You are correct, all copy isn't final so it's fine if we omit it. We will be coming back later to update and add copy anyway |
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.
Thanks for confirming, thanks Jaalah & Banks!
Confirmed error gets cleared 🎉
Description 📝
Implements the AGLB create route drawer.
Preview 📷
How to test 🧪
Prerequisites
Reproduction steps
Create Route
Verification steps
Create Route
without a label, an error is surfaced.yarn cy:run -s cypress/e2e/core/loadBalancers/load-balancer-routes.spec.ts
As an Author I have considered 🤔
Check all that apply