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

When dragging sidebar views to rearrange, individual items in the Open Editors view are highlighted #52344

Closed
iansan5653 opened this issue Jun 19, 2018 · 5 comments · Fixed by #52623
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug file-explorer Explorer widget issues verified Verification succeeded
Milestone

Comments

@iansan5653
Copy link
Contributor

iansan5653 commented Jun 19, 2018

  • VSCode Version: 1.25.0-insider
  • OS Version: Windows 10 Home - 1803

Steps to Reproduce:

  1. Select the Explorer sidebar tab
  2. Drag the Outline or File Hierarchy views as if to rearrange them
  3. Move the cursor over an item in the Open Editors view
  4. The individual editors will change color along with the entire view, making it seem as if you can drop a sidebar view into an open editor and something will happen. What should actually happen is that the view should highlight (since its location will be replaced; it does do this), but the individual items should not be affected.

Screenshot:
image
I am holding the File Hierarchy view over the index.js file in that screenshot.

Does this issue occur when all extensions are disabled?: Yes

@chrmarti chrmarti added the file-explorer Explorer widget issues label Jun 20, 2018
@isidorn
Copy link
Contributor

isidorn commented Jun 20, 2018

I acknowledge the issue, the problem is that the OpenEditor view is not differentiating between drag events
https://github.com/Microsoft/vscode/blob/0a35cbfcf422054090971f78cf3a357cb42c3bae/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts#L629

PR to fix this is welcome

@isidorn isidorn added this to the Backlog milestone Jun 20, 2018
@isidorn isidorn added the bug Issue identified by VS Code Team member as probable bug label Jun 20, 2018
@iansan5653
Copy link
Contributor Author

iansan5653 commented Jun 20, 2018

I was able to add a check to prevent the hover styling unless the item being dragged is another open editor in the list (see iansan5653@5add9ce), however this also means that when tabs are dragged over the Open Editors panel (ie, when there's multiple groups; you can drag a tab into a group and it will duplicate into that group), it doesn't have any styling anymore. I couldn't figure out a way to check if the dragged object is a tab. Is that feasible? Where would I look?

@isidorn
Copy link
Contributor

isidorn commented Jun 21, 2018

@iansan5653 yeah it is not so simple
You would need to check the dragged data. If there is an elegent solution to fix this please provide a PR. If too complex or computation intensive I would prefer to leave the issue open for now. Thanks

@iansan5653
Copy link
Contributor Author

@isidorn So just to make sure, the only things that should trigger the focused class on open editors are the open tabs and the other open editors in the list, correct?

@isidorn
Copy link
Contributor

isidorn commented Jun 21, 2018

@iansan5653 no. Dragging resources from the explorer, adn dragging things outside of vscode should also trigger it

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 file-explorer Explorer widget issues verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants