Custom Advanced Search Filters

For a while now I’ve been wishing that the Advanced Search > Filter dropdown had an “Add this search” option the same as the tiddler editor snippet button has an “Add your own” at the bottom of its list.

I finally got around to doing something about it tonight and came up with the following set of tiddlers:

AddSearchFilter.json (1.9 KB)

To try it out, save it, then drag-and-drop onto www.tiddlywiki.com - it replaces the core dropdown tiddler and you can use the diff view to see the changes I made.

Note that you have to type something into the filter to see the new option at the bottom of the dropdown list.

Would this be a good thing to add to TiddlyWiki?

PS, I have seen Eric Shulman’s SaveFilter, but I had in mind something exactly like the snippet button.

Both solutions create custom filter tiddlers tagged with $:/tags/Filter and containing description and filter fields.

Some differences:

  • My solution adds a separate “save” button in $:/AdvancedSearch > Filter, while your solution adds an “add this search” item to the bottom of the “saved filters” dropdown list.
  • My solution provides a popup to enter a Name, Filter, and Description, your solution opens a “New Tiddler” editor.
  • My solution automatically applies a prefix of $:/config/TiddlyTools/Filters to avoid cluttering up the visible tiddlers list. Your solution uses TWCore default tiddler naming (“New Tiddler”, “New Tiddler 1”, etc.)

-e