Smart Folders

The Dilemna of "Smart" Folders

The smart folders in Firefox 3 are not like other folders that contain bookmarks.  They are in fact javascript bookmarklets that contain a query specification.  Other browsers don't have anything like them, and at this time they are useless outside of Firefox 3.  They are not really bookmarks, except that they have a location within your bookmarks.  Should they be treated as bookmarks, or as some other type of preference which is peculiar to Firefox 3?

There is also a very practical consideration.  Although smart bookmarks cannot be created without knowing javascript and accessing Mozilla developer documentation, they are easily deleted within Firefox 3, and once they are gone the only way to get them back is to restore your bookmarks from a backup.  In the Firefox 3 development discussions there is mention of an open bug to add a "Restore Smart Folders" button to Preferences, but I don't see this yet and it may not happen.

Handling of Smart Folders in the Current Version of Bookdog

So in adding Firefox 3 support to Bookdog, I decided that Bookdog should leave the smart folders alone as much as possible.

Implementing this idea, current versions of Bookdog (5.1.12 or earlier) behave as follows.  When loading bookmarks, Bookdog ignores the smart folders.  When saving bookmarks, while re-reading the database to find changes, it sets the smart folders aside, and then puts them back in the same parent folder where they had been found.  That left one little problem.  What if a smart folder's parent folder had been deleted within Bookdog.  Well, it puts the orphaned smart folders into the Bookmarks Toolbar instead.  I chose the Bookmarks Toolbar since that is a place where the user is likely to notice them and say "oh".

Thus, in Bookdog, you don't even see the smart folders and cannot move, change, copy or delete them.  This works as expected when performing any type of migration with another browser.  In particular, even when performing a unilateral migration from some other browser to Firefox 3, the smart folders are not lost.  

Issues with the current design

The first issue is not seeing the smart folders in Bookdog.  In particular, if a folder contains nothing but smart folders (such as did the default bookmarks that shipped with earlier versions of Minefield/Firefox 3), this folder will appear in Bookdog to be empty.  That is confusing.

Further, now that Bookdog can migrate between Firefox 3 on one Mac account and Firefox 3 on another Mac account, there is another disadvantage to this design.  If a unilateral migration is done, deleting all items in the destination, the user would expect that the smart folders in the the smart folders in the source would be added to the destination, and the smart folders originally in the destination would be erased.  Instead, the smart folders in the source are ignored, and because whatever folder(s) containing them have been erased, the smart folders in the destination are orphaned and therefore placed "loose" in the Bookmarks Toolbar. (And the user says "Oh, this is not what I expected.")  The user is particularly confounded if similarly-placed and named parent folder(s) exist in the source.  For example, assume that the user has one of those "Smart Bookmarks" (sic, should have been Smart Folders) from an earlier version of Firefox 3, in both destination and source.  The user definitely expects that her smart folders should migrate into there, but as far as Bookdog is concerned, this new "Smart Bookmarks" folder is not the old one.  (It has a different primary key in the sqlite database.)

Proposed changes

Here is how I am thinking of handling this in a future update:

• When reading Firefox 3 bookmarks documents, do not ignore smart folders.
• In Main Window, display smart folders with a special icon.
• In Migration window, add a new checkbox under the "DELETE all..." radio button.
   This checkbox will be enabled when performing a unilateral migration and when
   the destination is a Firefox 3 bookmarks document.  It will be:
        "Don't delete smart folders".
   This switch will be on by default unless the source is also Firefox 3, then it will be
   off by default.
• Implement 'Don't delete smart folders' as a property in the AppleScript interface
   for Migration.
• Add this to the user interface in the Migrate Unilaterally automator action.

The good news is that, because this question is only asked when items are to be deleted, it does not need to add further complication to the Translating preferences which are invoked when items are move/copy/dragged between bookmarks documents of different browsers.

Jerry Krinock