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
OCPBUGS-26566: Page fails to return to the Secrets list after clicking 'Cancel' on any Secret creation page #13504
OCPBUGS-26566: Page fails to return to the Secrets list after clicking 'Cancel' on any Secret creation page #13504
Conversation
@cyril-ui-developer: This pull request references Jira Issue OCPBUGS-26566, which is invalid:
Comment 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 openshift-eng/jira-lifecycle-plugin repository. |
/jira refresh |
@cyril-ui-developer: This pull request references Jira Issue OCPBUGS-26566, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: 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 openshift-eng/jira-lifecycle-plugin repository. |
/lgtm |
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.
Removing the onCancel
prop from this component changes the API. I'm not sure this is necessary to fix the bug. It might cause regressions if it's being used anywhere. Also, if this prop is going to be removed, the component prop types need to be updated as well.
@@ -272,7 +273,7 @@ export const SecretFormWrapper: React.FC<BaseEditSecretProps_> = (props) => { | |||
errorMessage={error || ''} | |||
inProgress={inProgress} | |||
submitText={t('public~Create')} | |||
cancel={props.onCancel || defaultCancel} | |||
cancel={cancel} |
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 probably need to keep the original logic using props.onCancel
.
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 probably need to keep the original logic using
props.onCancel
.
Please can you explain why?
type="button" | ||
variant="secondary" | ||
id="cancel" | ||
onClick={onCancel || defaultCancel} |
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.
Same here.
@TheRealJon Yes, removing |
If we know the |
Yes, I agree. But should be a separate bug or tech-debt stuff since it would require verifying every place where it is used. |
Could you clarify? The changes here and here are removing support for the |
Never mind, it seems it is a small change to remove the |
3974f3e
to
6c79de7
Compare
7c3a185
to
77d66e5
Compare
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 could cause a regression in dev console.
@@ -24,7 +24,6 @@ const CreateSecretModal: React.FC<Props> = ({ close, namespace, save, secretType | |||
|
|||
return ( | |||
<SecretFormWrapper | |||
onCancel={close} |
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 seems to have more impact than intended. Now clicking cancel in this dev console secret modal will not close the modal. I think we need to retain support for the optional onCancel
prop in the SecretFormWrapper component since the API is being used here.
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 seems to have more impact than intended. Now clicking cancel in this dev console secret modal will not close the modal. I think we need to retain support for the optional
onCancel
prop in the SecretFormWrapper component since the API is being used here.
Hmm, I traced where SecretFormWrapper
is used in CreateSecretModal
, and I couldn't find any instance that is passing in the onCancel
props. Are you referring to the "Add secret to workload" in dev-console, or something else?
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.
IIUC, the original behavior of the SecretFormWrapper
component uses the optional onCancel
callback prop when the cancel button is clicked. Dev console appears to use the SecretFormWrapper
component in a modal, and uses this onCancel
prop to close the modal. So, from what I can tell, removing onCancel
from SecretFormWrapper
may cause a regression in the dev console. I think it's beyond the scope of this bug to track down the usage of this specific prop and remove it. We should leave it as it was since there does seem to be some risk of regression.
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.
IIUC, the original behavior of the
SecretFormWrapper
component uses the optionalonCancel
callback prop when the cancel button is clicked. Dev console appears to use theSecretFormWrapper
component in a modal, and uses thisonCancel
prop to close the modal. So, from what I can tell, removingonCancel
fromSecretFormWrapper
may cause a regression in the dev console. I think it's beyond the scope of this bug to track down the usage of this specific prop and remove it. We should leave it as it was since there does seem to be some risk of regression.
@TheRealJon Updated! PTAL.
77d66e5
to
2c897d8
Compare
2c897d8
to
50a6af6
Compare
/retest |
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cyril-ui-developer, sg00dwin, TheRealJon 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 |
@cyril-ui-developer: all tests passed! Full PR test history. Your PR dashboard. 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. |
@cyril-ui-developer: Jira Issue OCPBUGS-26566: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-26566 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 openshift-eng/jira-lifecycle-plugin repository. |
[ART PR BUILD NOTIFIER] This PR has been included in build openshift-enterprise-console-container-v4.16.0-202402072112.p0.ga9730e2.assembly.stream.el8 for distgit openshift-enterprise-console. |
Fix included in accepted release 4.16.0-0.nightly-2024-02-08-073857 |
/cherry-pick release-4.15 |
@rhamilto: new pull request created: #13630 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. |
Before:
After: