brackets-archive / bracketsIssues

Archive of issues in brackets.
0 stars 0 forks source link

[CLOSED] FOR REVIEW: Work around as part of investigating bugs #99 and #149 #223

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

Issue by joelrbrandt Thursday Feb 09, 2012 at 01:46 GMT Originally opened as https://github.com/adobe/brackets/pull/225


This patch adds a work-around for displaying empty folders in the project tree.

Whenever there is an empty folder, it creates a new child node of that folder in the UI that says "Empty Folder". This element is set to return false for both isFile and isDirectory.

Other than the fact that we don't want this item in the tree, it appears to fix bugs #99 and #149. When this is present, expanding the empty folder works without error and new files can be created in the empty folder.


joelrbrandt included the following code: https://github.com/adobe/brackets/pull/225/commits

core-ai-bot commented 3 years ago

Comment by gruehle Friday Feb 10, 2012 at 01:59 GMT


Bug #99 is definitely intermittent. Selecting and empty folder and doing File > New works most of the time for me, although I have seen a spew of "Untitled.js" files populate the folder.

Bug #149 keeps changing. In the current build (for me at least) clicking the disclosure arrow for an empty folder doesn't do anything, and then makes it so you can't select the node.

I thought these may have to do with asynchronous callbacks. I added a debug flag to make all our file i/o calls wait 10ms before calling back, but that didn't have any effect on the functionality.

Your hack does make things work consistently and predictably, but does leave the "Empty Folder" entry in the UI, even if you create a new folder. We should do some more digging into the jsTree code to see if there is a better solution.

core-ai-bot commented 3 years ago

Comment by joelrbrandt Friday Feb 10, 2012 at 03:42 GMT


@gruehle I'm happy to dig into the jstree code and try to get this really fixed. But, I wonder if that's the best use of time. I'm unsure of whether we'll be using jstree once we get a UI design from XD. Building our own file tree isn't that big of a process, and may be easier than trying to shoehorn jstree into whatever design we end up with (and have more thirdparty code in our product as a result).

If we think we're likely to replace jstree soon, then I'd propose a.) merging this fix, b.) closing bugs #99 and #149, and c.) filing a low-priority bug tho get rid of the "empty folder" and/or make sure it doesn't appear in the new file tree.

If we think we're likely sticking with jstree, then I'll try to fix this in the next sprint.

core-ai-bot commented 3 years ago

Comment by jasonsanjose Tuesday Feb 14, 2012 at 21:44 GMT


I'm working on another possible solution that doesn't require changing jstree. Should have a pull request ready later today.

core-ai-bot commented 3 years ago

Comment by joelrbrandt Wednesday Feb 15, 2012 at 17:29 GMT


Closing this request in favor of #262 (this request was just to point out where the problem was)