Page MenuHomePhabricator

Deprecate passing string IDs to OO.ui.infuse
Closed, ResolvedPublic

Description

We generally discourage the use of IDs elsewhere in our code, so we should remove this special case for ID inputs. In makes for confusing reading when put alongside class selectors:

widget1 = OO.ui.infuse( 'widget1' );
widget2 = OO.ui.infuse( $( '.widget2' ) );

instead this should be:

widget1 = OO.ui.infuse( $( '#widget1' ) );
widget2 = OO.ui.infuse( $( '.widget2' ) );

Details

Related Gerrit Patches:
mediawiki/core : masterUpdate OOUI to v0.30.0
oojs/ui : masterAvoid deprecated OO.ui.infuse( id )
mediawiki/extensions/WikibaseLexeme : masterAvoid deprecated OO.ui.infuse( id )
mediawiki/extensions/TwoColConflict : masterAvoid deprecated OO.ui.infuse( id )
mediawiki/extensions/UrlShortener : masterAvoid deprecated OO.ui.infuse( id )
mediawiki/extensions/Newsletter : masterAvoid deprecated OO.ui.infuse( id )
mediawiki/extensions/PageAssessments : masterAvoid deprecated OO.ui.infuse( id )
mediawiki/extensions/ForcePreview : masterAvoid deprecated OO.ui.infuse( id )
mediawiki/core : masterAvoid deprecated OO.ui.infuse( id )
oojs/ui : masterDeprecate passing string IDs to infuse

Event Timeline

Esanders created this task.Dec 4 2018, 10:28 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 4 2018, 10:28 PM

Change 477690 had a related patch set uploaded (by Esanders; owner: Esanders):
[oojs/ui@master] Deprecate passing string IDs to infuse

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

Volker_E moved this task from Backlog to Reviewing on the OOUI board.Dec 5 2018, 4:07 PM

Change 477690 merged by jenkins-bot:
[oojs/ui@master] Deprecate passing string IDs to infuse

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

Change 478752 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/core@master] Avoid deprecated OO.ui.infuse( id )

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

Change 478754 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/TwoColConflict@master] Avoid deprecated OO.ui.infuse( id )

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

Change 478756 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/ForcePreview@master] Avoid deprecated OO.ui.infuse( id )

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

Change 478766 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/WikibaseLexeme@master] Avoid deprecated OO.ui.infuse( id )

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

Change 478752 merged by jenkins-bot:
[mediawiki/core@master] Avoid deprecated OO.ui.infuse( id )

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

Change 478756 merged by jenkins-bot:
[mediawiki/extensions/ForcePreview@master] Avoid deprecated OO.ui.infuse( id )

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

Change 478791 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/UrlShortener@master] Avoid deprecated OO.ui.infuse( id )

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

Change 478794 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/Newsletter@master] Avoid deprecated OO.ui.infuse( id )

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

Change 478796 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/PageAssessments@master] Avoid deprecated OO.ui.infuse( id )

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

Change 478796 merged by jenkins-bot:
[mediawiki/extensions/PageAssessments@master] Avoid deprecated OO.ui.infuse( id )

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

Change 478794 merged by jenkins-bot:
[mediawiki/extensions/Newsletter@master] Avoid deprecated OO.ui.infuse( id )

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

Change 478791 merged by jenkins-bot:
[mediawiki/extensions/UrlShortener@master] Avoid deprecated OO.ui.infuse( id )

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

Change 478754 merged by jenkins-bot:
[mediawiki/extensions/TwoColConflict@master] Avoid deprecated OO.ui.infuse( id )

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

Change 478906 had a related patch set uploaded (by Esanders; owner: Esanders):
[oojs/ui@master] Avoid deprecated OO.ui.infuse( id )

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

Change 478766 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Avoid deprecated OO.ui.infuse( id )

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

Change 478906 merged by jenkins-bot:
[oojs/ui@master] Avoid deprecated OO.ui.infuse( id )

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

Volker_E moved this task from Reviewing to OOUI-0.30.0 on the OOUI board.Dec 18 2018, 10:42 PM
Volker_E edited projects, added OOUI (OOUI-0.30.0); removed OOUI.
Esanders added a comment.EditedDec 18 2018, 10:45 PM
mwgrep "\.infuse\("
commonswiki         MediaWiki:Gadget-advanced-search.js
dewiki              MediaWiki:Gadget-old-movepage.js
hewiki              MediaWiki:Nosaving.js
huwiki              MediaWiki:Gadget-QPreview.js
jawiki              MediaWiki:Common.js/titleChecker.js
jawiki              MediaWiki:Vector.js
plwiki              MediaWiki:Gadget-sk.js
plwikibooks         MediaWiki:Gadget-sk.js
plwikinews          MediaWiki:Gadget-sk.js

Not all of these will be passing string.

Fixed all on-wiki uses.

Change 481239 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/core@master] Update OOUI to v0.30.0

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

Change 481239 merged by jenkins-bot:
[mediawiki/core@master] Update OOUI to v0.30.0

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