[josm-dev] How to make the filter feature foolproof

Ævar Arnfjörð Bjarmason avarab at gmail.com
Sun Dec 6 18:27:16 GMT 2009


On Sun, Dec 6, 2009 at 17:31, Sebastian Klein <bastikln at googlemail.com> wrote:
> The Filter feature [1] is great, but still not ready for general use. I,
> for one, fool myself every now and then and think I have lost data, when
> it was actually just hidden by the filter.
>
> So how can we improve the situation?
>
> First of all I think that the vast majority of all filter texts will
> consist of _one_ pattern, only. (E.g. "boundary", "FIXME", "user:me") So
> one could sacrifice the possible modes of combining different filters,
> for an easier interface:
>
> Just use normal Layers to represent filters. The advantage would be that
> one usually keeps an eye on the layer list and so you don't forget about
> it so easily. Layer visibility would correspond to Filter
> enabled/disabled. 'Hide' and 'Invert' would be icons on the layer entry
> that can be toggled. The other options (if any) would be accessible
> through the right click menu -> 'edit'.
>
> You would insert a filter from the main menu:
>
> - 'add new Filter'
> - 'add preset Filter' > ...
> - 'add saved Filter' > ...
>
> Then the dialog could look something like this:
>
> Pattern: ______________
>
> o show only the specified elements
> o hide the specified elements
> --------------
> ☐ case sensitive
> ☐ regular expression
> ☐ apply to child elements
>
> When multiple filter layers are present, they would simply combine like
> 'AND' because this is what one would expect. To compensate this, one
> could introduce something similar to the filter in Thunderbird.
> (Multiple conditions can be combined.)
>
> I haven't done any coding, so feel free to object. :)

This mostly sounds good, but more generally it would be nice if we had
a preset system for search queries just like we have one for tags now.
Then users could in the search menu select from some drop-down list of
presets like "edited by me" (to search for user:$myusername), or
"boundaries" and so on.

Then you could just re-use these presets for the filter presets since
the presets are just search-powered views on the OSM data. The
interface in the filter dialog could be exactly as you suggest but the
presets would be shared with the search engine.




More information about the josm-dev mailing list