OSM-Surveyor icon indicating copy to clipboard operation
OSM-Surveyor copied to clipboard

Quest interaction

Open wtimme opened this issue 5 years ago • 3 comments
trafficstars

The app already displays quests on the map. Now it would be great if mappers were able to interact with them.

MVP

  1. The mapper taps on a quest icon
  2. A UIAlertController is presented, asking the question and providing the answers as UIAlertActions.
  3. Upon tapping on of the answers, the mapper is presented with an "Upload" screen
  4. On the "Upload" screen, the mapper is able to select one of their OSM accounts that they want to use for the upload
  5. The screen contains a button labeled "Upload". Upon tapping it, the change is uploaded to OSM

Existing branch

I've already started with the development of this feature. Please checkout the branch feature/Quest-interaction.

wtimme avatar Aug 18 '20 08:08 wtimme

Currently UIViewController+QuestInteractionDelegate has fixed answers of Yes and No, which is fine for some quests.

Would it be better to have the answers in the quest class and have UIViewController+QuestInteractionDelegate programatically display the answer buttons?

pqhf5kd avatar Aug 20 '20 07:08 pqhf5kd

Good point, thanks for the input!

You're correct: At the moment, the answers are rather fixed. The branch is going for an MVP that would allow the answer of simple yes/no questions, which is why it is not as generic as the solution I implemented for OSM Completionist (askMultipleChoiceQuestionWithQuestion:choices:selectionHandler: and askNumericQuestionWithQuestion:key:handler:). If you want to port/copy that over, I'd be happy to review the pull request.

wtimme avatar Aug 20 '20 08:08 wtimme

Unfortunately I'd be in over my head trying to port that over. I'm just poking around apps that I'm interested in to help me learn swift :)

pqhf5kd avatar Aug 20 '20 12:08 pqhf5kd