Page MenuHomePhabricator

Move lazily loaded references initialization from Skin to mobile.init.js
Closed, DeclinedPublic

Description

Given that mobile.init.js seems to be the real entrypoint of MobileFrontend where code is executed including the construction of a Skin instance, and that Skin is a View, which has a lot of baggage in itself, and mobile.init.js has all the dependencies already, moving lazily loaded references initialization to mobile.init.js seems sensible. This will cut out a small chunk from Skin and also allow Skin.page to removed.

	if ( mw.config.get( 'wgMFLazyLoadReferences' ) ) {
		this.eventBus.on( 'section-toggled', function ( data ) {
			lazyReferencesLoader.loadReferences(
				self.eventBus, data, self.referencesGateway, self.page
			);
		} );
	}

Acceptance criteria

  • Skin doesn't know about lazily loaded references.
  • Lazily loaded references are configured in mobile.init.js.
  • No regressions to tests, production, or production beta code.

Event Timeline

Niedzielski renamed this task from Move lazily loaded references to mobile.init.js to Move lazily loaded references initialization from Skin to mobile.init.js.Feb 19 2019, 4:43 PM
Niedzielski updated the task description. (Show Details)
Jdlrobson changed the task status from Open to Stalled.Apr 23 2019, 1:38 AM
Jdlrobson subscribed.

Stalled until we've made a decision about whether to continue supporting lazy loaded references (or promote it!)

Lazy loaded reference feature will be removed (see T222373)