-
Notifications
You must be signed in to change notification settings - Fork 365
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
fix: [M3-7004] - Allow IPv6 ranges transfers #10156
Conversation
3d3c101
to
676ea62
Compare
...publicIPv4Addresses, | ||
...privateIPv4Addresses, | ||
...ipv6Addresses, | ||
]; |
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.
So that's the gist of it. The report mentions a regression but curious to know how it ever worked without iterating over those 🤔
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 a chance I caused a regression with #9097, but I'm not sure this was working in the first place.
/> | ||
))} | ||
</Box> | ||
</StyledRadioGroup> |
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 frankly did not feel like abstracting the radio groups though they are pretty much identical. I just went for consolidated styling and I am at peace with it.
I changed the structure and added accessible support based on html recommendations which were slightly broken: https://www.w3.org/WAI/ARIA/apg/patterns/radio/examples/radio-rating/
Coverage Report: ✅ |
@jdamore-linode thoughts on covering this one? |
...publicIPv4Addresses, | ||
...privateIPv4Addresses, | ||
...ipv6Addresses, | ||
]; |
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 a chance I caused a regression with #9097, but I'm not sure this was working in the first place.
@@ -107,6 +108,7 @@ export const useLinodeShareIPMutation = () => { | |||
|
|||
export const useAssignAdressesMutation = () => { | |||
const queryClient = useQueryClient(); | |||
const { location } = useHistory(); |
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 approach might be fine but we may want to explore more robust ways.
If we ever use this mutation on a different page, it might not make the correct invalidations.
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.
If we keep this, useParams
might be better
const { linodeId } = useParams<{ linodeId: 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.
You're right - I added a currentLinodeId
required param to pass to useAssignAdressesMutation
which solved our problem and is more robust. The mutation is only used in the IPTransfer
modal but if eventually used elsewhere, i don't a reason why we wouldn't have access to the current linode ID we're migrating the IP address from.
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.
Awesome. Good fixes and changes!
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.
Able to successfully transfer IPv4 addresses and IPv6 ranges ✅
"IP Addresses" table reflects updates w/o refreshing the page ✅
Mobile view ✅
This is an existing issue in prod, but I noticed that if you fill out the "IP Transfer" (or "IP Sharing") dialog, exit it before submitting, and re-open it, it will be populated with the data you didn't submit. Not sure if we're doing that intentionally for some reason (we normally don't throughout the app)
@abailly-akamai We definitely should! I think we should have Cypress coverage for pretty much every flow involving the Linode Details page (if not e2e, at least with mock data) and I don't believe we have any for IP management right now. I wouldn't worry about handling that as part of this PR (unless you're feeling ambitious) -- I can write up some tickets for this and a few other things later this afternoon. |
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.
@dwiley-akamai This is indeed intentional (and not consistent with the rest of the app), mostly because we had gotten feedback users go back and forth between the table and modals to see additional details. @hana-linode intentional as well. This modal has a unique layout and the mobile version needed a bit of TLC. Again, not really consistent but neither is this feature. Gonna leave it in there cause it adds clarity between rows. @jdamore-linode tickets would be great, thank you! |
Description 📝
This PR aims to fix a regression where users weren't able to transfer IPv6 ranges in the Linode Network tab.
I am frankly unsure how that was a regression considering we weren't pulling the ranges in the modal whatsoever, but perhaps someone has better context about this. Long story short, I hope my fix is the right one considering my lack of context. One thing I know is that adding those back to the modal works fine, and the transfer goes through.
This component is gross. It is a dirty ramda rat fest and the UI is questionable. While I wanted to only address the problem at heart, I couldn't help but attempt to improve the UI and make things at least look better for our users in the modal and add IP drawer.
Changes 🔄
Preview 📷
How to test 🧪
Prerequisites
linode1
,linode2
)Reproduction steps
/linodes/{linode1.id}/networking
/64
or/56
)Verification steps
/linodes/{linode1.id}/networking
linode2
Overall regression testing
As an Author I have considered 🤔
Check all that apply