Page MenuHomePhabricator

Discuss edit hashtag support with major bot/tool/gadget creators
Open, MediumPublic

Description

List of tools that could support edit hashtags. Hashtags facilitate the generation of tool-specific analytics (please expand the list as needeed):

  • Magnus's Wikidata tools (live as of 2016-01-15)
  • Tool-Pageviews (live as of 2019, but broken)

See also

Event Timeline

DarTar raised the priority of this task from to Needs Triage.
DarTar updated the task description. (Show Details)
DarTar added a project: Research.
DarTar moved this task to Radar on the Research board.
DarTar updated the task description. (Show Details)
DarTar set Security to None.
DarTar added a subscriber: Magnus.
DarTar unsubscribed.

From @Magnus:

Hi Dario, all,

I went through my list of tools that directly edit Wikidata (though I probably forgot a few...) and added hashtag support. My WiDaR "meta-tool" for OAuth-editing of Wikidata also supports this now; just add 'tool_hashtag=the_tag' to (almost) any URL if you use WiDaR, and it shall appear in the right place.

As for the actual tools, I now have:

#wikidata-game (the "original" game)
#distributed-game
#mix'n'match
#mix'n'match-mobile-game (NOT the distributed sub-game!)
#quick-statements
#autolist1
#autolist2
#wdfist
#reasonator
#botsource (edits done by SourcererBot; could be filtered via that user name, but hey, why not?)

Very excited to have hashtag support for your tools, @Magnus. This will help us produce statistics about the volume and quality/type (via ORES cc @Halfak) for all the revisions your tools are producing. Hope other developers will follow suit.

The hashtag tracker on Labs doesn't listen to Wikidata yet but I hear from @Slaporte it will soon (cc @Lydia_Pintscher).

m m m twitterification...
BTW as per principle of least privilege, each tool should have its own OAuth consumer.

@Ricordisamoa Well, if someone want to use all my 11 (forgot Wikidata "creator") tools listed above, he'd have to sign up to 11 different OAuth clients. As these permissions only last as long as a cookie (?), this will have to be repeated every x weeks/months. Using WiDaR as my central Wikidata editing tool, users have to do that only once, instead of eleven times.

m m m twitterification...

I just want to clarify that this has nothing to do with Twitter. People across the planet have a mental model for what a hashtag is and it makes sense to use a character such as # rather than an arbitrary prefix for parsing these tags from the edit summary.

@Ricordisamoa Well, if someone want to use all my 11 (forgot Wikidata "creator") tools listed above, he'd have to sign up to 11 different OAuth clients. As these permissions only last as long as a cookie (?), this will have to be repeated every x weeks/months.

Is that really true? I thought OAuth grants lasted until revoked. They might have to log in again to MediaWiki.org, but does it actually prompt them to approve the app again?

Regarding ProveIt, please review https://github.com/proveit-js/proveit/pull/214 . One of the hashtags is inside a link; I can change that if it won't work. Also, for future reference, I am assuming this is not case-sensitive. Correct me if I'm wrong.

@mattflaschen wonderful.

One of the hashtags is inside a link; I can change that if it won't work. Also, for future reference, I am assuming this is not case-sensitive. Correct me if I'm wrong.

@Slaporte can you comment on this?

DarTar renamed this task from Discuss edit hashtag support with major bot/tool creators to Discuss edit hashtag support with major bot/tool/gadget creators.Jan 16 2016, 11:51 PM
DarTar triaged this task as Medium priority.
DarTar updated the task description. (Show Details)
In T123636#1939327, @Mattflaschen wrote:

@Ricordisamoa Well, if someone want to use all my 11 (forgot Wikidata "creator") tools listed above, he'd have to sign up to 11 different OAuth clients. As these permissions only last as long as a cookie (?), this will have to be repeated every x weeks/months.

Is that really true? I thought OAuth grants lasted until revoked. They might have to log in again to MediaWiki.org, but does it actually prompt them to approve the app again?

OAuth grants last until revoked. There isn't any requirement to log in or repeat the authorization again ever, as long as the tool doesn't forget the access token and secret that were obtained from the initial authorization.

The thought that the permissions only last as long as a cookie is probably from storing the token and secret in $_SESSION or the like.

@mattflaschen wonderful.

One of the hashtags is inside a link; I can change that if it won't work. Also, for future reference, I am assuming this is not case-sensitive. Correct me if I'm wrong.

@Slaporte can you comment on this?

That's right, tags are not case-sensitive.

DarTar subscribed.

@Slaporte reassigning this to you if you want to take the lead and reach out to other tool developers, my job is done here (I'll keep the card on our radar).

Samwalton9-WMF subscribed.

I've become the primary developer on the hashtags tool for the time being, so I'll be looking at doing some encouragement of hashtag tracking.

Speaking of which, @Sophivorus - does ProveIt still have a hashtag in the edit summary? There's a patch listed above, but I can only see a single edit having had #ProveIt in the summary.

@Samwalton9 No, ProveIt no longer has a hashtag in the edit summary. The "proveit" tag is added to the hidden input field by the gadget.

That makes sense, thanks for clarifying!

Just noting here that Tool-Pageviews has an option to find pageviews for pages on which a Hashtag has been recorded in the tool, but the link needs updating to point to the new tool location.

In my humble opinion, this functionality could be improved by parsing any #hashtag pattern in the edit summaries. This would simplify automated as well as manual tagging. To prevent indiscriminate tagging, only tags in Special:Tags would be parsed.

I recently updated the ProveIt gadget so that it now supports the 2017 wikitext editor. However, one functionality I haven't been able to carry over is tagging the edits.

If the user is editing with the old editor, I can tag the edits by having the gadget add the hidden "wpChangeTags" field.

However, when using the new wikitext editor, the hidden input field doesn't seem to work (there's not even a <form> involved). So I searched the scarce docs and complex code for a built-in method for tagging edits, but nothing seems to work. Has anyone solved this problem before and can give me a clue? Thanks!

T232669

Are you trying to do something like what @Reedy did with AWB in T111663: Tag AWB edits? Also, I think ProveIt is on the list at T185382: Add manual tag-* messages to Wikimedia Messages for AWB, Huggle, WPCleaner, ProveIt, HotCat, wikEd.

I wasn't aware of T185382, thanks!

As to T111663, it suggests that it's possible to tag a ProveIt edit after the fact, using the "tag" module of the core MediaWiki API (https://es.wikipedia.org/w/api.php?action=help&modules=tag). This may work, but it seems a bit too complicated for such a simple task. It'd definitely be better if there were some method in the VisualEditor API to tag the current edit, so that when the user submits, the edit is already tagged. But a complicated solution is better than no solution, so thanks!

Hi @Sophivorus , we recently added a property to the ArticleTarget for doing just this:

ve.init.target.saveFields.wpChangeTags = value

Currently these values are not cleared after save, so you'll probably want to clear the value when the editor loads, as in VE you can make multiple edits without reloading the page.

Just to clarify, this task is about the Hashtags tool and hashtags in edit summaries, not the MediaWiki Tag system :)

@Esanders That's exactly what I needed, thanks!

For reference, after some trial and error I figured out that the tag must be set like so:

ve.init.target.saveFields.wpChangeTags = function () {
    return 'tag';
};