Skip to content

Commit 4e96953

Browse files
authored
fix(compass-connections): connection toast fixes COMPASS-9787 (#7278)
* always close the connection error toast when clicking an action * break words so crazy errors don't break the layout
1 parent 95fdb4e commit 4e96953

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/compass-connections/src/components/connection-status-notifications.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ const connectionErrorActionsStyles = css({
7575
const connectionErrorStyles = css({
7676
display: 'flex',
7777
flexDirection: 'column',
78+
wordBreak: 'break-word',
7879
});
7980

8081
const connectionErrorTitleStyles = css({
@@ -201,16 +202,15 @@ const openConnectionFailedToast = ({
201202
onReview={
202203
onReviewClick
203204
? () => {
204-
if (!onDebugClick) {
205-
// don't close the toast if there are two actions so that the user
206-
// can still use the other one
207-
closeToast(`connection-status--${failedToastId}`);
208-
}
205+
closeToast(`connection-status--${failedToastId}`);
209206
onReviewClick();
210207
}
211208
: undefined
212209
}
213-
onDebug={onDebugClick}
210+
onDebug={() => {
211+
closeToast(`connection-status--${failedToastId}`);
212+
onDebugClick?.();
213+
}}
214214
/>
215215
),
216216
variant: 'warning',

0 commit comments

Comments
 (0)