When the expiring watchlist feature initially launched, a new module bundle entry point was created just for these few lines of code:
watchThisWidget = OO.ui.infuse( watchThisNode ); expiryWidget = OO.ui.infuse( expiryNode ); expiryWidget.setDisabled( !watchThisWidget.isSelected() ); watchThisWidget.on( 'change', function ( enabled ) { expiryWidget.setDisabled( !enabled ); } );
This seems a bit excessive and counter the recommended practices and guidelines for performance; which aims for bundles to ship all code relevant to that particular user experience unless bundle splitting is beneficial for performance (e.g. more startup payload, more frequent roundtrips, and more often late-loading code, in exchange for more gradunlar payloads upfront).
Since these few lines of code are written for and needed by EditPage, which has its various internal features bundled in mediawiki.action.edit, we should try to ship these there as well.