I would like to introduce the capability for any logged-in user to flag a challenge. The flow would be as follows:
UI Flow
- user clicks a "Flag" icon on the Challenge browse page.
- A modal pops up where the user describes the reasoning for flagging the challenge. Content of the modal below.
- If conditions for the modal are met, user clicks the Flag button
- The modal closes and the flag icon will be filled red to indicate the flag has been committed
Conditions
- The user must have done (changed status on) at least one task of the challenge for the "Flag" button to become clickable.
- The user-supplied explanation for flagging the challenge should be at least 100 characters. This should be configurable as an environment variable (deployment-level)
- When conditions are met and the user submits the flag,
- A Github issue is opened in this repo with as title "Flag on Challenge ". The issue description is "User [OSM username] flagged Challenge [Challenge name, link back to challenge browse page].
- An email is sent to the challenge creator notifying them "Your challenge has been Flagged by [username]. Please see the flag report [here] (link to github issue). Please contribute to the discussion at your earliest convenience. If you ignore this flag, your challenge may be deleted without further notice. Thanks for keeping MapRoulette great!"
- If a challenge is already flagged, it cannot be flagged again.
- Icon could be this one (and its closed variant).
Modal content
- Text: "You are about to flag a Challenge. An issue will be created here and the Challenge creator will be notified by email. Any follow-up discussion should take place there. Flagging a Challenge does not disable it immediately. Please explain in detail what your issue is with this challenge, if possible linking to specific OSM changesets."
- Text Input (minimum 100 characters, max 1000 characters)
- Check box with label: "I have attempted to contact the Challenge creator"
- Button (colored red) "Flag Challenge"
Button should only be clickable if text input is within character limits and the checkbox is selected.
I would like to introduce the capability for any logged-in user to flag a challenge. The flow would be as follows:
UI Flow
Conditions
Modal content
Button should only be clickable if text input is within character limits and the checkbox is selected.