Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337752 - navigator sorting wrong after creating folder
Summary: navigator sorting wrong after creating folder
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: Susan McCourt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-21 13:52 EST by Boris Bokowski CLA
Modified: 2011-09-01 11:42 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Bokowski CLA 2011-02-21 13:52:55 EST
(Mac, Chrome)

steps:
 - go into a directory containing a few files and folders, by clicking on a link in the navigator
 - note how folders are listed first, then files
 - use the toolbar item to create a new folder
 - enter name for the folder, click OK
 expected: the new folder shows up in the list of folders at the top (perhaps, navigating into the new folder would be better, but I'm not sure)
 actual: all files and folders (including the new one) are sorted alphabetically as one list, rather than sorting within the folders and then within the files
Comment 1 Susan McCourt CLA 2011-02-23 13:27:26 EST
fixed >20110223.
This was actually a more general problem that could also be observed by expanding a folder for the first time in either the table or tree view.  The first time it would sort everything alphabetically regardless of file/folder (the way the server returns it).  Collapse and expand again and it would be correct.

We were caching and sorting a copy of the children on the parent, but using the original json array from the server in the subsequent UI updating.  On the second expand, we find the (sorted) cache and the problem corrects itself.

Fixed by not making a copy, there was no need to do this.