Skip to content

Commit

Permalink
#2250 Automatically show properties editor after choosing file from s…
Browse files Browse the repository at this point in the history
…ystem-fixing-final

Signed-off-by: Jerin George <[email protected]>
  • Loading branch information
Jerinjk14 committed Dec 2, 2024
1 parent 91c8dad commit 238bc29
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,17 @@ export default class SidePanelForms extends React.Component {
small={"true"}
buttonLabel="Choose file"
accept={[".json"]}
onChange={this.onCanvasFileSelect}
onChange={(evt) => {
this.onCanvasFileSelect(evt);
// Time out for completing the action
setTimeout(() => {
if (this.isReadyToSubmitCanvasData) {
this.submitCanvas();
}
}, 0);
}}
iconDescription="Delete file"
filenameStatus={this.isReadyToSubmitCanvasData ? "complete" : "uploading"}
/>
{space}
<div className="harness-sidepanel-file-upload-submit">
Expand All @@ -426,8 +435,16 @@ export default class SidePanelForms extends React.Component {
small={"true"}
buttonLabel="Choose file"
accept={[".json"]}
onChange={this.onCanvasPaletteSelect}
onChange={(evt) => {
this.onCanvasPaletteSelect(evt);
setTimeout(() => {
if (this.isReadyToSubmitPaletteData) {
this.submitPalette();
}
}, 0);
}}
iconDescription="Delete file"
filenameStatus={this.isReadyToSubmitPaletteData ? "complete" : "uploading"}
/>
{space}
<div className="harness-sidepanel-file-upload-submit">
Expand Down Expand Up @@ -476,8 +493,16 @@ export default class SidePanelForms extends React.Component {
small={"true"}
buttonLabel="Chose file"
accept={[".json"]}
onChange={this.onCanvasFileSelect2}
onChange={(evt) => {
this.onCanvasFileSelect2(evt);
setTimeout(() => {
if (this.isReadyToSubmitCanvasData2) {
this.submitCanvas2();
}
}, 0);
}}
iconDescription="Delete file"
filenameStatus={this.isReadyToSubmitCanvasData2 ? "complete" : "uploading"}
/>
{space}
<div className="harness-sidepanel-file-upload-submit">
Expand All @@ -499,8 +524,16 @@ export default class SidePanelForms extends React.Component {
small={"true"}
buttonLabel="Chose file"
accept={[".json"]}
onChange={this.onCanvasPaletteSelect2}
onChange={(evt) => {
this.onCanvasPaletteSelect2(evt);
setTimeout(() => {
if (this.isReadyToSubmitPaletteData2) {
this.submitPalette2();
}
}, 0);
}}
iconDescription="Delete file"
filenameStatus={this.isReadyToSubmitPaletteData2 ? "complete" : "uploading"}
/>
{space}
<div className="harness-sidepanel-file-upload-submit">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,16 @@ export default class SidePanelProperties extends React.Component {
small={"true"}
buttonLabel="Choose file"
accept={[".json"]}
onChange={this.onPropertiesSelect}
onChange={(evt) => {
this.onPropertiesSelect(evt);
setTimeout(() => {
if (this.isReadyToSubmitProperties) {
this.submitProperties();
}
}, 0);
}}
iconDescription="Delete file"
filenameStatus={this.isReadyToSubmitProperties ? "complete" : "uploading"}
/>
{space}
</div>);
Expand Down

0 comments on commit 238bc29

Please sign in to comment.