WordPress.org

Make WordPress Core

Opened 5 months ago

Last modified 11 days ago

#52163 new task (blessed)

Updating jQuery UI for jQuery 3.x

Reported by: Clorith Owned by:
Milestone: 5.8 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 (9)

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


5 months ago

#2 in reply to: ↑ description @Hareesh Pillai
5 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 follow-up: @Clorith
4 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.


4 months ago

#5 @hellofromTonya
4 months 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.

#6 @Clorith
7 weeks ago

  • Milestone changed from Future Release to 5.8

Moving this to the 5.8 milestone for tracking purposes.

Checked in with a jQuery UI maintainer, and it seems the new release should be ready at a decent time before 5.8 is planned, so that we get a chance to test and make changes if needed.

#7 in reply to: ↑ 3 @Hareesh Pillai
3 weeks ago

Replying to Clorith:

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.

Thanks for the very detailed explanation, @Clorith. :)

To move this forward, I believe now would be the right time to decide if we're going to bundle directly from source or wait for the release.

This ticket was mentioned in Slack in #core by hareesh-pillai. View the logs.


12 days ago

#9 @Clorith
11 days ago

We're waiting on the next jQuery UI release here, which should land before beta, but we'll need to reassess when the release is ready if we are comfortable including it in 5.8 or not.

As it stands, since the repository for the next version is still changing, I don't think it's reasonable to build from source on our own at this time, when we can make do with one more release of jQuery Migrate being enabled by default. Although this puts us in the same situation we were previously of pushing it ahead of us, there's a more definitive plan at least now of turning it off as soon as the next jQuery UI is available, which makes me more comfortable pushing it one final time.

If anyone on the JavaScript focus area have thoughts on this, I'll happily bow to their expertise in the field though, these are just my immediate thoughts on it.

Note: See TracTickets for help on using tickets.