Page MenuHomePhabricator

Investigate feasibility of using comment_data
Closed, ResolvedPublic

Description

As described in T220696#5653419 we would like to use the comment_data field from the comments table to generate better edit summaries.

To make comment_data usable it needs to be exposed through the FormatAutocomments hook and stay backwards-compatible. This hook is run from Linter::formatComment which is in turn called from the following files:

Calls to Linker::formatComment
extensions/Wikibase/client/includes/RecentChanges/ChangeLineFormatter.php

includes/DummyLinker.php
includes/FeedUtils.php
includes/Linker.php
includes/actions/RollbackAction.php
includes/api/ApiComparePages.php
includes/api/ApiParse.php
includes/api/ApiQueryDeletedrevs.php
includes/api/ApiQueryFilearchive.php
includes/api/ApiQueryImageInfo.php
includes/api/ApiQueryLogEvents.php
includes/api/ApiQueryProtectedTitles.php
includes/api/ApiQueryRecentChanges.php
includes/api/ApiQueryRevisionsBase.php
includes/api/ApiQueryUserContribs.php
includes/api/ApiQueryWatchlist.php
includes/page/ImageHistoryList.php
includes/specials/pagers/BlockListPager.php
includes/specials/pagers/ImageListPager.php
includes/specials/pagers/ProtectedPagesPager.php

Calls to Linker::revComment (which is itself calling Linker::formatComment)
includes/Revision.php

Calls to Linker::commentBlock (which is itself calling Linker::formatComment)
includes/DummyLinker.php
includes/EditPage.php
includes/actions/McrUndoAction.php
includes/changes/ChangesList.php
includes/logging/LogFormatter.php
includes/revisiondelete/RevDelFileItem.php
includes/revisiondelete/RevDelLogItem.php
includes/specials/SpecialUndelete.php

The above are only the relevant calls from mediawiki/core and wikibase itself.

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

One of the necessary changes to get RecentChanges to work are waiting for further review here: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/489741

With the RecentChanges patch, and returning a CommentStoreComment from Revision::getComment we can without a lot of changes get the comment_data through as an argument of the FormatAutocomments hook. This would already allow us to use it to format edit summaries in RecentChanges and the entity history page.

Change 550710 had a related patch set uploaded (by Jakob; owner: Jakob):
[mediawiki/core@master] [DNM] Experiment in getting comment_data to work

https://gerrit.wikimedia.org/r/550710

Change 550711 had a related patch set uploaded (by Jakob; owner: Jakob):
[mediawiki/extensions/Wikibase@master] [DNM] Show comment_data in edit summaries

https://gerrit.wikimedia.org/r/550711

With the two proof of concept patches checked out, we can access comment_data through the FormatAutocomments hook. The main work for RecentChanges was already done in this unmerged patch: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/489741

A lot of discussion around the CommentStoreComment object which we would like to have passed around instead of the summary string also happened here: T218127.

Addshore claimed this task.

Change 550711 abandoned by Addshore:

[mediawiki/extensions/Wikibase@master] [DNM] Show comment_data in edit summaries

Reason:

Abandoning, but this is linked in the ticket anyway so we won't miss it!

https://gerrit.wikimedia.org/r/550711

Change 550710 abandoned by Jakob:

[mediawiki/core@master] [DNM] Put comment_data into FormatAutocomments hook args

Reason:

https://gerrit.wikimedia.org/r/550710