Lucas_Werkmeister_WMDE created this task. Lucas_Werkmeister_WMDE added projects: Wikidata, MediaWiki-extensions-WikibaseRepository, Wikidata Dev Team. Restricted Application added a subscriber: Aklapper.
TASK DESCRIPTION As a Wikidata editor, I want to see “nice” edit summaries when edits are being shown outside of wikidata.org (e.g. in tools), in order to understand what the edit is doing. **Problem:** Wikibase formats links in edit summaries using the label of the linked entity, e.g. `[[Property:P460]]: [[Q112795079]]` becomes “said to be the same as (P460) <https://www.wikidata.org/wiki/wiki/Property:P460>: Wikidata Sandbox 4 (Q112795079) <https://www.wikidata.org/wiki/wiki/Q112795079>”. However, this is disabled in API requests, originally to fix T111346 <https://phabricator.wikimedia.org/T111346>; that bug should since have been fixed via T292203 <https://phabricator.wikimedia.org/T292203>, though, so we should be able to enable these links in API requests now without risking a regression on T111346 <https://phabricator.wikimedia.org/T111346>. **Example:** Getting the edit summary of this edit <https://www.wikidata.org/w/index.php?title=Q4115189&diff=1810599589&oldid=1810484180> using this API request <https://www.wikidata.org/w/api.php?action=query&format=json&prop=revisions&revids=1810599589&formatversion=2&rvprop=comment%7Cparsedcomment> currently produces: <span dir="auto"><span class="autocomment">Changed claim: </span></span> <a href="/wiki/Property:P460" title="Property:P460">Property:P460</a>: <a href="/wiki/Q112795079" title="Q112795079">Q112795079</a> And would change to: <span dir="auto"><span class="autocomment">Changed claim: </span></span> <a href="/wiki/Property:P460" title="said to be the same as | this item is said to be the same as that item, but it's uncertain or disputed"><span class="wb-itemlink"><span class="wb-itemlink-label" dir="ltr" lang="en">said to be the same as</span> <span class="wb-itemlink-id">(P460)</span></span></a>: <a href="/wiki/Q112795079" title="Wikidata Sandbox 4 | sandbox for testing"><span class="wb-itemlink"><span class="wb-itemlink-label" dir="ltr" lang="en">Wikidata Sandbox 4</span> <span class="wb-itemlink-id">(Q112795079)</span></span></a> **Implementation note:** This is currently checked in `HtmlPageLinkRendererEndHookHandler::doHtmlPageLinkRendererEnd()`; see the call to `$this->isApiRequest()`. **Screenshots/mockups:** **BDD** GIVEN an edit with wikilinks to items or properties in the edit summary (without custom link text) WHEN loading the parsed comment via the API THEN the links are shown using the entity label **Acceptance criteria:** - API requests that return edit summaries show formatted links with entity labels. This includes `action=query` + `prop=revisions` + `rvprop=parsedcomment`, as linked above, but also the Echo API (see T116762 <https://phabricator.wikimedia.org/T116762>). - There is a temporary feature flag that allows us to deploy this to Test Wikidata separately to Wikidata. **Open questions:** - Does this have any negative effects? - We assume that users who analyze edit summaries to determine what changed in an edit generally use the unparsed comment (e.g. `/* wbsetclaim-update:2||1|1 */ [[Property:P460]]: [[Q112795079]]`), which is unaffected. NOTE: This is a significant change and will be announced in accordance with the Stable Interface Policy <https://www.wikidata.org/wiki/Special:MyLanguage/Wikidata:Stable_Interface_Policy>. TASK DETAIL https://phabricator.wikimedia.org/T327062 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Lucas_Werkmeister_WMDE Cc: Lydia_Pintscher, Lectrician1, Michael, karapayneWMDE, Lucas_Werkmeister_WMDE, Aklapper, Astuthiodit_1, Invadibot, maantietaja, ItamarWMDE, Akuckartz, Nandana, lucamauri, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Mbch331
_______________________________________________ Wikidata-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected]
