Page MenuHomePhabricator

Deprecation comments in wikibits.js lie about things being removed in 1.23
Closed, ResolvedPublic

Description

Deprecation comments in wikibits.js lie about things being removed in 1.23.

https://gerrit.wikimedia.org/r/#/c/126127/ is the patch that we're apparently supposed to apply, but doing this will horribly break an ungodly amount of scripts and user JS on Wikimedia wikis.

As far as I know no effort has been made so far to quantify the issues that are inevitably going to arise.

We need to reevaluate the deprecation notices, remove what we can and stop lying about what we can't. :)


Version: 1.23rc
Severity: normal

Details

Reference
bz63964

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:08 AM
bzimport set Reference to bz63964.

The full list of deprecated scheduled-for-removal properties is below.

'-' indicates a dummy value (that only exists not to throw exceptions if referenced by scripts, functions are no-ops), '+' indicates an actual value (functions that do things, non-undefined values).

User-agent sniffing:
+ clientPC

  • is_gecko
  • is_chrome_mac
  • is_chrome
  • webkit_version
  • is_safari_win
  • is_safari
  • webkit_match
  • is_ff2
  • ff2_bugs
  • is_ff2_win
  • is_ff2_x11
  • opera95_bugs
  • opera7_bugs
  • opera6_bugs
  • is_opera_95
  • is_opera_preseven
  • is_opera
  • ie6_bugs

DOM utilities:

  • doneOnloadHook

+ onloadFuncts

  • runOnloadHook
  • changeText
  • killEvt
  • addHandler
  • hookEvent
  • addClickHandler
  • removeHandler
  • getElementsByClassName
  • getInnerText

+ addOnloadHook

Toggle checkboxes with shift selection:

  • checkboxes
  • lastCheckbox
  • setupCheckboxShiftClick
  • addCheckboxClickHandlers
  • checkboxClickHandler

Add a button to the default editor toolbar:

  • mwEditButtons
  • mwCustomEditButtons

Spinner creation, injection and removal:

  • injectSpinner
  • removeSpinner

Escape utilities:

  • escapeQuotes
  • escapeQuotesHTML

Display a message to the user:
+ jsMsg

Misc. utilities:
+ tooltipAccessKeyPrefix
+ tooltipAccessKeyRegexp
+ updateTooltipAccessKeys
+ addPortletLink
+ appendCSS

I think that we probably can safely remove "Spinner creation, injection and removal" and "Toggle checkboxes with shift selection" and "Escape utilities".
We probably can't safely remove the rest. (But, again, I have no data on this and this sucks.)

Cherry picking only a few of them is not an option imho.

They were intended for removal in 1.23 following a more public-engaging deprecation process.

However, both the tracking of usage and the announcing of how to use mw.log.deprecate were delayed.

I announced a bit about mw.log.deprecate in last October:

http://www.mail-archive.com/wikitech-l@lists.wikimedia.org/msg72198.html

And only last week did Ori and I start putting the bits in place for tracking mw.track('deprecate') usage on Wikimedia wikis. We're still working on that.

I think once that is in place and we've sent a second reminder to wikimedia and mediawiki mailing lists about them going away soon, we can safely remove them in the next release. It is developer's responsibility to keep scripts up to date.

Wikimedia can do a best effort to keep popular gadgets that are abandoned up to date, but overall we should not cherry-pick speed up or delay removal of features just because of how well or how much they seem to be used.

I don't see this blocking 1.23.0...

Hmm. Okay, so do we just s/1.23/1.24/ in wikibits.js for now, on master and on REL1_23 branch?

Change 130405 had a related patch set uploaded by Bartosz Dziewoński:
wikibits.js: Remove false deprecation notices

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

Change 130405 merged by Bartosz Dziewoński:
wikibits.js: Remove false deprecation notices

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

I ended up removing the notices altogether.

Change 130420 had a related patch set uploaded by Bartosz Dziewoński:
wikibits.js: Remove false deprecation notices

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

Change 130420 merged by jenkins-bot:
wikibits.js: Remove false deprecation notices

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