Sport filter should select elements from semicolon-separated list of sports #11

Closed
opened 5 years ago by Hufkratzer · 18 comments

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.)

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 <a href="https://www.openstreetmap.org/way/714022882">this pitch with sport=soccer;basketball</a> BTW: Can you please explain (maybe in <a href="https://github.com/plepe/OpenStreetBrowser/blob/master/doc/Filters.md">Filters.md</a>) how a filter can be added to a new category? E.g. when I edit <a href="https://www.openstreetbrowser.org/dev/Hufkratzer/main/src/branch/filtertest/test1.json">this tiny test category</a>) 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.)
Owner

Fixed in 8a1960a535.

I guess I haven't integrated the filters in OpenStreetBrowser editor. I will do this soon :-)

Fixed in 8a1960a53573f99e2bcc73cfdd5c452bde863398. I guess I haven't integrated the filters in OpenStreetBrowser editor. I will do this soon :-)
Owner

I already implemented the filters - hopefully I didn't add any bugs :-) Please tell if you see any problems.

I already implemented the filters - hopefully I didn't add any bugs :-) Please tell if you see any problems.
plepe closed this issue 5 years ago
Poster

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)?

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)?
Owner

Maybe you have to press Reload? I added the filters on Thursday, as I said before:

I already implemented the filters - hopefully I didn't add any bugs :-)

Maybe you have to press Reload? I added the filters on Thursday, as I said before: > I already implemented the filters - hopefully I didn't add any bugs :-)
Poster

Oh, yes. Now I have it.

Only types 'text' and 'select' available?
(No 'radio' and 'checkbox'?)

Oh, yes. Now I have it. Only types 'text' and 'select' available? (No 'radio' and 'checkbox'?)
Owner

I added radio and autocomplete. Checkbox is more complex, because I have to handle multiple values.

Also, the Filters are now available in the preview window.

I added `radio` and `autocomplete`. Checkbox is more complex, because I have to handle multiple values. Also, the Filters are now available in the preview window.
plepe reopened this issue 5 years ago
Poster

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.

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.
Owner

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.

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.
Poster

Seems to persist; error messages see screenshot.

I will from now not be at home until the evening.

Seems to persist; error messages see screenshot. I will from now not be at home until the evening.
Owner

Thanks for posting the screenshot, that was very helpful. Bug fixed.

If this happens again, please post a screenshot of the debug output again.

Thanks for posting the screenshot, that was very helpful. Bug fixed. If this happens again, please post a screenshot of the debug output again.
Owner

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?

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?
Poster

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.

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.
Owner

Filters with checkboxes are now available - in the editor and on the main OpenStreetBrowser page. Have fun!

Filters with checkboxes are now available - in the editor and on the main OpenStreetBrowser page. Have fun!
Poster

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

  1. The filter works in edit mode (except the scrollbar, see below) but in normal mode it dosn't, see repository hufkratzer/main brahch "filtertest"

  2. 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.

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 1. The filter works in edit mode (except the scrollbar, see below) but in normal mode it dosn't, see <a href="https://www.openstreetbrowser.org/#map=15/48.2213/16.3971&categories=hufkratzer/main~filtertest/sport%5B%5D&repo=hufkratzer/main~filtertest">repository hufkratzer/main brahch "filtertest"</a> 2. 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.
Owner
  1. Hmm, I got checkboxes in the category (see below). Maybe you have to press Reload to load the up-to-date app?

  2. 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 :-)

1. Hmm, I got checkboxes in the category (see below). Maybe you have to press Reload to load the up-to-date app? 2. 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 :-)
Poster

I get checkboxes too but if I check some it has no effect on what is shown on the map.

I get checkboxes too but if I check some it has no effect on what is shown on the map.
Owner

Strange. Works for me. Could you try again?

Strange. Works for me. Could you try again?
Poster

Seems to work now. I don't know what was wrong. Thanks.

Seems to work now. I don't know what was wrong. Thanks.
plepe closed this issue 4 years ago
plepe referenced this issue from a commit 2 years ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.