-
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
feat: [M3-7109] - Add AGLB Delete Route Dialog #9735
feat: [M3-7109] - Add AGLB Delete Route Dialog #9735
Conversation
<DeleteRouteDialog | ||
loadbalancerId={Number(loadbalancerId)} | ||
onClose={() => setIsDeleteDialogOpen(false)} | ||
open={isDeleteDialogOpen} | ||
route={selectedRoute} | ||
/> |
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 tried conditionally rendering like how we discussed in cafe, but the animation close breaks so I'm using our normal pattern
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 actually do wonder if there is actual benefit in conditionally rendering the dialog, since the element isn't even mounted unless open
is true. It sounds to me like performance issues would be more relevant when mounting a Dialog with a big tree (maybe like the Linode Resize dialog for instance). The docs mention a keepMounted
prop to that effect, but it sounds like the opposite of what we usually want to do. From what I could read, it's a case that should be supported by performance benchmarks to justify its usage (when it outside the scope of a micro optimisation).
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! (please add a changeset)
- Copy ✅
- Behavior ✅
- Requests and invalidation ✅
<DeleteRouteDialog | ||
loadbalancerId={Number(loadbalancerId)} | ||
onClose={() => setIsDeleteDialogOpen(false)} | ||
open={isDeleteDialogOpen} | ||
route={selectedRoute} | ||
/> |
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 actually do wonder if there is actual benefit in conditionally rendering the dialog, since the element isn't even mounted unless open
is true. It sounds to me like performance issues would be more relevant when mounting a Dialog with a big tree (maybe like the Linode Resize dialog for instance). The docs mention a keepMounted
prop to that effect, but it sounds like the opposite of what we usually want to do. From what I could read, it's a case that should be supported by performance benchmarks to justify its usage (when it outside the scope of a micro optimisation).
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.
Confirmed copy, styling, and mock requests are all as expected! 🚢
Description 📝
Preview 📷
How to test 🧪
http://localhost:3000/loadbalancers/0/routes
DELETE https://api.linode.com/v4beta/aglb/0/routes/24
API call happens on deleteGET https://api.linode.com/v4beta/aglb/0/routes?page=1&page_size=25
API call)