Proposal: Add reactions/votes to changesets

Background

While the discussion on rate limits continues, a post by @kaartjesman got my attention (emphasis mine):

I’ve actually been thinking about ways to improve the OSM API for quite some time now, and though my thoughts hadn’t been able to describe it as clearly as the above quote, that has been one aspect of it.

What?

So, therefore, I propose that we* add support for a rather simple form of one of the most common aspects of social platforms: Likes (and dislikes)

In summary, any user would be able to add a “reaction” (not happy with that term, does anybody have any better suggestions? “Votes” would be an alternative, but I’m not really happy about that either) to a changeset. Initially, the available reactions would be just “good” and “bad”, though they could in the future be extended such as with a larger spectrum (“awesome”, “awful”) and “neutral” (for “I’ve reviewed this but don’t have anything to say”), though I think unless someone really feels like they should be included from the start it’s better to focus on just “good” and “bad” for now.

Apart from wanting them to be usable semantically (for rate limiting etc., see below), I’m also not too huge a fan of “emojis everywhere!!! :smiley: :stuck_out_tongue: :wink: :heart:”, so I’m explicitly not proposing reactions to be arbitrary emojis (like some platforms allow) or even a subset of emojis (such as here on the forum).

EDIT: Instead of “reaction” I’m now considering “review”. Other terms that have been mentioned are “rating”, “vote” and “thank”
EDIT: Based on comments I’d want to start out with three possible reactions: “good”, “can improve” or “bad”. We need to (at least loosely) define the meaning of these, for example “good” could be anything that overall improves OSM while following established best practice.
EDIT: Based on comments, a review other than “good” should also require a discussion comment
EDIT: Casting a reaction/review should not be possible for new accounts (to prevent sock-puppeting), some requirement (maybe similar to rate limits) should be present. Negative reactions (“bad”) might have stricter requirements that positive reactions, similar to how it is on StackExchange.

* to be clear I don’t intend this as a “we as in someone in our community that isn’t me” but rather the opposite, if the community likes this idea (or some variant thereof) I fully intend to do the development work for it (just have to dust off my Rails knowledge…)

Why?

This would bring several benefits:

  • It can become an input to the calculation of rate limits
    • For example, changesets with a majority of “good” reactions from users who in total have at least N “good” reactions (EDIT: replaced by not allowing reactions for new accounts) would not count against the limit, while a majority of “bad” reactions would count twice against the limit
    • This could be a solution to “the mapathon problem”, as then the experienced mappers who handle the mapathon can, through a review on the spot, effectively increase the rate limit for new mappers
    • This could also be coupled too other “privileges”, such as preventing changes to high-level administrative boundaries unless the user has some number of “good” changes, thus preventing accidental edits by inexperienced users (as well as vandals) while retaining the spirit of the “no one has more privileges than anyone else” idea that OSM is built on (just adding a “…once they have made the same number of well-received edits”)
    • Note: Unless to the extent necessary to discuss this proposal try to refrain from discussing the rate limits in this thread, these points here are just examples
  • Bragging rights and can serve as input to sites calculating badges (can’t find one that’s working right now though I’m pretty sure I’ve seen one at some point), possibly even here on the forum
  • It provides a way to mark a changeset as “reviewed” if it is tagged review_requested=yes
  • It brings the “verify” state of OSMCha into the central database so that other sites can show it as well
    • I’d also like to collaborate with the creator of OSMCha to get their existing data on this into the OSM database if at all possible

How?

  • A new table in the database (changeset_id, user_id (of the user reacting), reaction, timestamp)
  • A new endpoint POST /api/0.6/changeset/#id/react, taking just the reaction (or null to remove a previous reaction by the user)
  • GET /api/0.6/changeset/#id?include_reactions=summary returns a summary of reactions ({ "good": 5, "bad": 2 })
  • GET /api/0.6/changeset/#id?include_reactions=yes returns a full listing of reactions ([{ "date": "...", "uid": "...", "user": "...", "reaction": "good" }, ...])
  • The changeset view on osm.org shows a summary (some icon and a number for each type of reaction) at the top, hovering over an icon shows the list of users that have reacted, clicking an icon reacts (similar to how it works here on the forum):
    image
  • For now I don’t propose adding this information to planet/changeset dumps

Importantly, all of these changes can be made in the current API since they are purely additions in functionality, so they don’t have to wait for some hypothetical future API rework.

By providing an API it becomes possible to integrate this functionality in tools such as OSMCha. It would also be possible to let the existing QA tools react with “bad” when they find some grave issue, though that would need to be separately discussed since that could likely introduce another bag of problems if not done right.

References

Some prior art (sorry if I’ve missed something!):

And now…

What do you think? Is this overall a good idea? Are you onboard but would like to change some details? Can you think of a better term than “reaction” or “vote”, or do you like one of them?

25 posts - 11 participants

Read full topic


Ce sujet de discussion accompagne la publication sur https://community.openstreetmap.org/t/proposal-add-reactions-votes-to-changesets/106730