-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Conversation
@jason-sanjose I'll have time to look this over this afternoon. If someone wants to take a look sooner, no worries. |
Addressed 1 TODO regarding trailing '/' in DirectoryEntry.fullPath
if (fullPath) { | ||
var lastChar = fullPath.length - 1; | ||
if (isDirectory && fullPath.charAt(lastChar) === "/") { | ||
fullPath = fullPath.substr(0, lastChar); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to work on the mac if fullPath is "/" (which you get by opening the main system hard drive "directory"). It will change fullPath to the empty string, which (eventually) causes brackets to hard crash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also this causes problems several lines below (in the same function) where we check a potentially empty string with "if (fullPath)". Empty strings are "falsy", so this may not be doing what we want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding check for root dir.
@jason-sanjose I looked this over. For the most part, it looks great. However, there are a few bugs, as noted in the individual line comments. Technically, these bugs aren't a part of issue #149. But, it seems that they are introduced as a result of these changes. Also note that I did the testing after merging in master to this branch. |
When concatenating paths in readEntrires and computing depth when saving jstree state.
Ready to go again. I had to account for trailing slashes in a few more spots. |
Use a placeholder item when the project root is empty. Use Entry.name for project title instead of looking for trailing slash.
Also fixed the stuck "loading..." message for an empty project. |
Looks great, merging! |
[Kuler] CSS height cleanup
@joelrbrandt
Use an empty child list instead of placeholder child data when the directory is empty. Since jstree treats empty directories as leaves, manually manage styles when necessary.