Page MenuHomePhabricator

CodeEditor should not use jQuery.UI
Closed, ResolvedPublicBUG 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.

Change #1193979 had a related patch set uploaded (by Reeti; author: Reeti):

[mediawiki/core@master] i18n: Use gender-neutral language for Special:NewFiles

https://gerrit.wikimedia.org/r/1193979

I have submitted a patch for this task on Gerrit.

Link to the change: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1193579

How is this task about CodeEditor relevant to a patch changing a message to use gender neutral language in Special:NewFiles?

Change #1193979 abandoned by Aklapper:

[mediawiki/core@master] i18n: Use gender-neutral language for Special:NewFiles

Reason:

2 out of 3 (task ID, patch summary, patch content) are wrong. Boldly abandoning.

https://gerrit.wikimedia.org/r/1193979

Change #1193979 restored by Reeti:

[mediawiki/core@master] i18n: Use gender-neutral language for Special:NewFiles

https://gerrit.wikimedia.org/r/1193979

Change #1193979 abandoned by Aklapper:

[mediawiki/core@master] i18n: Use gender-neutral language for Special:NewFiles

Reason:

Hi, please do not restore changes for no reason while ignoring the feedback provided. Thanks!

https://gerrit.wikimedia.org/r/1193979

Change #1227868 had a related patch set uploaded (by SD0001; author: SD0001):

[mediawiki/extensions/CodeEditor@master] Make compatible with ResizingDragBar, remove jquery.ui

https://gerrit.wikimedia.org/r/1227868

Change #1227868 merged by jenkins-bot:

[mediawiki/extensions/CodeEditor@master] Make compatible with ResizingDragBar, remove jquery.ui

https://gerrit.wikimedia.org/r/1227868

Global search shows 51 site CSS pages using .mw-textarea-protected + .ui-resizable .ace_content selector to target the CodeEditor div on protected pages. This no longer works as there is no ui-resizable class.

The selector can be changed to .mw-textarea-protected + div .ace_content. Doing this now.

The selector can be changed to .mw-textarea-protected + div .ace_content. Doing this now.

Fixed 50 out of 51. The edit on th.wikipedia.org was blocked by an abuse filter.

SD0001 claimed this task.

Also fixed 5 wikis that were using #wpTextbox1[readonly] + .ui-resizable > .ace_editor.