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
Bug 1801419: Show an error dialog when creation of a connection fails #4274
Bug 1801419: Show an error dialog when creation of a connection fails #4274
Conversation
@jeff-phillips-18: This pull request references Bugzilla bug 1801419, which is valid. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@jeff-phillips-18: This pull request references Bugzilla bug 1801419, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
return null; | ||
}; | ||
|
||
const removeConnectorCallback = (edge: Edge): void => { | ||
removeConnection(edge); | ||
removeConnection(edge).catch((error) => { | ||
errorModal({ title: 'Error removing connection', error: error.message }); |
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.
Why no icon here but there's an icon in the other error?
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.
oversight, I will update
export const ModalErrorContent = ({ | ||
error, | ||
title = 'Error', | ||
cancel = undefined, | ||
showIcon = false, | ||
}) => ( | ||
<div className="modal-content"> | ||
<ModalTitle>{title}</ModalTitle> | ||
<ModalTitle className={classNames('modal-header', { 'co-error-modal__icon-header': showIcon })}> | ||
{showIcon && <RedExclamationCircleIcon className="co-error-modal__icon" />} | ||
{title} | ||
</ModalTitle> |
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.
Maybe we should include the error icon always?
Thoughts @benjaminapetersen @spadgett ?
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've removed the changes to add the error icon. That can be determined at a later date.
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.
Maybe we should include the error icon always?
Thoughts @benjaminapetersen @spadgett ?
I say, "yes." Especially in light of #4259 (comment)
I should add, note the icon is on the modal text and not the heading.
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'm inclined to agree, an error that is important enough to be visible to a user prob should have the icon and be treated consistently.
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.
Shouldn't the button in the modal
(1) be a default button and blue
(2) have focus?
(3) i'm unsure what the convention is regarding the button label - if it should be OK or Close. As long as you're using a common utility, I guess we should be consistent!
@serenamarie125 this is the standard error modal that console uses. Only change is that @jeff-phillips-18 added the error icon. |
84c8894
to
72f02f2
Compare
72f02f2
to
f317eaa
Compare
@jeff-phillips-18: This pull request references Bugzilla bug 1801419, which is valid. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: christianvogt, jeff-phillips-18 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@jeff-phillips-18: All pull requests linked via external trackers have merged. Bugzilla bug 1801419 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@jeff-phillips-18: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Fixes:
https://issues.redhat.com/browse/ODC-2962
Analysis / Root cause:
On a failure to create the connection, the results were ignored
Solution Description:
Catch the rejection for the creation of the connection and display an error dialog containing the returned error message. Added checks to safe guard against attempting to create a connection from a node to itself.
Browser conformance:
/kind bug