Remove dependency on jquery.ui from CodeMirror

Now that RTP has been enabled for a while, we no longer need this and
jquery.ui is deprecated.

Bug: T323329
Change-Id: Idbb92bd4f18e2c6e0adc51d1a3fa909efc129686
This commit is contained in:
Derk-Jan Hartman 2024-03-18 22:22:09 +01:00 committed by Jdlrobson
parent d9ec236217
commit fbf02b1dc2
2 changed files with 1 additions and 14 deletions

View file

@ -62,7 +62,6 @@
"jquery.textSelection",
"mediawiki.user",
"user.options",
"jquery.ui",
"oojs-ui.styles.icons-editing-styling"
],
"packageFiles": [

View file

@ -102,22 +102,10 @@ function init() {
function setupSizing() {
var $codeMirror = $( codeMirror.getWrapperElement() );
// Only add jQuery UI's resizing corner if realtime preview is not enabled,
// Only add resizing corner if realtime preview is enabled,
// because that feature provides height resizing (even when preview isn't used).
if ( mw.loader.getState( 'ext.wikiEditor.realtimepreview' ) === 'ready' ) {
codeMirror.setSize( '100%', $textbox1.parent().height() );
} else {
// RL module jquery.ui
// eslint-disable-next-line es-x/no-resizable-and-growable-arraybuffers
$codeMirror.resizable( {
handles: 'se',
resize: function () {
// Keep at 100% parent width, don't modify height here
codeMirror.setSize( '100%', null );
}
} );
// Match the height of the textarea.
codeMirror.setSize( null, $textbox1.height() );
}
var $resizableHandle = $codeMirror.find( '.ui-resizable-handle' );
mw.hook( 'ext.WikiEditor.realtimepreview.enable' ).add( function ( realtimePreview ) {