Page MenuHomePhabricator

Drop ext.confirmEdit.CaptchaInputWidget module and associated code
Closed, ResolvedPublic

Description

Summary

T422913: Rework mw.libs.confirmEdit.CaptchaInputWidget to not always require an input field replaced the mw.libs.confirmEdit.CaptchaInputWidget class with mw.libs.confirmEdit.CaptchaWidget. Now that it is no longer used as of T426227: Remove all remaining uses of mw.libs.confirmEdit.CaptchaInputWidget we can drop the module and it's JS file

Background

  • Per the stable interface policy "client-side JavaScript" is not considered stable
    • Additionally, the JS module appears to have only used in DiscussionTools and Convenient-Discussions per Wikimedia Codesearch and a GitHub code search
    • Furthermore, the JS class was never explicitly marked as stable to use (so even if the stable interface policy applied to JS files it would have been excluded based on it being extension code)
  • Therefore, given all uses are replaced and it was not used by many places, it should be safe to drop the widget without first hard-deprecating it

Acceptance criteria

  • Drop the ext.confirmEdit.CaptchaInputWidget module and the code in that module

Event Timeline

Change #1287033 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/ConfirmEdit@master] Drop the ext.confirmEdit.CaptchaInputWidget module and it's code

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

Change #1287033 merged by jenkins-bot:

[mediawiki/extensions/ConfirmEdit@master] Drop the ext.confirmEdit.CaptchaInputWidget module and it's code

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

Given that it might break one of those few on-wiki scripts that refer to ext.confirmEdit.CaptchaInputWidget, here's an example of migration to CaptchaWidget. Tested for FancyCaptcha (as this is the one that's active on plwiki): https://pl.wikipedia.org/w/index.php?title=MediaWiki:Gadget-wikibugs-core.js&diff=prev&oldid=79821499

Given that it might break one of those few on-wiki scripts that refer to ext.confirmEdit.CaptchaInputWidget, here's an example of migration to CaptchaWidget. Tested for FancyCaptcha (as this is the one that's active on plwiki): https://pl.wikipedia.org/w/index.php?title=MediaWiki:Gadget-wikibugs-core.js&diff=prev&oldid=79821499

Thanks for noting this, I should have checked on-wiki to see if it was used :D

Perhaps we should mark the ext.confirmEdit.CaptchaWidget code as stable to use once QA has completed and we are fairly confident that no additional work on it is needed for hCaptcha?