> Note: For the purpose of estimation of this task you can assume T211197 has been completed.
For several of the metrics envisaged in T210660, we need a way to distinguish which edits come from AMC. We would like to create a [[https://www.mediawiki.org/wiki/Manual:Tags |tag]] that identifies which edits come from users that have AMC enabled.
== Acceptance criteria
 The new tag must be registered via [[ https://www.mediawiki.org/wiki/Manual:Hooks/ChangeTagsListActive | the ChangeTagsListActive hook ]]
 The new tag is added inside [[ https://www.mediawiki.org/wiki/Manual:Hooks/RecentChange_save | onRecentChangeSave hook]]
 Verify that the new tag also applies to all moderation actions to be counted as part of T210660 (e.g. it might need to appear in certain logs, analogously to how the existing "mobile web edit" tag [[https://en.wikipedia.org/wiki/Special:Log?type=create&user=&page=&wpdate=&tagfilter=mobile+web+edit |appears in the page creation log]]. Concrete list TBD in T213461)
== Developer notes
The hooks will need to check whether the user is an Advanced mobile contributions editor using a public method created inside T211197. We already do this for the 'mobile edit' tag and it should be relatively straightforward to mirror the logic there.
$rc->addTags( 'advanced mobile edit' );
NOTE: MobileFrontend confusingly binds the hook ChangeTagsListActive to onListDefinedTags. You can fix the method name as part of this change.
== QA steps
Article editing should be performed in the mobile mode. Please verify both wikitext editor and visualeditor.
1. Visit https://en.wikipedia.beta.wmflabs.org/wiki/Special:Tags
# Observe that the `advanced mobile edit` tag exists
# Log into [[ http://readingwebstaging.wmflabs.org | staging environment ]], switch to mobile view
# Edit article, verify in the article history that edit is not tagged with `Advanced mobile edit` tag.
# Go to Special:MobileOptions and enable Advanced Mobile Contributions
# Edit article in mobile mode using Wikitext with Advanced Mobile Contributions enabled
# Go to the article history, that edit should be tagged as `Advanced mobile edit`
# Disable the AMC mode
# Edit article
# Verify that last article edit has no `Advanced mobile edit tag`
# Redo steps 5..8 but this time edit article with Visual Editor
Additionally check other actions, like undo or article creation (cf. below). Everything should work the same way as the existing "mobile web edit" tag [[https://en.wikipedia.org/wiki/Special:Log?type=create&user=&page=&wpdate=&tagfilter=mobile+web+edit |appears in the page creation log]].
Moderation actions list (each to be QAed once it becomes available in the AMC interface. Some of these, like rollback or deletion of articles, need particular user rights):
- [[https://www.mediawiki.org/wiki/Manual:Parameters_to_index.php#rollback |rollback]]
- reviewing new pages (cf. Special:NewPagesFeed)
- protecting pages
- moving pages (Special:MovePage)
- pending changes (cf. log on enwiki)
(Other reverts, i.e. those that are not made via either undo or rollback, should already be covered by the QA for normal edits, and thus do not need to be tested separately.)