streetcomplete / StreetComplete

Easy to use OpenStreetMap editor for Android
https://streetcomplete.app
GNU General Public License v3.0
3.84k stars 348 forks source link

new shops without icon are not displayed in Shop Overlay #4519

Closed Strubbl closed 1 year ago

Strubbl commented 1 year ago

How to Reproduce add a new show with the shop overlay. Select a shop, which has no icon assigned, e.g. "Feinkostladen" (is the tag for that shop=deli?). Accept this new shop without giving it a name. Now you cannot see it on the map and thus cannot select it anymore in order to add a name.

Expected Behavior I can see the shop on the map and can select it.

Versions affected 48.0-beta1

Workaround I used the undo function to remove the shop and add it correctly again.

mnalis commented 1 year ago

I can confirm that. It seems that shop=deli ("Delicatessen") does note have an icon, so it might be why problems arise there and not with other shops (there might be other shops without icons though - and thus also problematic).

small_Screenshot_20221017_195930_de westnordost streetcomplete mn debug

Helium314 commented 1 year ago

Interestingly there is no name quest for shop=deli, which means that https://github.com/streetcomplete/StreetComplete/blob/67114b83df09959dbea90126a426d69c382aa174/app/src/main/java/de/westnordost/streetcomplete/quests/place_name/AddPlaceName.kt#L143-L144 must return false... even though we just selected this feature by its name.

Edit: Forget it, name quest is hidden by the overlay

westnordost commented 1 year ago

Some icons used in the iD presets are missing from the public repository where the icons come from. The repositories are

https://github.com/streetcomplete/StreetComplete/blob/67114b83df09959dbea90126a426d69c382aa174/buildSrc/src/main/java/DownloadAndConvertPresetIconsTask.kt#L199-L211

In this case, the icon name is fas-jar. It is missing from https://github.com/FortAwesome/Font-Awesome/tree/master/svgs/solid .

Run gradle downloadAndConvertPresetIcons to see which icons cannot be downloaded.

westnordost commented 1 year ago

And if I change it to https://github.com/FortAwesome/Font-Awesome/tree/6.x/svgs/solid (because that is the default branch now), the following icons are not found.

fas-beer not found
fas-tshirt not found
fas-swimmer not found
fas-medkit not found
fas-table-tennis not found
fas-cocktail not found
fas-weight not found
fas-store-alt-slash not found
fas-tools not found
fas-phone-alt not found
fas-archive not found
fas-space-shuttle not found
fas-running not found
fas-balance-scale not found
fas-snowboarding not found
fas-apple-alt not found
fas-people-carry not found
fas-vote-yea not found
fas-hiking not found
fas-hospital-alt not found
fas-tram not found
fas-tint not found
fas-map-signs not found
fas-cut not found
fas-skiing not found
fas-shopping-basket not found
fas-ambulance not found
fas-concierge-bell not found
fas-thermometer-three-quarters not found
fas-truck-loading not found
fas-shopping-cart not found
fas-drafting-compass not found
fas-car-crash not found
fas-skating not found
fas-chevron-circle-up not found
fas-ticket-alt not found
fas-trash-restore not found
fas-procedures not found
fas-burn not found
fas-directions not found
fas-th not found
fas-volume-up not found
fas-tachometer-alt not found
fas-compress-arrows-alt not found
fas-user-alt not found
fas-skiing-nordic not found
fas-mobile-alt not found
fas-house-damage not found
fas-biking not found
fas-mail-bulk not found
fas-swimming-pool not found

So, ... don't know what's up with that...

westnordost commented 1 year ago

I've added a "fallback url" for font awesome, so the downloader first tries the 6.x branch because I suppose these are the most current ones, then falls back to the master branch

matkoniecz commented 1 year ago

I opened https://github.com/openstreetmap/id-tagging-schema/issues/616 and https://github.com/FortAwesome/Font-Awesome/issues/19387

Strubbl commented 1 year ago

Maybe i did not understand the solution yet. In SC, don't we want a fallback or default icon for amenitys/shops, which do not have an icon? This way newly added amenitys/shops would at least get displayed in the shop overlay. My expectation is, that in future there is always a new kind of shop, which has no icon (yet).

westnordost commented 1 year ago

In StreetComplete, it's solved now

tyrasd commented 1 year ago

And if I change it to [v6] the following icons are not found.

Well, fontawesome has a concept of aliases (many were introduced to maintain backwards compatibility when icons were refined over time). It makes it a little bit harder to consume the icons if you can't use the js library they officially provide, unfortunately. I guess an alternative approach to including old major versions in a fallback chain would be to consume the "raw" data (e.g. https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/metadata/icons.json) and parse the aliases manually.

PS: I will pay attention to in the future to include higher requirements of icon library versions in the changelog of the id-tagging-schema.