Page MenuHomePhabricator

Redefine the responsibilities of Skin.js
Closed, DeclinedPublic5 Estimated Story Points

Description

Currently, Skin.js does the following:

  1. Initiates lazy-loaded images
  2. Adds classes to the body element: .animations and .touch-events
  3. Appends an element to the DOM <div class="transparent-shield cloaked-element">
  4. Emits an event when the #mw-mf-page-center element is clicked
  5. Get the license information of the page

It is not clear what these functions have in common.

Item #1 is done as side-effects of the constructor function.
#2 seems like it belongs in Browser.js, since animation and touch-event support are properties of the browser.
#3 seems like it should be the responsibility of the overlayManager or whoever utilizes that element.
#4 this event is only used by the main navigation
#5 seems like it could be a property of Page.js

Acceptance criteria

  • a little investigation needed as part of this work to figure out where to move this code. A write up is provided and signed off by all developers
  • the solution is implemented.

Event Timeline

Niedzielski subscribed.

Maybe these initializations can be moved from Skin to mobile.init? We pointed this as a large because there's a little investigation needed as part of this work to figure out where to move this code.

Jdlrobson triaged this task as Medium priority.Apr 24 2019, 1:39 AM
Jdlrobson moved this task from Incoming to Triaged but Future on the Web-Team-Backlog-Archived board.
Jdlrobson updated the task description. (Show Details)
Jdlrobson subscribed.

This task is several years old. I don't see much value in keeping in open longer. All code can be reevaluated if and when we do T281930.