Page MenuHomePhabricator

ReferencesDrawer should be a Drawer, not extend the Drawer
Closed, ResolvedPublic

Description

Precursors: T214049

The ReferencesDrawer extends the Drawer. It does this for several reasons:

  • To disable scroll via the closeOnScroll property
  • Override a template
  • To override the show method (but not actually do anything) 😂
  • To add a class drawer-enabled to the body tag when open and remove it when closed
  • Define events showNestedReference
  • Expose a method showReference which Minerva uses to display the reference.

Working across the MobileFrontend and Minerva codebase, we will look to disect this.

Acceptance criteria

  • closeOnScroll is a parameter to Drawer not a property on the class
  • The template of ReferencesDrawer is generalised and moved to the Drawer class (implementor should note that things extending Drawer already provide their own templates, so it would be useful to look at CtaDrawer's template when generalizing)
  • Events are passed in as properties
  • The drawer-enabled class is no longer necessary (T214049)
  • Keep Minerva stable throughout these changes!
  • Move the showReference method to the new factory function
  • defaults are passed directly into the Drawer

Details

Related Gerrit Patches:
mediawiki/extensions/MobileFrontend : masterDrop backwards compatability classes
mediawiki/skins/MinervaNeue : masterUse showReference function rather than deprecated ReferenceDrawer
mediawiki/extensions/MobileFrontend : masterDev: ReferencesDrawer is a Drawer!!!

Event Timeline

phuedx removed a subscriber: phuedx.Feb 28 2019, 10:57 AM

Change 526569 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] ReferencesDrawer is a Drawer!!!

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

Jdlrobson triaged this task as High priority.Aug 2 2019, 4:59 PM

Change 529174 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/skins/MinervaNeue@master] Use showReference function rather than deprecated ReferenceDrawer

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

Change 526569 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Dev: ReferencesDrawer is a Drawer!!!

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

Change 529198 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Drop backwards compatability classes

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

Change 529174 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Use showReference function rather than deprecated ReferenceDrawer

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

Change 529198 merged by Jdlrobson:
[mediawiki/extensions/MobileFrontend@master] Drop backwards compatability classes

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

Jdlrobson closed this task as Resolved.Sep 5 2019, 8:34 PM
Jdlrobson claimed this task.