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

Inconsistent behavior of context menu in Open editors view when it has regular and new (Untitled) files #64735

Closed
IllusionMH opened this issue Dec 10, 2018 · 10 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release file-explorer Explorer widget issues verified Verification succeeded
Milestone

Comments

@IllusionMH
Copy link
Contributor

IllusionMH commented Dec 10, 2018

Issue Type: Bug

VS Code version: Code - Insiders 1.30.0-insider (2419237, 2018-12-07T22:31:41.479Z)
OS version: Windows_NT x64 10.0.17763

When Open editors view has regular and new (not saved, with Untitled-X title) files - incorrect context menu might be rendered depending on order of files you call it for.

Steps to Reproduce:

  1. Open some existing file. Right click on it in Open editor will display regular file context menu (Similar options to menu in Explorer view - contains Open to the Side, Reveal in Explorer etc.)
  2. Ctrl + N to create new file and type somethin in it.
  3. Right-click on Untiteled-1 in Open editors view. New file context menu (Save As..., Compare with selected etc.) will be shown.
  4. Right-click on any previously opened existing file. New file context menu will be shown for existing file.
    See Context menu for noname-55.svg below.

Next steps will allow to get regular context menu for new file (continue after steps above). I use this as workaround for issue reproduced above.

  1. Right-click on any file in File explorer view. regular file context menu is displayed.
  2. Right-click on any Untiteled-X file in Open editors view. Regular file context menu is displayed. However actions like Open to the side and Open in Terminal doesn't do anything, while Select for compare, Compare with selected - works properly for unsaved files.
    See Context menu for Untiteled-3 below.
System Info
Item Value
CPUs Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz (8 x 3408)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 31.88GB (17.43GB free)
Process Argv
Screen Reader no
VM 0%

Extensions: none

Context menu for Untiteled-3 file

image

Context menu for noname-55.svg

image

@vscodebot vscodebot bot added the insiders label Dec 10, 2018
@vscodebot
Copy link

vscodebot bot commented Dec 10, 2018

@bpasero bpasero assigned isidorn and unassigned bpasero Dec 11, 2018
@isidorn isidorn added bug Issue identified by VS Code Team member as probable bug file-explorer Explorer widget issues labels Dec 11, 2018
@joaomoreno joaomoreno added this to the November 2018 milestone Dec 11, 2018
@isidorn isidorn added the candidate Issue identified as probable candidate for fixing in the next release label Dec 11, 2018
@isidorn
Copy link
Contributor

isidorn commented Dec 11, 2018

@IllusionMH thanks a lot for filling this issue and for using vscode insiders.

joaomoreno added a commit that referenced this issue Dec 11, 2018
@isidorn
Copy link
Contributor

isidorn commented Dec 11, 2018

@bpasero can you please verify this with the latest vscode insiders.
Open editors view, make sure the context menu has the appropriate content for:

  • regular editors
  • untitlated editors
  • editor groups
    Also verify that context menu focused the list element it was invoked upon.

@bpasero
Copy link
Member

bpasero commented Dec 11, 2018

@isidorn there is still something fishy:

  • close all editors
  • open untitled file
  • open normal file
  • right click normal file: OK
  • ESC
  • right click untitled file: OK
  • ESC
  • right click normal file: you see the context menu of the untitled file still

Is that expected?

@isidorn
Copy link
Contributor

isidorn commented Dec 11, 2018

Yeah, it is like that also in stable. Not ideal but that is just life.

@bpasero
Copy link
Member

bpasero commented Dec 11, 2018

@isidorn there is now a difference of the context menu between insiders and stable: In stable I get a lot of entries (like "Compare with") and in insiders (3dcdcc3fe0ed44d8c58be03df3c35e1edcb454e9) I only get 4 entries. Is that expected? E.g. I cannot compare 2 untitled files anymore?

@IllusionMH
Copy link
Contributor Author

I hope that is not intended. I'm comparing 2 untitled files on daily basis (that's how I found this issue).

@bpasero
Copy link
Member

bpasero commented Dec 11, 2018

Reopening based on testing, I think we regressed compared to stable (I tested on Linux).

@isidorn
Copy link
Contributor

isidorn commented Dec 11, 2018

I have created a PR which should fix this fully #64808
However that PR is a bit risky imho, since it potentially touches the global ResourceContextkey. Though I create it scoped so we should be fine.

IMHO we should take the half baked fix which is already on the release branch and take the pull request for recovery only if more users complain. My suspicion is that nobody will notice it and we can wait unitl next release to ship it.
@IllusionMH you are already using insiders so you will be good in a couple of days

Due to that, and since this is assigned to november I am closing this issue.
And if more issues come, we can assign those to november recovery.

@isidorn isidorn closed this as completed Dec 11, 2018
@IllusionMH
Copy link
Contributor Author

Thank you!

@rebornix rebornix added the verified Verification succeeded label Dec 11, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 25, 2019
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 candidate Issue identified as probable candidate for fixing in the next release file-explorer Explorer widget issues verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants