This PR makes the handleRun callback (defined in RunPanel.tsx and used as a parameter to the CompiledRunPanel component) nullable. The callback will be undefined if the data.json does not parse successfully.
In turn, in the CompiledRunPanel component, the Run Sampling button will be disabled if the handleRun parameter is undefined. This prevents a downstream error in model execution caused by the failed parse.
I've added a tooltip to the "Run sampling" button that explains to the user why it is disabled in the data-did-not-parse case, and describes the function in the success case. (I also covered the cases where the model is loading or sampling is already in progress.
Fix #226.
This PR makes the
handleRun
callback (defined inRunPanel.tsx
and used as a parameter to theCompiledRunPanel
component) nullable. The callback will beundefined
if thedata.json
does not parse successfully.In turn, in the
CompiledRunPanel
component, theRun Sampling
button will be disabled if thehandleRun
parameter isundefined
. This prevents a downstream error in model execution caused by the failed parse.I've added a tooltip to the "Run sampling" button that explains to the user why it is disabled in the data-did-not-parse case, and describes the function in the success case. (I also covered the cases where the model is loading or sampling is already in progress.