Make WordPress Core

Opened 8 months ago

Last modified 8 weeks ago

#60478 new enhancement

Upgrade to JQuery 4

Reported by: nickchomey's profile nickchomey Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: External Libraries Keywords: needs-patch
Focuses: javascript, performance Cc:

Description

JQuery just released a beta version of jQuery v4. Is this something that wp core will be looking to implement?

https://blog.jquery.com/2024/02/06/jquery-4-0-0-beta/

Change History (29)

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


8 months ago

#2 @mgol
8 months ago

#60511 was marked as a duplicate.

#3 @swissspidy
8 months ago

  • Severity changed from critical to normal

#4 follow-up: @swissspidy
8 months ago

@azaozz Maybe something for the https://wordpress.org/plugins/wp-jquery-update-test/ plugin?

#5 in reply to: ↑ 4 @azaozz
8 months ago

  • Milestone changed from Awaiting Review to Future Release

Is this something that wp core will be looking to implement?

Of course :)

Replying to swissspidy:

Maybe something for the https://wordpress.org/plugins/wp-jquery-update-test/ plugin?

Yep, thinking the test plugin can be updated for WP 6.5 (currently in beta). Then try to time the update to jQuery 4.0 depending on when it is released.

Last edited 8 months ago by azaozz (previous) (diff)

#6 @firoz2456
8 months ago

The https://wordpress.org/plugins/wp-jquery-update-test/ plugin is not compatible with newer versions of WordPress; it is only compatible with WordPress 5.6 and earlier versions.
Does anyone have suggestions on how to test it with jQuery 4.0.0 BETA?

This ticket was mentioned in PR #6304 on WordPress/wordpress-develop by @adamsilverstein.


7 months ago
#7

  • Keywords has-patch has-unit-tests added

Trac ticket:

@adamsilverstein commented on PR #6304:


7 months ago
#8

All tests pass here despite having removed utf8_encode, which is unexpected. is it possible this encoding is no longer required?

#9 @adamsilverstein
7 months ago

  • Focuses performance added

#10 @adamsilverstein
7 months ago

Adding the performance tag, noting that the new jQuery version touts some performance benefits, including a "slim" version with a smaller size. https://blog.jquery.com/2024/02/06/jquery-4-0-0-beta/

This ticket was mentioned in Slack in #core-performance by mukeshpanchal27. View the logs.


6 months ago

#12 @mukesh27
6 months ago

  • Keywords needs-patch added; has-patch has-unit-tests removed

#13 @adamsilverstein
6 months ago

Note the linked PR above is not related to this ticket, I'm not sure how it got linked and can't seem to remove the linkage.

This ticket was mentioned in Slack in #core-performance by mukeshpanchal27. View the logs.


5 months ago

#15 follow-up: @adamsilverstein
5 months ago

@azaozz Maybe something for the https://wordpress.org/plugins/wp-jquery-update-test/ plugin?

I opened this issue to track adding support in the wp-jquery-update-test plugin.

Last edited 5 months ago by adamsilverstein (previous) (diff)

#16 in reply to: ↑ 15 @azaozz
5 months ago

Replying to adamsilverstein:

Thanks. Yea, lets update the plugin for WP 6.5+. Seems it will only need to replace the bundled version of jQuery.

Somewhat unsure if jQuery 4.0 beta supports Migrate 3.4.1 and UI 1.13.2, or these will have to be updated too (when updates are available). Still good to update the test plugin imho.

Last edited 5 months ago by azaozz (previous) (diff)

#17 @azaozz
5 months ago

@adamsilverstein Updated the test plugin: https://github.com/WordPress/wp-jquery-update-test, could you have a look too if you get a chance :)

Also did some quick testing with jQuery 4.0.0-beta in wp-admin and everything seems to be working well. If all seems okay with the test plugin the next step would be to publish on make/core and invite (a lot) more testing.

#18 @azaozz
4 months ago

Been seeing this bug in jQuery Migrate https://github.com/jquery/jquery-migrate/issues/495 quite a bit recently jQuery.expr.match.bool is undefined. It is patched upstream but there's no new Migrate release yet. As WP depends on running jQuery Migrate, thinking to release the test plugin with a new version of Migrate so the people that will test jQuery 4 in WP don't run into it.

#19 follow-up: @mgol
4 months ago

@azaozz thanks for the reminder. I’m on vacation now but I’ll remember to release a new Migrate on early July when I’m back.

#20 in reply to: ↑ 19 @azaozz
4 months ago

Replying to mgol:

Great, thank you!

#21 follow-up: @mgol
3 months ago

@azaozz jQuery Migrate 3.5.0 has been released: https://github.com/jquery/jquery-migrate/releases/tag/3.5.0

#22 in reply to: ↑ 21 @azaozz
3 months ago

Replying to mgol:

Thanks for the ping! Will update the WP test plugin asap.

#23 @azaozz
3 months ago

Updated the test plugin.

@adamsilverstein Could you have a quick look if I haven't missed anything. Thinking to release it as soon as WP 6.6 is out.

Last edited 3 months ago by azaozz (previous) (diff)

#24 @adamsilverstein
3 months ago

Updated the test plugin.

Excellent, thank you @azaozz! I'll take a look.

#25 follow-up: @adamsilverstein
3 months ago

All of the readme and base class updates look good, I'm happy to try some testing, but I think its fine to release and get wider testing at this point so we can see how smooth upgrading goes for people.

#26 in reply to: ↑ 25 @azaozz
3 months ago

Replying to adamsilverstein:

Great! Thanks for having a look. Will release it in couple of days, as soon as WP 6.6 is out.

#27 @azaozz
3 months ago

Testing plugin released: https://wordpress.org/plugins/wp-jquery-update-test/. Please install it and test!

#28 @swissspidy
3 months ago

The second beta of jQuery 4.0.0 has been released: https://blog.jquery.com/2024/07/17/second-beta-of-jquery-4-0-0/

Note the changed handling of boolean attributes, that’s the most risky change in this release compared to the previous beta.

#29 @azaozz
8 weeks ago

The second beta of jQuery 4.0.0 has been released:

Yep, updated the testing plugin to include it and the latest jQuery Migrate. Also posted to make/core: https://make.wordpress.org/core/2024/08/23/updating-jquery-shipped-with-wordpress-to-version-4-0/

Note: See TracTickets for help on using tickets.