-
Notifications
You must be signed in to change notification settings - Fork 332
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-7880] - Properly reset rebuild modal state #10287
Conversation
|
||
const handleRebuildError = (status: string) => { | ||
setRebuildError(status); | ||
}; | ||
|
||
return ( | ||
<Dialog | ||
TransitionProps={{ onExited: onExitDrawer }} |
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.
We could frankly stop reseting state with useEffect all together on modal/drawer by resetting it via onClose
and TransitionProps
I used TransitionProps
here to prevent a DOM change before the modal has closed, which is a nice bonus (you could maybe see the content very briefly otherwise)
data-qa-rebuild-desc | ||
sx={{ paddingBottom: theme.spacing(2) }} |
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.
just alpha ordering - no other change
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.
Good suggestion, worth broadcasting to others again to let them know
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.
Thank you @abailly-akamai
Coverage Report: β
|
Description π
This PR fixes a bug where the "mode" state of the rebuild dialog wasn't reset when mounted. This isn't as bad a bug as initially thought, just a potential awkward experience for the user.
Changes π
Target release date ποΈ
3/18/2024
Preview π·
Screen.Recording.2024-03-14.at.16.24.33.mov
Screen.Recording.2024-03-14.at.16.22.19.mov
How to test π§ͺ
Reproduction steps
Navigate to linode list, click on "Rebuild" action menu item for Linode A
Close modal, click on "Rebuild" action menu item for Linode A
Navigate to linode list, click on "Rebuild" action menu item for Linode A
Close modal, click on "Rebuild" action menu item for Linode B
Verification steps
Navigate to linode list, click on "Rebuild" action menu item for Linode A
Close modal, click on "Rebuild" action menu item for Linode A
Navigate to linode list, click on "Rebuild" action menu item for Linode A
Close modal, click on "Rebuild" action menu item for Linode B
As an Author I have considered π€
Check all that apply