brackets-archive / bracketsIssues

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

[CLOSED] Project Panel loses selection in this case... #2745

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

Issue by redmunds Tuesday Feb 19, 2013 at 21:36 GMT Originally opened as https://github.com/adobe/brackets/issues/2903


I discovered this while testing pull request https://github.com/adobe/brackets/pull/2786

Recipe 1

  1. Open a sub-folder in a project and single click any file
  2. File is displayed in editor and selected in project tree
  3. Click on the containing sub-folder to close it
  4. File is still displayed in editor and sub-folder is selected
  5. Click sub-folder again

Results Selection returns to file (same state as step 2)

Recipe 2

  1. Open a sub-folder in a project and double click any file
  2. File is displayed in editor and selected in working set
  3. Click on the containing sub-folder to close it
  4. File is still displayed in editor and sub-folder is selected
  5. Click sub-folder again

Results Selection is removed from sub-folder, but nothing gets selected

core-ai-bot commented 3 years ago

Comment by pthiess Wednesday Feb 20, 2013 at 22:03 GMT


@redmunds - there might be additional design to do think about.

core-ai-bot commented 3 years ago

Comment by njx Friday May 10, 2013 at 21:06 GMT


I think the main design issue here is that we don't have a consistent idea of what to do with folder selection in the file tree. Selecting a file makes sense, because it controls what's in the editor. But currently, we don't have any operations on folders, except from the context menu. So it's weird that the folder can show a selected state that doesn't correspond to anything in the editor and doesn't have any operations (outside of the context menu) that can affect it.

That said, in the future we might well want to allow users to (say) multiply-select folders in order to delete or drag them, so we might want to keep the notion of folder selection. But perhaps we should consider not showing a selection highlight if you click on a folder to expand or collapse it--in other words, the apparent selection (whether it's in the file tree or the working set) should not change. And perhaps when you bring up a context menu, we show the folder as selected just while the menu is up, but clear it afterward--though that's potentially weird as well.

Sublime has a bit of a compromise solution: clicking on a folder collapses/expands it without highlighting it, but context-clicking does highlight it, and you can Cmd-click on a folder to select it explicitly. Not super-discoverable, but it makes some sense. (Also, if you bring up a context menu on a folder, it highlights it, and then doesn't clear the highlight when the context menu goes away, which seems inconsistent, but perhaps there's a usability reason for that.)

@larz0 - any thoughts here?

core-ai-bot commented 3 years ago

Comment by larz0 Saturday May 11, 2013 at 04:42 GMT


Currently the selected state has two modes, one for files and one for folders (arrow not present) but it's not obvious. We could give it a some visual treatment if we think it's too subtle or when we're going to introduce multiple-selection in the project panel.

core-ai-bot commented 3 years ago

Comment by gruehle Tuesday May 21, 2013 at 21:27 GMT


Marking "no priority". The current behavior can be a bit confusing, but doesn't lead to any data loss, and simply clicking on any item correctly redraws the selection.

core-ai-bot commented 3 years ago

Comment by dangoor Monday Sep 22, 2014 at 12:02 GMT


I've confirmed that this will be fixed by #8788 (folders are no longer selected at all)

core-ai-bot commented 3 years ago

Comment by dangoor Wednesday Oct 01, 2014 at 20:17 GMT


@redmunds I'll just close this one rather than FBNC because folders are no longer selectable at all in the file tree.