Skip to content

Conversation

@bpasero
Copy link
Member

@bpasero bpasero commented Mar 26, 2025

No description provided.

@bpasero bpasero enabled auto-merge (squash) March 26, 2025 14:29
@bpasero bpasero self-assigned this Mar 26, 2025
@vs-code-engineering vs-code-engineering bot added this to the March 2025 milestone Mar 26, 2025
!this.equalsEditorInputLabel(oldActiveTabLabel, this.activeTabLabel) // active editor label changed
activeEditorChanged || // active editor changed
oldTabLabels.length !== this.tabLabels.length || // number of tabs changed
oldTabLabels.some((label, index) => !this.equalsEditorInputLabel(label, this.tabLabels.at(index))) // editor labels changed
Copy link
Member Author

@bpasero bpasero Mar 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@benibenj unfortunately we have to compare all labels, we actually had a bug where rendering was broken in tabs in this case:

  • first tab is a preview editor
  • second tab is active and non-preview
  • an editor opens as inactive: true where the active editor will remain the same
  • this causes the first preview editor to close and a new preview editor to open after the active one
  • the overall number of tabs is the same though

=> 🐛 we returned without redrawing tabs, causing a UI glitch

this.telemetryService.publicLog2<GettingStartedAutoOpenEvent, GettingStartedAutoOpenClassification>('gettingStarted.didAutoOpenWalkthrough', { id: sectionToOpen });
this.commandService.executeCommand('workbench.action.openWalkthrough', sectionToOpen);
this.commandService.executeCommand('workbench.action.openWalkthrough', sectionToOpen, {
inactive: this.layoutService.hasFocus(Parts.EDITOR_PART) // do not steal the active editor away
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bhavyaus fyi, when an editor has focus, we open the walkthrough as inactive to not take the context away from the user at random.

@bpasero bpasero merged commit 9c2cb9e into main Mar 26, 2025
8 checks passed
@bpasero bpasero deleted the ben/correct-toucan branch March 26, 2025 14:51
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators May 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants