Skip to content

Commit

Permalink
Do Not Expand Sim After Tutorial in Headless Mode (#9644)
Browse files Browse the repository at this point in the history
When a tutorial ends and the user clicks "Done" to go to the main code editor, we were calling into expandSimulator, which will open the sidebar even when we don't have an actual simulator to show. This change prevents that call if we're in headless mode (i.e. no simulator).

I considered putting this check inside expandSimulator so it no-oped there if we're in headless mode, but I think this may still be used to see the file explorer in javascript mode, so I left that untouched for now.
  • Loading branch information
thsparks authored Aug 18, 2023
1 parent cee358a commit dcb00b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webapp/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4658,7 +4658,7 @@ export class ProjectView
return this.loadHeaderAsync(curr);
}).finally(() => {
core.hideLoading("leavingtutorial")
if (this.state.collapseEditorTools) {
if (this.state.collapseEditorTools && !pxt.appTarget.simulator.headless) {
this.expandSimulator();
}
this.postTutorialProgress();
Expand Down

0 comments on commit dcb00b5

Please sign in to comment.