WordPress.org

Make WordPress Core

Opened 9 months ago

Last modified 6 hours ago

#52163 new task (blessed)

Updating jQuery UI for jQuery 3.x

Reported by: Clorith Owned by:
Milestone: 5.9 Priority: normal
Severity: normal Version:
Component: External Libraries Keywords: early has-patch
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 (21)

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


9 months ago

#2 in reply to: ↑ description @Hareesh Pillai
9 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
8 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.


8 months ago

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


4 months ago

#9 @Clorith
4 months 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.

#10 @azaozz
4 months ago

Chatting with @Clorith (see https://wordpress.slack.com/archives/C02RQBWTW/p1622064359071100) thinking it may be a good idea to move this to 5.9 early. The new UI version should be released by then. There is also a new jQuery version (only minor changes).

Seems it would be best if both can be tested and updated at the same time. Planning to update the Test jQuery Updates plugin to make that easier.

#11 @JeffPaul
3 months ago

  • Milestone changed from 5.8 to 5.9

Agreed, moving to 5.9.

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


7 weeks ago

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


2 weeks ago

#14 @mgol
7 days ago

Hey, we've just released jQuery UI 1.13.0-rc.2. It's close to the 1.13.0-alpha.1 that I shared with @Clorith previously. Compared to the alpha, the release mostly contains fixes to the built file published to the CDN but as I understand you're building jQuery UI by yourself so those issues shouldn't affect you anyway.

Let me know (here or on Slack) if there are any issues affecting WordPress. If nothing serious gets discovered, we'll publish the final version in a couple of weeks.

Link to the blog post: https://blog.jqueryui.com/2021/09/jquery-ui-1-13-0-rc-2-released/

Last edited 7 days ago by mgol (previous) (diff)

#15 follow-up: @Clorith
4 days ago

Excellent, I did initial testing with alpha1 over summer, and nothing in core appeared broken from it.

I think we could throw in the jQuery UI rc-2 to trunk and allow for other developers to start testing at this point, what do you think @azaozz? That is, if we are confident that jQuery UI will be fully released before WordPress 5.9's beta-1, tentatively planned for November 16th, do you think that's reasonable @mgol?

If we do this, and get out a dev-note at the same time, we can ensure a decent amount of time for plugin and theme authors to test if needed, although there does not appear to be any major changes that I foresee as breaking.

#16 in reply to: ↑ 15 ; follow-up: @mgol
4 days ago

Replying to Clorith:

I think we could throw in the jQuery UI rc-2 to trunk and allow for other developers to start testing at this point, what do you think @azaozz? That is, if we are confident that jQuery UI will be fully released before WordPress 5.9's beta-1, tentatively planned for November 16th, do you think that's reasonable @mgol?

Yes, jQuery UI should generally be ready for a final release; I just wanted to give folks some time to test & possibly report critical issues that may have escaped our testing. If nothing too serious & hard to fix gets reported, we're aiming at the final release in about a month, at the beginning of October.

If you could get a serious number of people to test the RC via WordPress, that'd be awesome; we'd get more confidence about the release.

(most changes in 1.13 are internal refactors, compat with recent jQuery versions, removing deprecated API usage so that jQuery Migrate doesn't complain, etc.)

#17 in reply to: ↑ 16 @azaozz
4 days ago

Replying to mgol:

Replying to Clorith:

I think we could throw in the jQuery UI rc-2 to trunk...

Yes, jQuery UI should generally be ready for a final release;

Great! Lets do it :)

Seems the build script will need a bit more tweaks so it combines core.js only and leaves the rest as-is (so we can keep the optimized loading with script-loader). I'll figure it out.

If you could get a serious number of people to test the RC via WordPress, that'd be awesome; we'd get more confidence about the release.

Not sure how fast that would be as we're at the beginning of the WP 5.9 dev. cycle (not many plugins devs look at what's coming yet), but we'll try.

This ticket was mentioned in PR #1662 on WordPress/wordpress-develop by azaozz.


2 days ago

  • Keywords has-patch added

Update jQuery UI to 1.13.0-rc2

Trac ticket: https://core.trac.wordpress.org/ticket/52163

#19 @prbot
2 days ago

azaozz commented on PR #1662:

All seems to be working as expected here, also (kind of) adapted the UI tests and they pass. Perhaps should just commit this now and try to get more people to test.

#20 @prbot
2 days ago

Clorith commented on PR #1662:

I'm confident in the idea to commit now and get folks to test. This will also make it easier to distinguish which 3rd party libs may still have deprecations, as they won't be hidden by potential jQuery UI warnings.

#21 @azaozz
6 hours ago

In 51794:

External Libraries: Update jQuery UI to 1.13.0-rc2.

The final release is expected at the beginning of October. Updating to rc2 now gives everybody plenty of time to test and report any issues either with UI 1.13.0 or with the WordPress implementation.

Props Clorith, mgol, azaozz.
See #52163.

Note: See TracTickets for help on using tickets.