-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add new PlotType to Allow for Visualization Creation #1677
Add new PlotType to Allow for Visualization Creation #1677
Conversation
} | ||
|
||
public render(): JSX.Element | null { | ||
const { arguments: _arguments, inputPath, selectedType } = 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.
why the _?
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.
Invalid use of 'arguments'. Class definitions are automatically in strict mode.ts(1210)
was provided as an error when arguments
was used as the variable name.
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.
ah, wondered if it might be something like that
} | ||
|
||
class VisualizationCreator extends Viewer<VisualizationCreatorProps, VisualizationCreatorState> { | ||
private _config = this.props.configs[0]; |
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 is this only the first element? does the prop need to be an array?
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 follows the notation of all the other Viewer components. Should this be changed?
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.
/hold
After continued testing, it appears that creating _config
in this manner results in isBusy
not updatable. This is because _config
is set on component creation rather than when props are set/updated.
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 issue, from the comment above, can be solved in the following manner:
const { configs } = this.props;
const config = configs[0];
const { arguments: _arguments, inputPath, selectedType } = this.state;
if (!config) {
return null;
}
const { isBusy = false, onGenerate } = config;
However, it does not resolve the original issue of passing an array of configs as a prop to the component as mentioned by @rileyjbauer.
}} | ||
> | ||
{/* | ||
Due to the swagger API definition generation, getting the keys within |
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.
Nice comment 👍
…nCreator View [comment](kubeflow#1677 (comment)) for more details
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
} | ||
|
||
public render(): JSX.Element | null { | ||
const { arguments: _arguments, inputPath, selectedType } = 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.
ah, wondered if it might be something like that
/hold cancel |
…ning ApiVisualizationType
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rileyjbauer 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 |
VISUALIZATION_CREATOR
)VisualizationCreator.tsx
)This change is