-
Notifications
You must be signed in to change notification settings - Fork 622
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 1678195: Prevent unmounting and mounting of create secret form #1300
Conversation
/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.
Thanks @jhadvig
89b1375
to
d971193
Compare
@spadgett comments addressed |
|
const secretTypeAbstraction = toTypeAbstraction(this.props.obj.data); | ||
this.setState({ | ||
formComponent: secretFormFactory(secretTypeAbstraction), | ||
secretTypeAbstraction: secretTypeAbstraction}); |
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.
secretTypeAbstraction: secretTypeAbstraction}); | |
secretTypeAbstraction, | |
}); |
const secretTypeAbstraction = toTypeAbstraction(props.obj.data); | ||
const SecretFormComponent = secretFormFactory(secretTypeAbstraction); | ||
const fixed = _.reduce(props.fixedKeys, (acc, k) => ({...acc, k: _.get(props.obj.data, k)}), {}); | ||
return <StatusBox {...props.obj}> |
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 think this will break error handling if the secret doesn't exist.
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.
not really sure how, since the StatusBox component is mainly operating with loaded
and loadError
properties, that are supplied by Firehose
/retest |
/retest |
/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
} | ||
render() { | ||
const { obj, fixedKeys} = this.props; | ||
const { secretTypeAbstraction } = this.state; |
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.
nit: you could use destructuring here to avoid the assignment below on line 903
const { secretTypeAbstraction } = this.state; | |
const { secretTypeAbstraction, formComponent: SecretFormComponent } = this.state; |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jhadvig, spadgett 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 |
/retest |
Had to rewrite the
SecretLoadingWrapper
component from stateless to stateful .../assign @spadgett
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1678195