Page MenuHomePhabricator

Create an extension to add a "Sandbox" link to the personal toolbar
Closed, ResolvedPublic

Description

Just about every Wikimedia wiki adds a "Sandbox" link to the personal toolbar of registered users with common.js code or a default-enabled gadget. We should probably do this in PHP instead.

This would let us fix at least two problems with the JS approach (that have actually been reported as bugs here, which clearly shows that people think of this as a core feature):

  • The link could be marked as red when the page doesn't exist (bug 69649)
  • The link could be displayed on pages where user JS isn't allowed (bug 64517)

Version: master
Severity: normal

Details

Reference
bz69650

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:36 AM
bzimport set Reference to bz69650.

I suppose this could just be a hook in wmf config too?

Probably, but writing a trivial extension sounds better from the maintainability standpoint to me. Easier to find the code if it's in mediawiki/extensions/SandboxLink rather than operations/whatever/wikimedia-config-blah.

I'm not sure Bartosz was volunteering. :-)

The extension's requirements and architecture are still a bit murky to me. Presumably you'd want the ability to specify a link text message, a link target message, and an insertion point?

I am indeed volunteering. I was meaning to do this already, but got distracted.

The extension is meant to provide the exact same functionality as [[w:MediaWiki:Gadget-mySandbox.js]], with the exact same set of customizable (via system messages) options (see the 'conf' entry in the gadget's code).

Change 157297 had a related patch set uploaded by Bartosz Dziewoński:
Add SkinPreloadExistence hook

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

Change 157296 had a related patch set uploaded by Bartosz Dziewoński:
Initial extension code

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

Change 157297 merged by jenkins-bot:
Add SkinPreloadExistence hook

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

Change 157296 merged by Legoktm:
Initial extension code

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