Page MenuHomePhabricator

Update SecurePoll to use ResourceLoader
Closed, ResolvedPublic

Description

Originally:

		$wgOut->addLink( [
			'rel' => 'stylesheet',
			'href' => "$wgScriptPath/extensions/SecurePoll/resources/SecurePoll.css",
			'type' => 'text/css'
		] );
		$wgOut->addScriptFile( "$wgScriptPath/extensions/SecurePoll/resources/SecurePoll.js" );

The CSS has been moved to RL, the JS is harder though (see comments below)

Current state of affairs:

		$out->addModuleStyles( 'ext.securepoll.special' );
		$out->addScriptFile( "$wgExtensionAssetsPath/SecurePoll/resources/SecurePoll.js" );

Details

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:43 AM
bzimport set Reference to bz48976.
bzimport added a subscriber: Unknown Object (MLST).
Reedy created this task.May 30 2013, 3:19 PM

Related URL: https://gerrit.wikimedia.org/r/66121 (Gerrit Change I1631f6124d6b5da56418766442f7a4797bdaf91e)

Reedy added a comment.Jun 4 2013, 10:11 PM

Reverted, shizz broken

DannyS712 updated the task description. (Show Details)Nov 19 2019, 4:11 AM
Restricted Application added a project: Platform Engineering. · View Herald TranscriptNov 19 2019, 4:11 AM
Reedy added a comment.Dec 6 2019, 2:27 AM

Reverted, shizz broken

Be interesting to know what was broken. Thanks 2013 me

Change 554992 had a related patch set uploaded (by Reedy; owner: Reedy):
[mediawiki/extensions/SecurePoll@master] Revert "Revert "ResourceLoader-ify SecurePoll""

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

Change 554992 abandoned by Reedy:
Revert "Revert "ResourceLoader-ify SecurePoll""

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

Reedy added a comment.Dec 6 2019, 7:13 PM

this formerly global function becomes a local function when loaded with RL because every file becomes closure scoped.
Presumably it is references from somewhere in a way that assumes it to be global, possibly outside this file. This kind of UI code generally is hard to port and requires more than just packaging.

Reedy updated the task description. (Show Details)Dec 6 2019, 7:14 PM
Reedy removed a subscriber: wikibugs-l-list.

Change 554992 restored by Reedy:
Revert "Revert "ResourceLoader-ify SecurePoll""

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

Reedy updated the task description. (Show Details)Dec 6 2019, 7:33 PM

Change 554992 merged by jenkins-bot:
[mediawiki/extensions/SecurePoll@master] RL-ify Special page CSS

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

Krinkle closed this task as Resolved.Jan 30 2020, 5:55 PM
Krinkle assigned this task to Reedy.