WordPress.org

Make WordPress Core

Opened 2 months ago

Last modified 6 weeks ago

#52163 new task (blessed)

Updating jQuery UI for jQuery 3.x

Reported by: Clorith Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: External Libraries Keywords: early
Focuses: javascript Cc:

Description

Related #51812

The update to jQuery 3.5 has brought a lot of deprecation warnings into core, where a substantial amount of these come from jQuery UI as well at this point.

The current latest release of jQuery UI, and is bundled in core as of WordPress 5.6, is jQuery UI version 1.12.1, this was released September 2016.

To clear out any deprecations in core, to be able to remove the default-enabled state on jquery-migrate.js, these need to be addressed, some of them are sorted in the jQuery UI GitHub repository. A milestone release for 1.13 exists, and is completed, but has had no traction over the past few months, so it is unclear when this release is scheduled for.

This means our path forward right now looks to be building and bundling from source, and submitting patches upstream for elements that may not have been corrected as of yet.
Doing so does pose the risk of some extra broken styles, since core does not bundle CSS for jQuery UI, and most plugins and themes that do so often grab the version and try to load the styles off JavaScript CDN providers, which would fail if the version was a custom bump.

We will need to find a good way forward, ideally this should go in early to improve the chance of catching edge case scenarios where changes to the code may have unexpected implications.

Change History (5)

This ticket was mentioned in Slack in #core by clorith. View the logs.


2 months ago

#2 in reply to: ↑ description @Hareesh Pillai
2 months ago

since core does not bundle CSS for jQuery UI

For those of us who might not have the historical context, would it be possible to share why jQuery UI CSS is not bundled? Should we reevaluate this and would bundling it be helpful?

Aside: PR #1919 in jQuery UI repo resolves most of the jQuery Migrate warnings.

PS: Link to the jQuery UI 1.13 milestone mentioned above: https://github.com/jquery/jquery-ui/milestone/2

#3 @Clorith
2 months ago

The bundling of styles would be found in #18909, and it's not that it was ever discouraged, but rather that it never got finished, or a good way forward was landed on, not was there a final consensus that "this is happening", as it was merely a proposal at the time I believe.

Personally, I don't know if it's even needed in a core context any more, since the creation of that ticket, the admin interface had a refresh. The old style, pre-MP6 (the codename for the admin refresh), WordPress was visually close to how jQuery UI is styled in terms of general aesthetics, if not in color scheme, but has since moved forward a bit.

I'd also note that WordPress it self has made its own implementation of most, if not all, of the elements jQuery UI offered at the time. This is even more so the case after the implementation of the Block Editor.

Any plugins or themes using jQuery UI at this point would have bundled, or remotely-enqueued, styles aligned to suit their visual impact any way (as they would have in the first place as well, using a WordPress backend-styled date picker for example, would very likely clash with the styling of a theme).

This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.


6 weeks ago

#5 @hellofromTonya
6 weeks ago

  • Milestone changed from 5.7 to Future Release

Following up on @Clorith suggestion in Ticket 51812

As for removing jQuery Migrate being enabled by default, I think we will want to move that back one release (to 5.8). I would ideally like to have more stewing time to capture any missed deprecations in core, and give the jQuery UI team a chance to get their deprecation fixes done as well, so that we do not need to build that our selves.

This makes sense to give more time for jQuery UI team to do a release.

Following his suggestion, we discussed in today's scrub and agreed to punt this ticket to Future Release.

If any maintainer or committer feels this can be resolved in time, or wishes to assume ownership during a specific cycle, feel free to update the milestone accordingly.

Note: See TracTickets for help on using tickets.