Skip to content

Commit da2e30e

Browse files
authored
collapse error pane by default (#11199)
1 parent aca481d commit da2e30e

4 files changed

Lines changed: 7 additions & 6 deletions

File tree

localtypings/pxteditor.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ declare namespace pxt.editor {
820820
simSerialActive?: boolean;
821821
deviceSerialActive?: boolean;
822822
errorListState?: ErrorListState;
823-
errorListCollapsedByUser?: boolean;
823+
errorListCollapsed?: boolean;
824824
screenshoting?: boolean;
825825
extensionsVisible?: boolean;
826826
isMultiplayerGame?: boolean; // Arcade: Does the current project contain multiplayer blocks?

webapp/src/app.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ export class ProjectView
205205
isMultiplayerGame: false,
206206
activeTourConfig: undefined,
207207
mute: pxt.editor.MuteState.Unmuted,
208-
feedback: {showing: false, kind: "generic"} // state that tracks if the feedback modal is showing and what kind
208+
feedback: {showing: false, kind: "generic"}, // state that tracks if the feedback modal is showing and what kind
209+
errorListCollapsed: true // error pane is collapsed by default
209210
};
210211
if (!this.settings.editorFontSize) this.settings.editorFontSize = /mobile/i.test(navigator.userAgent) ? 15 : 19;
211212
if (!this.settings.fileHistory) this.settings.fileHistory = [];

webapp/src/blocks.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,7 @@ export class Editor extends toolboxeditor.ToolboxEditor {
11051105
<ErrorList
11061106
errors={this.errors}
11071107
onSizeChange={this.onErrorListResize}
1108-
collapsedByUser={this.parent.state.errorListCollapsedByUser}
1108+
collapsedByUser={this.parent.state.errorListCollapsed}
11091109
onUserCollapse={this.setErrorListCollapsePreference}
11101110
getErrorHelp={this.getErrorHelp}
11111111
showLoginDialog={this.parent.showLoginDialog}
@@ -1122,7 +1122,7 @@ export class Editor extends toolboxeditor.ToolboxEditor {
11221122

11231123
protected setErrorListCollapsePreference = (collapsed: boolean) => {
11241124
this.parent.setState({
1125-
errorListCollapsedByUser: collapsed
1125+
errorListCollapsed: collapsed
11261126
});
11271127
}
11281128

webapp/src/monaco.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ export class Editor extends toolboxeditor.ToolboxEditor {
664664
{showErrorList && (
665665
<ErrorList
666666
onSizeChange={this.setErrorListState}
667-
collapsedByUser={this.parent.state.errorListCollapsedByUser}
667+
collapsedByUser={this.parent.state.errorListCollapsed}
668668
onUserCollapse={this.setErrorListCollapsePreference}
669669
errors={this.errors}
670670
startDebugger={this.startDebugger}
@@ -963,7 +963,7 @@ export class Editor extends toolboxeditor.ToolboxEditor {
963963

964964
protected setErrorListCollapsePreference = (collapsed: boolean) => {
965965
this.parent.setState({
966-
errorListCollapsedByUser: collapsed
966+
errorListCollapsed: collapsed
967967
});
968968
}
969969

0 commit comments

Comments
 (0)