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

Opening the same file with a different view type #102123

Closed
kieferrm opened this issue Jul 10, 2020 · 2 comments
Closed

Opening the same file with a different view type #102123

kieferrm opened this issue Jul 10, 2020 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug custom-editors Custom editor API (webview based editors) debt Code quality issues notebook verified Verification succeeded
Milestone

Comments

@kieferrm
Copy link
Member

kieferrm commented Jul 10, 2020

Issue Type: Bug

  1. Install Rob's markdown notebook extension
  2. open a markdown file with double click from the explorer
  3. Run View: Reopen Editor with... and select the Markdown notebook
    -> A markdown notebook is opened side-by-side with the markdown text editor.
  4. click on the tab for the markdown text editor
    -> Editor is revealed.
  5. click on the tab for the notebook editor
    -> Nothing happens. You can't navigate to the notebook while the text editor is still open. The only way to get back to it is with View: Reopen Editor with...,

The actual issue happens in step 3. I should not end up with two editors.

VS Code version: Code - Insiders 1.47.0-insider (d5e9aa0, 2020-07-08T11:58:31.614Z)
OS version: Darwin x64 18.7.0

Extensions (37)
Extension Author (truncated) Version
vscode-track-build-errors aes 0.0.2
git-branch ale 1.6.0
github-markdown-preview bie 0.0.2
markdown-checkbox bie 0.1.3
markdown-emoji bie 0.0.9
markdown-preview-github-styles bie 0.1.6
markdown-yaml-preamble bie 0.0.4
vscode-svgviewer css 2.0.0
vscode-eslint dba 2.1.6
gitlens eam 10.2.2
tsl-problem-matcher eam 0.2.0
vsc-material-theme Equ 32.8.0
vsc-material-theme-icons equ 1.1.4
graphviz-markdown-preview gee 0.0.8
vscode-pull-request-github-insiders Git 2020.7.12506
mdmath goe 2.5.1
crazy kie 0.0.2
svgpreview kis 0.2.0
rainbow-csv mec 1.7.0
theme-monokai-pro-vscode mon 1.1.17
vscode-docker ms- 1.3.1
python ms- 2020.6.91350
remote-containers ms- 0.128.0
remote-ssh-edit-nightly ms- 2020.7.9540
remote-ssh-nightly ms- 2020.7.9540
remote-wsl ms- 0.44.4
azure-account ms- 0.8.11
azurecli ms- 0.5.0
js-debug-nightly ms- 2020.7.817
vscode-github-issue-notebooks ms- 0.0.33
vscode-js-profile-flame ms- 0.0.6
vscode-markdown-notebook ms- 0.0.10
vsonline ms- 1.0.2471
material-icon-theme PKi 4.2.0
ruby reb 0.27.0
vscode-xml red 0.13.0
vscode-ruby win 0.27.0

(3 theme extensions excluded)

@kieferrm kieferrm added the bug Issue identified by VS Code Team member as probable bug label Jul 10, 2020
@rebornix rebornix added this to the July 2020 milestone Jul 10, 2020
rebornix added a commit that referenced this issue Jul 13, 2020
@rebornix
Copy link
Member

This regressed as the custom editor handler tries to open the notebook editor input as file input, 871b497 fixed this particular bug.

@mjbvz we may want to sit together and figure out how to improve IOpenEditorOverrideHandler#open as currently override handlers needs to be implemented carefully to avoid breaking one of following scenarios (custom here means non-text editor):

  1. Open a new resource in an empty editor group, IOpenEditorOverrideHandler should open it based on view type.
  2. Double click the title, which triggers IOpenEditorOverrideHandler#open
  3. A custom editor is opened and pinned/dirty, users try to reopen the resource in text editor. (IOpenEditorOverrideHandler#open with specific id default)
  4. A text editor is opened and pinned/dirty, users try to reopen the resource in a custom editor
  5. There are two editors open for the same resource, users can switch between them

4 and 5 can be easily broken by a IOpenEditorOverrideHandler which tries to open a resource in text editor.

@rebornix rebornix added custom-editors Custom editor API (webview based editors) debt Code quality issues labels Jul 13, 2020
Charles-Gagnon pushed a commit to Charles-Gagnon/vscode that referenced this issue Jul 14, 2020
@rebornix rebornix modified the milestones: July 2020, August 2020 Aug 3, 2020
@rebornix rebornix modified the milestones: August 2020, On Deck Sep 1, 2020
@lramos15
Copy link
Member

lramos15 commented May 7, 2021

Seems refactored have fixed this. Let me know if you still see it :)

@lramos15 lramos15 closed this as completed May 7, 2021
@lramos15 lramos15 modified the milestones: On Deck, May 2021 May 7, 2021
@connor4312 connor4312 added the verified Verification succeeded label Jun 4, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jun 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug custom-editors Custom editor API (webview based editors) debt Code quality issues notebook verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants