Reordering subscription items

An RSS/Atom newsreader with features comparable to commercial newsreaders.

Reordering subscription items

Postby dkocher » Sat Apr 15, 2006 10:29 am

The FolersTree.m (moveFolders) has a bug that it doesn't allow to reorder feed items. E.g inside a group folder one cannot rearange items and nested group folders cannot be moved up in the hierarchy. It looks to me as the new parent ID isn't set correctly.
dkocher
Cyberduck Team
 
Posts: 763
Joined: Thu Feb 03, 2005 8:41 am
Location: Switzerland

Postby jeff_johnson_dev » Sat Apr 15, 2006 1:42 pm

Yeah, this is a problem. Actually, you can successfully move a group folder in the hierarchy if you drop the folder at the very end of the level where you want it (i.e., after the last folder alphabetically in that level).

I'll take a look and see whether it's an easy fix or not. Pretty soon it might be superseded by new code to enable manual sorting.
jeff_johnson_dev
Cocoaforge Admin
 
Posts: 1371
Joined: Wed Mar 01, 2006 4:12 pm

Postby stevepa » Sun Apr 16, 2006 11:04 am

You cannot reorder feeds within a group. You can move feeds between groups though. The ordering is presently fixed to be alphanumeric and the relative positions of feed folders vs. group folders vs. smart folders is fixed.

I'm not sure what you mean by "nested group folders cannot be moved up the hierarchy". I can successfully move a 3rd level group folder to the 2nd or 1st level. One thing to watch out for is that the drag and drop in an outline view, the horizontal placement makes a difference. The 'o' of the move bar needs to be level with the hierarchy to which the folder is being moved.

However if you can find a bug here then we should fix it.
stevepa
Vienna Team
 
Posts: 469
Joined: Fri Jan 13, 2006 10:13 am

Postby jeff_johnson_dev » Sun Apr 16, 2006 11:32 am

The bug is that if you try to drop an item at the same level in the hierarchy as a group folder, it is actually dropped inside the group folder. I'm almost done with the fix. I'll put it in 2.1. Should I port to 2.0 also?
jeff_johnson_dev
Cocoaforge Admin
 
Posts: 1371
Joined: Wed Mar 01, 2006 4:12 pm

Postby stevepa » Sun Apr 16, 2006 3:44 pm

Yes, if it's a small fix and there's no workaround then we can take it for 2.0.4 too.
stevepa
Vienna Team
 
Posts: 469
Joined: Fri Jan 13, 2006 10:13 am

Postby dkocher » Mon Apr 17, 2006 11:42 am

I see the bug is fixed as of r412 :) Reordering the items then is a feature request for some later version.
dkocher
Cyberduck Team
 
Posts: 763
Joined: Thu Feb 03, 2005 8:41 am
Location: Switzerland

Manually sorting folders

Postby jeff_johnson_dev » Mon Apr 17, 2006 7:37 pm

I've got a good amount of code for manually sorting items in the folders view. However, I'm not very familiar with SQL queries. If someone could write Database code to set and retrieve the child index of a folder, I can take care of the rest. This would require adding an extra field to the database tables, so I don't know how that would affect backward compatibility.
jeff_johnson_dev
Cocoaforge Admin
 
Posts: 1371
Joined: Wed Mar 01, 2006 4:12 pm

Postby stevepa » Mon Apr 17, 2006 9:01 pm

Backward compatibility should be fine. Earlier versions of Vienna will ignore the extra column in the table.

So.. SELECT index from FOLDERS and UPDATE folders SET index=nn is what you want. Look at the other SQL statements to see the syntax.

I'd be interested in seeing this implementation. You want to be very careful not to hit the database any more than necessary. One thought is to use large values for the initial index (100, 200, etc) and when moving nodes, renumber the inserted node with a value between the nodes it has been inserted between. Then you only need to update the moved nodes.

Later you can do the equivalent of a BASIC 'Renumber' command to even out the spread of indexes.
stevepa
Vienna Team
 
Posts: 469
Joined: Fri Jan 13, 2006 10:13 am

Postby jeff_johnson_dev » Sat Apr 22, 2006 11:50 am

What if we added fields in the folders table for the folderId of the previous and next sibling and perhaps also of the first child? That way, when a folder is moved, only its immediately siblings need to be adjusted, and nothing would need to be done later.

In addition, this might speed up operations such as arrayOfFolders: and arrayOfSubFolders: (and consequently any operation that depends on them).
jeff_johnson_dev
Cocoaforge Admin
 
Posts: 1371
Joined: Wed Mar 01, 2006 4:12 pm

Postby ybizeul » Sat May 13, 2006 5:13 pm

I did implement reordering of items in this patch.
I did this by adding a "position" column in folders tables, so each time you move an item, it updates the entry on all siblings. I don't think this is a huge performance issue, but perhaps the "nextSibling" method would be better, I'll think about this.
This patch also adds a build setting COPY_EXTENDED_ATTRIBUTES_DISABLE so that tar operation do not give errors.
http://sandbox.tynsoe.org/temp/Vienna.patch
ybizeul
Harmless
 
Posts: 14
Joined: Sat May 13, 2006 4:54 pm

Postby dkocher » Sat May 13, 2006 5:15 pm

Code: Select all
The requested URL /temp/Vienna.patch was not found on this server.
dkocher
Cyberduck Team
 
Posts: 763
Joined: Thu Feb 03, 2005 8:41 am
Location: Switzerland

Postby ybizeul » Sun May 14, 2006 4:35 am

I'm sorry, please try again :-)
ybizeul
Harmless
 
Posts: 14
Joined: Sat May 13, 2006 4:54 pm


Return to Vienna

Who is online

Users browsing this forum: 394865