Repository navigation
Conversation
…` config key is set to `true`
| jasmine.attachToDOM(workspaceElement) | ||
| piDir = $(treeView.roots[0].entries).find(".directory:contains(omicron#{path.sep}pi):first")[0] | ||
| expect(piDir).not.toBeNull() | ||
| omicronPath = piDir.getPath().replace "/pi", "" |
There was a problem hiding this comment.
This part doesn't seem Windows-friendly. Can't you do the same logic for piDir and change it something like omicronPath = $(treeView.roots[0].entries).find(".directory:contains(omicron):first")[0].getPath()?
There was a problem hiding this comment.
Since the directories are squashed, the execution of $(treeView.roots[0].entries).find(".directory:contains(omicron):first")[0].getPath() returns <path>/omicron/pi.
Anyway I have to change /pi to #{path.sep}pi to make it Windows-friendly.
Commit is on the way! ;)
|
@50Wliu Is there any action pending from my side to get this merged? |
| expect(piDir.title).toEqual("pi") | ||
| rhoDir = $(treeView.roots[0].entries).find(".directory:contains(omicron) .entries .directory:contains(rho) span")[0] | ||
| expect(rhoDir.title).toEqual("rho") | ||
|
|
There was a problem hiding this comment.
It's not reflected in this comment but the line has been removed (I removed the next one, 2627, so it's not being shown here...)
| jasmine.attachToDOM(workspaceElement) | ||
| piDir = $(treeView.roots[0].entries).find(".directory:contains(omicron#{path.sep}pi):first")[0] | ||
| expect(piDir).not.toBeNull() | ||
| omicronPath = piDir.getPath().replace "#{path.sep}pi", "" |
There was a problem hiding this comment.
I would appreciate a comment here saying why the jQuery method can't be used, something like "omicron is a squashed dir, so searching for omicron would give us omicron/pi instead"
|
@50Wliu Comments addressed, thanks for reviewing 😃 |
|
Looks good, thanks! |
Requirements
Description of the Change
This pull request solves a bug mentioned in #702. When creating a file/directory within a squashed directory it gets un-squashed (since the directory will contain more than one item in it).
Also improves performance of PR #1008 calling
updateRoots()only if necessary (if the squash config key is set totrue). I've decided to introduce this change in the same pull request since it's highly related with the bug-fix.Alternate Designs
Benefits
Solves a bug
Possible Drawbacks
Applicable Issues
#702