-
Notifications
You must be signed in to change notification settings - Fork 887
fix: stop SSHKeysPage from flaking #10553
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
Conversation
|
||
useCustomEvent(SnackbarEventType, handleNotification); | ||
|
||
const renderAdditionalMessage = (msg: AdditionalMessage, idx: number) => { |
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 got removed in favor of making it a separate component at the bottom of the file
@@ -87,26 +42,27 @@ export const GlobalSnackbar: FC = () => { | |||
key={notification.msg} | |||
open={open} | |||
variant={variantFromMsgType(notification.msgType)} | |||
onClose={() => setOpen(false)} | |||
autoHideDuration={notification.msgType === MsgType.Error ? 22000 : 6000} | |||
anchorOrigin={{ vertical: "bottom", horizontal: "right" }} |
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.
All the prop changes here are just moving the single-line prop definitions so they're grouped together
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.
it's the little things ✨
@@ -87,26 +42,27 @@ export const GlobalSnackbar: FC = () => { | |||
key={notification.msg} | |||
open={open} | |||
variant={variantFromMsgType(notification.msgType)} | |||
onClose={() => setOpen(false)} | |||
autoHideDuration={notification.msgType === MsgType.Error ? 22000 : 6000} | |||
anchorOrigin={{ vertical: "bottom", horizontal: "right" }} |
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.
it's the little things ✨
Closes #10481
This fix updates
SSHKeys.tsx
to prevent its tests from flaking.Changes made
<GlobalSnackbar>
anduseCustomEvent
to simplify snackbar logicSSHKeys.tsx
to process mutation errors solely through the snackbar, and not also the local UI