Sport filter should select elements from semicolon-separated list of sports #11
Closed
opened 5 years ago by Hufkratzer
·
18 comments
Loading…
Reference in new issue
There is no content yet.
Delete Branch '%!s(MISSING)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
If in the category "Sport" you add the filter "Sport" and select one type of sport the filter does not find elements where this type of sport is only one of multiple sports in a semicolon-selpareted list, e.g. if sport=soccer or sport=basketball is selected the filter does not find this pitch with sport=soccer;basketball
BTW: Can you please explain (maybe in Filters.md) how a filter can be added to a new category? E.g. when I edit this tiny test category) I get only the options shown in the attached screenshot but nothing about a filter section. (I think a whie ago in some other category I saw an entry with filter in this menu but it was greyed out.)
Fixed in
8a1960a535
.I guess I haven't integrated the filters in OpenStreetBrowser editor. I will do this soon :-)
I already implemented the filters - hopefully I didn't add any bugs :-) Please tell if you see any problems.
The sport filter works correctly now. Thanks.
But I still don't understand how to add a filter to a new category. Isn't there an entry "filter" missing in the menu "Element hinzufügen" (see screenshot anove)?
Maybe you have to press Reload? I added the filters on Thursday, as I said before:
Oh, yes. Now I have it.
Only types 'text' and 'select' available?
(No 'radio' and 'checkbox'?)
I added
radio
andautocomplete
. Checkbox is more complex, because I have to handle multiple values.Also, the Filters are now available in the preview window.
I am getting a large disturbing grey area now as soon as I enter edit mode (see screenshot). (in Chrome and Opera on Windows).
Type checkbox would be interesting to have, but it is not urgent. There are enough other things to do and I will soon not be at home for a week or so anyway.
Try to Force-Reload (Shift + Reload-Button). If the problem persists, try to open the Developer Tools and see if there are any JavaScript error messages. If there are, please post them.
Seems to persist; error messages see screenshot.
I will from now not be at home until the evening.
Thanks for posting the screenshot, that was very helpful. Bug fixed.
If this happens again, please post a screenshot of the debug output again.
If you check several options in a checkbox input, how should they be combined - OR or AND?
Example: If you have a cuisine filter (e.g. in gastro), should a selection of kebab and pizza list all objects which sell kebab or pizza? or kebab and pizza? Or should there be another selection, which operator to use? Maybe this should be selected when designing the filter?
Usually with OR, I think. The more you check the more you see. I am not sure an AND operator is really needed, but that doesn't mean it is not. I just don't know. At least OR should be the default.
Filters with checkboxes are now available - in the editor and on the main OpenStreetBrowser page. Have fun!
Thanks. I had a short look at it and found two issues:
I took the standard sport category and just changed "select" to "checkbox". Then
The filter works in edit mode (except the scrollbar, see below) but in normal mode it dosn't, see repository hufkratzer/main brahch "filtertest"
in edit mode the vertical scrollbar is missing, see screenshot below.
I will not be able now to continue testing for a while (a week at least), sorry.
Hmm, I got checkboxes in the category (see below). Maybe you have to press Reload to load the up-to-date app?
Yes, I will add it.
No problem, next weekend I will busy with other stuff. And the weekend after I will attend SOTM in Heidelberg :-)
I get checkboxes too but if I check some it has no effect on what is shown on the map.
Strange. Works for me. Could you try again?
Seems to work now. I don't know what was wrong. Thanks.