Page MenuHomePhabricator

Codex is not a replacement of jQueryUI
Closed, DeclinedPublicBUG REPORT

Assigned To
None
Authored By
Nux
Wed, Aug 5, 8:11 PM
Project Tags
Referenced Files
F97528720: obraz.png
Fri, Aug 7, 7:49 PM
F97488075: obraz.png
Fri, Aug 7, 2:26 PM
F97487974: obraz.png
Fri, Aug 7, 2:26 PM
F12: project.png
Wed, Aug 5, 8:11 PM
File Not Attached

Description

Steps to replicate the issue (include links if applicable):

What happens?

Shows a warning:

This page is using the deprecated ResourceLoader module "jquery.ui".
Please use Codex instead.

What should have happened instead?

Don't suggest Codex until there is basic feature parity.

For example, a basic jQuery UI dialog can be moved by dragging its title bar:
https://jqueryui.com/dialog/

This is not possible in Codex:
https://doc.wikimedia.org/codex/latest/components/demos/dialog.html

Software version (on the Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

Codex basiclly have all feature to build Wikipedia UI. No reason to stop suggesting it, jQuery UI is clearly outdated. This is my personal view.

Don't suggest Codex until there is basic feature parity.

In this case OOUI should be used for now. JQuery UI is already deprecated even before Codex exists.

basic feature parity

in my humble opinion, draggability for a dialog isn't «bare minimum». either the statement of «codex not being insufficient», or the example, isn't quite right. there are plenty examples of fully-functioning gadgets and other interface modules built using codex, without a single line of jqueryui.

Don't suggest Codex until there is basic feature parity.

That's rather subjective, unless a specific use case / example is provided why moving a dialog by dragging its title bar is an important and common feature.

Closing this ticket as "feature parity" is not a goal in itself and as "basic feature parity" lacks criteria when to consider that achieved (or not yet).

Nux reopened this task as Open.EditedFri, Aug 7, 2:26 PM

I would have though this is so basic it doesn't need an explanation, but OK... Dragging has been available in jQueryUI since at least 2014. I mean obviously some windows are modal and some are not. If a dialog window is modal it obstructs the view. You cannot copy anything to the window.

An example is a notepad script I recently updated (and was not able to use Codex):
https://pl.wikipedia.org/wiki/Wikipedysta:Vinne2/scripts/myNotepad

obraz.png (667×502 px, 75 KB)

A more widely in use is the refToolbar which I also couldn't change to use Codex:
https://pl.wikipedia.org/wiki/Wikipedia:Narz%C4%99dzia/refToolbar

obraz.png (1,152×372 px, 24 KB)

Would rephrasing the output Please use Codex instead. to Please use Codex (or worse, OOUI) instead. resolve this?

Not really. I don't think there is a draggable dialog in OOUI either. I thought Codex was mature enough that it would have basic stuff like that.

I recently created SimpleDragDialog because I wasn't able to find anything built into mediawiki (and I wanted something simpler than OOUI).
https://github.com/Eccenux/wiki-dnu-delReq/blob/master/SimpleDragDialog.md

Again, your "basic stuff" is not other people's "basic stuff", I'm afraid.

Perhaps, but modal dialog is actually harder to do then non-modal dialog, so I don't know why was a modal dialog created first for Codex.

Also for jQuery UI this is literally called "Basic dialog" :-).

obraz.png (895×336 px, 25 KB)

I mean non-modal, draggable dialogs are also available in MFC in Visual Studio 6 which is like from the previous century ;). Sure, t6hings were simpler then in many ways, but I stand by saying a draggable dialog is a pretty basic thing for a component library. It's not like I'm saying ComboBox is basic.

From a former Design System Team member and maintainer of Codex: My position is similar to @Aklapper's – where there is no clearly stated need, there is no reasoning to provide feature-parity in Codex with jQueryUI.
Providing a desktop window management feature like draggable dialogs are to my knowledge nowhere, as in no product has raised this a blocking gap with stated priority. Not in Foundational product development, nor in volunteer projects on Phab.

Reason might be that window management like features as draggable dialogs became out of fashion as their value added is very limited from a user-experience POV and mostly only on a screen size like desktop or eventually tablet plus maybe reasonable.
Most of the user flows are as well represented with a non-draggable dialog and as they are rare on the web, the user expectation for a dialog to be draggable is just not there.
We could pack every possible feature into the library, but it comes with cost: wide testing, long-term maintenance, bloating of the library with performance impact for all other use cases.

In this case I don't see the need and would advise to clearly describe and outline the need and possibly consider to extend Codex in the application instead of upstreaming such.

There are 3 tools using lib-SimpleDragDialog https://pl.wikipedia.org/wiki/MediaWiki:Gadgets-definition

of which:

  • refToolbar is the default
  • DelReqHandler 534 / 103 (all users / active)
  • CzyWiesz 1078 / 296

There are 26 user scripts / gadgets that seem to be using jQueryUI dialogs:
https://pl.wikipedia.org/w/index.php?search=insource%3A%2F%5C%29%5C.dialog+*%5C%28%2Fi+intitle%3A%22.js%22&title=Specjalna%3ASzukaj&profile=advanced&fulltext=1&ns2=1&ns8=1

There is even a built in WikiData dialog (wbc-editpage) that is based on jQuery UI and is a draggable window. Which would actually be better if one would be able to copy current page title to it (it is modal currently and probably shouldn't).

Codex is pretty new and complex. I wouldn't expect there to be too many phab requests for it.

Hold on hold on. jQuery UI is truly deprecated, it is outdated currently, maybe Codex cannot cover every usage case, we have OOUI, and even you can use native JS to write complex UI, but jQuery UI is legacy and outdated, we really should not use it on new projects, this message is not bad, may be should change to

This page is using the deprecated ResourceLoader module "jquery.ui".
Please use Codex (recommended) or OOUI instead.

That's my view, and may the best solution.
We should shut this endless fight down, Codex is the modern, and recommended Wikimedia Design System, OOUI is usable too, but jQuery UI is outdated, no reason to suggest use jQuery UI.

Also you CAN make a draggable dialog in OOUI, just extend OO.ui.mixin.DraggableElement!

if we don't have any other examples where codex lacks anything meaningful that jqueryui has, can we just edit this task to a mere feature request for a draggable window (which is likely going to be declined anyways)?

Wow. What's with the attitude in this task? I've been a wiki dev for 20 years. I'm currently a wiki dev for Meta, Commons and plwiki. I'm probably the most active JS dev on plwiki of all time (I don't like to brag, but I guess I need context here).

jQuery UI is useful to create dialogs and is significantly easier to use (think devUX) and has more features. I can use bold too 🙃. It is lacking in some areas. That's why I can understand Codex and OOjs/ui was created, but it just doesn't seem like a replacement yet. So the message is premature.

But jQuery.UI IS DEPRECATED (Officially).

Also, you can file a feature request about the sussy thing you want (like draggable dialog?)

Les4353 triaged this task as Lowest priority.Sat, Aug 8, 9:27 AM
Aklapper changed the task status from Open to Stalled.Sat, Aug 8, 10:28 AM
Aklapper raised the priority of this task from Lowest to Needs Triage.

Wow. What's with the attitude in this task?

Let's see:
Someone filed a task and called it "Codex is not a replacement of jQueryUI" (phrased like a fact).
It is not called "Misleading warning to use Codex while functionality does not exist in Codex" (something to potentially fix).
It is not called "Codex should support dragging dialogs by its title bar" (something to potentially add).

One single example ("a basic jQuery UI dialog can be moved by dragging its title bar") was given, together with the demand "Don't suggest Codex until there is basic feature parity."
Then some folks disagreed with the subjective term "basic", and whether the given single example is "basic".
Afterwards, more subjective opinions like "jQuery UI is useful to create dialogs and is significantly easier to use and has more features" were added, nine years after jQuery UI got deprecated in MediaWiki code.

Is this task about correcting the warning output to say something else (if so, what would you expect it to say?), given that jQuery UI is deprecated? I guessed so.
Why is this task not about the underlying problem which is lack of dialog title dragging support in Codex (the only given actionable example)?
But last comment then goes into sharing 'jQuery UI was easier to use and has more features than current Codex and OOUI' opinions, nothing actionable.

If someone creates opinionated tasks they usually also get opinionated answers.
I'd say that is the attitude in this task. Hope that helps a bit.

So I guess What Should Have Happen Instead? should say: Change the warning output to "Please use Codex instead. But if you use dragging dialogs by title bar, there will be no replacement for that."

I expected the message to be removed as the message is misleading, but I see this is not happening.

Someone filed a task and called it "Codex is not a replacement of jQueryUI" (phrased like a fact).

Yes it is a fact I cannot use Codex in 3 very popular gadgets. I see you don't like that fact, but it is still a fact. I added references to it ;)

See T434355: Create a non-modal dialog window for Codex and T434356: Create a draggable dialog window for Codex for potential followups.

I see you don't like that fact, but it is still a fact.

If you had written "Codex is currently not a full replacement of jQueryUI", that would have been a fact.
But we may have just different interpretations of words here, which added to some confusion. :)

If you had written "Codex is currently not a full replacement of jQueryUI", that would have been a fact.
But we may have just different interpretations of words here, which added to some confusion. :)

Yes, probably. I was told before I come off as more aggressive then I intend to. That might be because English is not might my main language and mostly self -learned from cartoons and action movies ;)

Anyway, I'll try to spot more common pain points in devUX and why I'm still avoiding using Codex and report them separately as I guess this will be more productive. I hope Codex will last longer then OOui as rewriting gadgets is also a dev pain point ;)