Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

🐛 Disallow moving root directories #601

Merged
merged 3 commits into from
Nov 10, 2015
Merged

🐛 Disallow moving root directories #601

merged 3 commits into from
Nov 10, 2015

Conversation

Tyriar
Copy link
Contributor

@Tyriar Tyriar commented Oct 16, 2015

Moving a root directory can cause the tree view to become invalid as the
project remains but does not correctly map to a directory on the file system.
It also provides a bad UX as it's very easy to accidentally move a project
directory.

Fixes #590

Moving a root directory can cause the tree view to become invalid as the
project remains but does not correctly map to a directory on the file system.
It also provides a bad UX as it's very easy to accidentally move a project
directory.

Fixes #590
@Zireael07
Copy link

Thanks!

@@ -75,6 +75,9 @@ describe "TreeView", ->
it "selects the root folder", ->
expect(treeView.selectedEntry()).toEqual(treeView.roots[0])

it "makes the root folder non-draggable", ->
expect(treeView.roots[0].hasAttribute('draggable')).toBe(true)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not too familiar with these tests, but shouldn't draggable be false here?

@Tyriar
Copy link
Contributor Author

Tyriar commented Oct 16, 2015

@50Wliu good point, the test wasn't correct - I changed it to only set the draggable attribute if it's true.

kevinsawicki added a commit that referenced this pull request Nov 10, 2015
🐛 Disallow moving root directories
@kevinsawicki kevinsawicki merged commit 697fbda into atom:master Nov 10, 2015
@kevinsawicki
Copy link
Contributor

Thanks for this 🚢

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants