Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vscode.ViewColumn doesn't work as expected #46161

Closed
Sneezry opened this issue Mar 20, 2018 · 6 comments
Closed

vscode.ViewColumn doesn't work as expected #46161

Sneezry opened this issue Mar 20, 2018 · 6 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@Sneezry
Copy link
Member

Sneezry commented Mar 20, 2018

  • VSCode Version: 1.21.1
  • OS Version: Microsoft Windows [Version 10.0.16299.248]

Steps to Reproduce:

  1. install Visual Studio Code Tools for AI
  2. Ensure no document open
  3. Execute AI: Open Azure ML Sample Explorer twice
  4. Two Azure Machine Learning Sample Explorer will open

snipaste20180320_142354

Does this issue occur when all extensions are disabled?: N/A


This issue is cause by vscode.ViewColumn.Two. When we want to open a document in the second column, the first column should exist, and if there is no column, the document will open in the first column, even if we are clear to open it with vscode.ViewColumn.Two. I believe this is as design, but it doesn't make sense.

What I expect is, when there is not column, the document will also open in the second column, and the first column is hidden, but not replace the second column with the first one.

@vscodebot
Copy link

vscodebot bot commented Mar 20, 2018

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@jrieken
Copy link
Member

jrieken commented Mar 21, 2018

What I expect is, when there is not column, the document will also open in the second column, and the first column is hidden,

Not sure what that means? Do you want an empty first column?

@jrieken jrieken added the info-needed Issue requires more information from poster label Mar 21, 2018
@Sneezry
Copy link
Member Author

Sneezry commented Mar 21, 2018

When I open a document in the second column vscode.ViewColumn.Two, then it should really open in the second column.

If there's no document open, after I open a document in the second column, only one column will show (this is as expected), but the shown column should still be vscode.ViewColumn.Two as it is clear in the code:

111

And when I open a new document in vscode.ViewColumn.One, I expect vscode open two columns:

222


Why I request this change?

The issue we have in fact is unexpected duplicate explorers:

snipaste20180320_142354

Generally, when the user has document open in vscode (text document, or welcome page), the explorer will open in the second column. And even the user run open explorer command multi times, there will be only one explorer.

However, if the user has no document open, and run open explorer command twice, two explorers will open in the first and second column.

@jrieken
Copy link
Member

jrieken commented Mar 21, 2018

When I open a document in the second column vscode.ViewColumn.Two, then it should really open in the second column.

The workbench currently cannot do that as columns are not static but dynamically added while editors are opened.

You should be looking at #45994 which is about improving the webview-api and which will let you know in which column the webview currently shows.

Assigning @bpasero for the static workbench layouts

@jrieken jrieken assigned bpasero and unassigned jrieken Mar 21, 2018
@jrieken jrieken removed the info-needed Issue requires more information from poster label Mar 21, 2018
@bpasero
Copy link
Member

bpasero commented Mar 21, 2018

Allowing arbitrary editor layouts is covered in #2755

@bpasero bpasero closed this as completed Mar 21, 2018
@bpasero bpasero added the *duplicate Issue identified as a duplicate of another issue(s) label Mar 21, 2018
@Sneezry
Copy link
Member Author

Sneezry commented Mar 21, 2018

Emmm, I do not agree this issue is duplicate with #2755. As an extension developer, I cannot ask my users to change their vscode config to make the extension work as expected.

@vscodebot vscodebot bot locked and limited conversation to collaborators May 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

3 participants