Repository: streetcomplete/StreetComplete (language: kotlin)

Issue:
"Actually, there is a sidewalk, but it is displayed separately on the map." - applied answer may be wrong, sidewalk may be only on one side
`quest_accessible_for_pedestrians_separate_sidewalk` has

> Actually, there is a sidewalk, but it is displayed separately on the map.

wording.

If selected https://github.com/streetcomplete/StreetComplete/blob/9f6475f25b70e264e35f803c8cb19dba0b81fb1d/app/src/main/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestrians.kt#L63 will apply `sidewalk:both=separate`

But sidewalk may be actually only on one side. Maybe adding `sidewalk=separate` would be better? Or just remove existing `sidewalk*` tags?


Discussion hints:
`sidewalk=separate` is invalid tagging, as far as I know.

But yeah, the `sidewalk` tag could just be removed. The wording of the other answer would then also need to be changed to "Actually, there is a sidewalk". However, note that the sidewalk quest is disabled by default.
> sidewalk=separate is invalid tagging, as far as I know.

AFAIK it is fine, and while `:left` `:right` `:both` may be preferred for extra detail (`sidewalk=separate` means that sidewalk is at one side, or both), this is also accepted and in use and understood

see https://taginfo.openstreetmap.org/tags/sidewalk=separate#overview
Right, then I remember it wrong. Care to make the change yourself?
Actually, I like my proposal better. It also reduces unnecessary text length and gives the user the opportunity to specify it more precisely afterwards. (StreetComplete interprets `sidewalk=separate` as `sidewalk:both=separate`, and so do all other data consumers)

Pull request: prohibited for pedestrians: clear sidewalk tags when user answers that there is a sidewalk
…t there is a sidewalk (fixes #5952)

Test command: ./gradlew :app:testDebugUnitTest --tests "de.westnordost.streetcomplete.quests.foot.AddProhibitedForPedestriansTest"

Fix patch:
diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestrians.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestrians.kt
index 67799039e50..dae80bb78ff 100644
--- a/app/src/main/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestrians.kt
+++ b/app/src/main/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestrians.kt
@@ -8,7 +8,7 @@ import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement.
 import de.westnordost.streetcomplete.osm.ROADS_ASSUMED_TO_BE_PAVED
 import de.westnordost.streetcomplete.osm.Tags
 import de.westnordost.streetcomplete.osm.surface.PAVED_SURFACES
-import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.HAS_SEPARATE_SIDEWALK
+import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.ACTUALLY_HAS_SIDEWALK
 import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.NO
 import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.YES
 
@@ -59,9 +59,9 @@ class AddProhibitedForPedestrians : OsmFilterQuestType<ProhibitedForPedestriansA
             // the question is whether it is prohibited, so YES -> foot=no etc
             YES -> tags["foot"] = "no"
             NO -> tags["foot"] = "yes"
-            HAS_SEPARATE_SIDEWALK -> {
-                tags["sidewalk:both"] = "separate"
-                // wrong tagging may exist, it should be removed to prevent quest from reappearing
+            // but we did not specify on which side. So, clear it, sidewalk is added separately
+            ACTUALLY_HAS_SIDEWALK -> {
+                tags.remove("sidewalk:both")
                 tags.remove("sidewalk")
                 tags.remove("sidewalk:left")
                 tags.remove("sidewalk:right")
diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestriansForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestriansForm.kt
index 674ab40e280..a29759ef739 100644
--- a/app/src/main/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestriansForm.kt
+++ b/app/src/main/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestriansForm.kt
@@ -3,7 +3,7 @@ package de.westnordost.streetcomplete.quests.foot
 import de.westnordost.streetcomplete.R
 import de.westnordost.streetcomplete.quests.AListQuestForm
 import de.westnordost.streetcomplete.quests.TextItem
-import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.HAS_SEPARATE_SIDEWALK
+import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.ACTUALLY_HAS_SIDEWALK
 import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.NO
 import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.YES
 
@@ -12,6 +12,6 @@ class AddProhibitedForPedestriansForm : AListQuestForm<ProhibitedForPedestriansA
     override val items = listOf(
         TextItem(YES, R.string.quest_accessible_for_pedestrians_prohibited),
         TextItem(NO, R.string.quest_accessible_for_pedestrians_allowed),
-        TextItem(HAS_SEPARATE_SIDEWALK, R.string.quest_accessible_for_pedestrians_separate_sidewalk),
+        TextItem(ACTUALLY_HAS_SIDEWALK, R.string.quest_accessible_for_pedestrians_sidewalk),
     )
 }
diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/foot/ProhibitedForPedestriansAnswer.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/foot/ProhibitedForPedestriansAnswer.kt
index c632d131b64..469fc27299e 100644
--- a/app/src/main/java/de/westnordost/streetcomplete/quests/foot/ProhibitedForPedestriansAnswer.kt
+++ b/app/src/main/java/de/westnordost/streetcomplete/quests/foot/ProhibitedForPedestriansAnswer.kt
@@ -3,5 +3,5 @@ package de.westnordost.streetcomplete.quests.foot
 enum class ProhibitedForPedestriansAnswer {
     YES,
     NO,
-    HAS_SEPARATE_SIDEWALK
+    ACTUALLY_HAS_SIDEWALK
 }
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 58b9d2d851a..dcd837d8b22 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -666,7 +666,7 @@ Before uploading your changes, the app checks with a &lt;a href=\"https://www.we
     <string name="quest_accessible_for_pedestrians_title_prohibited">Are pedestrians forbidden to walk on this road without sidewalk here?</string>
     <string name="quest_accessible_for_pedestrians_prohibited">It is forbidden.</string>
     <string name="quest_accessible_for_pedestrians_allowed">It is allowed.</string>
-    <string name="quest_accessible_for_pedestrians_separate_sidewalk">Actually, there is a sidewalk, but it is displayed separately on the map.</string>
+    <string name="quest_accessible_for_pedestrians_sidewalk">Actually, there is a sidewalk.</string>
 
     <string name="quest_address_title">"What’s the house number of this building?"</string>
     <string name="quest_address_house_number_label">House number:</string>


Test patch:
diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestriansTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestriansTest.kt
index 4766d2bafeb..60f357b2f41 100644
--- a/app/src/test/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestriansTest.kt
+++ b/app/src/test/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestriansTest.kt
@@ -27,22 +27,15 @@ class AddProhibitedForPedestriansTest {
         )
     }
 
-    @Test fun `apply separate sidewalk answer`() {
-        assertEquals(
-            setOf(StringMapEntryAdd("sidewalk:both", "separate")),
-            questType.answerApplied(HAS_SEPARATE_SIDEWALK)
-        )
-    }
-
-    @Test fun `remove wrong sidewalk tagging`() {
+    @Test fun `apply actually sidewalk answer clears all sidewalk tagging`() {
         assertEquals(
             setOf(
-                StringMapEntryModify("sidewalk:both", "yes", "separate"),
+                StringMapEntryDelete("sidewalk:both", "yes"),
                 StringMapEntryDelete("sidewalk:left", "yes"),
                 StringMapEntryDelete("sidewalk:right", "yes"),
                 StringMapEntryDelete("sidewalk", "both"),
             ),
-            questType.answerAppliedTo(HAS_SEPARATE_SIDEWALK, mapOf(
+            questType.answerAppliedTo(ACTUALLY_HAS_SIDEWALK, mapOf(
                 "sidewalk" to "both",
                 "sidewalk:left" to "yes",
                 "sidewalk:right" to "yes",