Page MenuHomePhabricator

CodeEditor should not use jQuery.UI
Open, Needs TriagePublicBUG REPORT

Description

jQuery UI has been deprecated since 2017 and is now end of life.
https://gerrit.wikimedia.org/g/mediawiki/extensions/CodeEditor/+/156c035c3e7ca52d098aa10e2b171e10de5499ea/extension.json#53

Please help us migrate away from it by working out the migration path for this code.

Event Timeline

Yep! Now that Realtime Preview is enabled by default, we can (soon; let's give it a few weeks or something) set WikiEditor to have RTP by default, and then (because CM already requires WikiEditor) we can just remove the Resizable plugin usage from CodeMirror. (I could've sworn I already added this comment to this ticket a few weeks ago! I guess not though.)

Then CM will have the full-width resize bar at the bottom, and not the "corner triangle that looks like it's a two-dimensional resizer but actually is just up-and down" one. And get rid of the legacy code, and the special handling that adds both the new and old. :)

TheDJ subscribed.

Reminder that this still needs to happen.

Code for the new resized is located outside of this extension, in the wikieditor module ext.wikiEditor.realtimepreview
Not sure if that one can be required without introducing side effects. We might have to make it available as a separate module ?

var ResizingDragBar = require( './ResizingDragBar.js' );

	// Add the resizing bar.
	var bottomDragBar = new ResizingDragBar( { isEW: false } );
	$uiText.after( bottomDragBar.$element );

then hook into: ext.WikiEditor.realtimepreview.resize for the resize event.

Krinkle subscribed.

Untagging from MediaWiki-Interface in core as this is not itself a task about the jquery.ui module that core ships, and thus not actionable from that perspective (the parent task is). This is a task for CodeEditor component about its use of the jquery.ui module provided by core.