Skip to content

Fix multiple tab opening of Simple Browser#197188

Open
robincaloudis wants to merge 1 commit intomicrosoft:mainfrom
robincaloudis:fix-multiple-tab-opening
Open

Fix multiple tab opening of Simple Browser#197188
robincaloudis wants to merge 1 commit intomicrosoft:mainfrom
robincaloudis:fix-multiple-tab-opening

Conversation

@robincaloudis
Copy link
Copy Markdown
Contributor

@robincaloudis robincaloudis commented Nov 1, 2023

Why

In #182795 it was shown that a new Simple Browser
tab was created whenever the vscode window has
been reloaded with an active view not being a Simple
Browser tab. This led to strange user experience and
weird editor behaviour.

What

Make sure no new instance of the Simple Browser will
be created if there exist already one in the active tab
group.

Fixes #182795

In microsoft#182795
it was shown that a new Simple Browser tab was created
whenever the vscode window has been reloaded with an
active view not being a Simple Browser tab. This led
to strange user experience and weird editor behaviour.

Make sure no new instance of the Simple Browser will
be created if there exist already one in the active
tab group.

Fixes microsoft#182795
@robincaloudis
Copy link
Copy Markdown
Contributor Author

Hello @mjbvz, I'd appreciate a review. Thank you.

@robincaloudis
Copy link
Copy Markdown
Contributor Author

Could some of the other maintainers please have a look? Thank you.

@Tyriar @lszomoru @meganrogge

@robincaloudis
Copy link
Copy Markdown
Contributor Author

@Tyriar @lszomoru @meganrogge Any update?

@mjbvz
Copy link
Copy Markdown
Collaborator

mjbvz commented Nov 15, 2023

@robincaloudis Stop pinging random people. I'll review this when I have a chance but the issue it fixes is low priority

@mjbvz mjbvz added this to the November 2023 milestone Nov 15, 2023
@robincaloudis
Copy link
Copy Markdown
Contributor Author

robincaloudis commented Nov 15, 2023

Now I do understand the reason for the absence of a review. Thanks for your answer and explanation.

@mjbvz mjbvz modified the milestones: November 2023, December 2023 Nov 29, 2023
@mjbvz mjbvz modified the milestones: December / January 2024, February 2024 Jan 23, 2024
@mjbvz mjbvz modified the milestones: February 2024, March 2024 Feb 21, 2024
Copy link
Copy Markdown
Contributor

@0xfffffff0075e2040 0xfffffff0075e2040 left a comment

Choose a reason for hiding this comment

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

👍

@mjbvz mjbvz modified the milestones: March 2024, April 2024 Mar 26, 2024
@robincaloudis
Copy link
Copy Markdown
Contributor Author

@mjbvz, any update? Thanks in advance!

@mjbvz mjbvz modified the milestones: April 2024, May 2024 Apr 24, 2024
@mjbvz mjbvz modified the milestones: May 2024, June 2024 May 30, 2024
Copy link
Copy Markdown
Contributor

@y0sh1ne y0sh1ne left a comment

Choose a reason for hiding this comment

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

This PR is much more like a hotfix which solve the multi-open problem, but it seems will cause another problem: Nothing will be shown when the command be called with another unfocused (also unrestored) 'Simple Browser' tab exist. Because you just return in this condition.

What's more:

  1. vscode.window.tabGroups.activeTabGroup.tabs is instanceof Tab instead of TabGroup. And I will use tab to represent the item of tabs below.

  2. You use the tab.label === SimpleBrowserView.title to implement the function of existInTabGroup, but in fact, I can easily create a file called 'Simple Browser' and open it as a tab with label=='Simple Browser'. The below video has shown this point. I suggest to use the tab.input.viewType.

2024-06-20.175102.mp4

At last, I have a solution at #182795 (comment)
and #182795 (comment) .

But I have some trouble on implementation.

@mjbvz mjbvz modified the milestones: June 2024, July 2024 Jun 27, 2024
@mjbvz mjbvz modified the milestones: July 2024, August 2024 Jul 24, 2024
@mjbvz mjbvz modified the milestones: August 2024, September 2024 Aug 28, 2024
@mjbvz mjbvz modified the milestones: September 2024, On Deck Sep 26, 2024
@vivodi
Copy link
Copy Markdown

vivodi commented Dec 29, 2024

Is this still relevant?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simple browser will be opened multiple times with race

5 participants