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.

Related Objects

StatusAssignedTask
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
DeclinedNone
OpenNone
Resolveddr0ptp4kt
DuplicateJhernandez
Duplicatedr0ptp4kt
OpenNone
ResolvedJdlrobson
DeclinedNone
OpenNone
OpenNone
DeclinedNone

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 13 2019, 8:58 PM
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 added a subscriber: Jdlrobson.

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

Jdlrobson closed this task as Declined.Jul 17 2019, 4:15 PM

Lazy loaded reference feature will be removed (see T222373)