Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.2/3.3 Deprecations #972

Closed
7 tasks done
dmethvin opened this issue Aug 14, 2016 · 7 comments
Closed
7 tasks done

3.2/3.3 Deprecations #972

dmethvin opened this issue Aug 14, 2016 · 7 comments
Milestone

Comments

@dmethvin
Copy link
Member

dmethvin commented Aug 14, 2016

Similar to #970 this is the rollup of all the deprecations planned for jQuery 3.2 and 3.3 to be sure we don't miss any. We have tickets in the Core tracker for these and a few have their own docs tickets already.

jQuery 3.2

jQuery 3.3

For the event shorthand methods (.click(), .mousemove(), etc.) I think we should use the current API entries and explain that .click() is now best done as .on("click", fn) or .trigger("click"). However let's just rewrite the examples and discussion in those pages to use .on() or .trigger() and describe the behavior of the event since I think people still want/need those event-specific details.

@Krinkle
Copy link
Member

Krinkle commented Sep 30, 2017

For the record, this should include .hover() as well. Noting it here because from the above list and in jquery/jquery#3214, this wasn't explicitly mentioned because hover() is slightly different from the other on/trigger shortcuts.

@mgol
Copy link
Member

mgol commented Feb 6, 2018

From the Dave's list only jQuery.holdReady was deprecated in 3.2.0; the rest was deprecated in 3.3.0. Should we morph this ticket or fork another one for 3.3.0?

@dmethvin
Copy link
Member Author

dmethvin commented Feb 6, 2018

There's history in this one, I'll just edit it.

@dmethvin dmethvin changed the title 3.2 Deprecations 3.2/3.3 Deprecations Feb 6, 2018
mgol added a commit to mgol/api.jquery.com that referenced this issue Apr 20, 2020
@mgol mgol added this to the 3.0.0 milestone Apr 20, 2020
mgol added a commit to mgol/api.jquery.com that referenced this issue Apr 23, 2020
mgol added a commit to mgol/api.jquery.com that referenced this issue Apr 29, 2020
mgol added a commit that referenced this issue Apr 29, 2020
Fixes #947
Fixes #949
Fixes #950
Fixes #1142
Ref #970
Ref #972
Closes #1160
@mgol
Copy link
Member

mgol commented Apr 29, 2020

Most of the issues for recent jQueries have been handled in #1160. There are three left. The first is event shorthand methods; this is a bit tricky as the pages also serve as event descriptions. We could go by what @dmethvin suggested & just rewrite those pages, noting the deprecated signatures but generally using the full ones in the description.

The other two:

are not technically deprecated, though, it seems - they were never mentioned in a jQuery release blog post. If we want to deprecate, let's try to do it in jQuery 3.6.0. I'll create dedicated issues for them soon.

@dmethvin
Copy link
Member Author

dmethvin commented May 9, 2020

It would be good to deprecate both of those for 4.0.

We can easily patch .hover() in Migrate and anyway I really dislike the behavior in apps that immediately acts as a mouse accidentally swishes over an element with a .hover() handler. It's a really bad UX and something like .hoverIntent() is better.

On jQuery.event.which we can just have it pass through whatever the native browser does. Although its use is discouraged it is still supported and probably will be forever so it won't "break the web".

rodrigoprimo added a commit to woocommerce/woocommerce that referenced this issue Nov 18, 2020
This commit replaces all instances in WooCommerce codebase (except included third-party libraries) where jQuery.fn.click( handler ) event shorthand was used. This shorthand was deprecated in jQuery 3.3 (see jquery/jquery#3214). The jQuery documentation was not updated yet (see jquery/jquery-migrate#288 and jquery/api.jquery.com#972).

jQuery.click() was not deprecated and so it was not replaced.
rodrigoprimo added a commit to woocommerce/woocommerce that referenced this issue Nov 18, 2020
This commit replaces all instances in WooCommerce codebase (except included third-party libraries) where jQuery.fn.click( handler ) event shorthand was used. This shorthand was deprecated in jQuery 3.3 (see jquery/jquery#3214). The jQuery documentation was not updated yet (see jquery/jquery-migrate#288 and jquery/api.jquery.com#972).

jQuery.click() was not deprecated and so it was not replaced.
@nestedsoftware
Copy link

nestedsoftware commented Jan 12, 2021

Event shorthand methods (see below)
For the event shorthand methods (.click(), .mousemove(), etc.) I think we should use the current API entries and explain that .click() is now best done as .on("click", fn) or .trigger("click").

From the quoted text above, it is a bit unclear to me whether the intent is to mark these with a deprecation flag for 3.x or not. Would appreciate clarification - i.e. if it is preferred to not use the shorthand notation, that is one thing. If they will be marked as deprecated, then I take that to mean this functionality is expected to be removed in the next major version. Or, if these aliases are to be marked as deprecated, but the intent is to keep the aliases around even in jquery 4, I'd appreciate it if that is made clear as well. We are in the process of doing a jquery migration, and it would be helpful just to know exactly what decision has been made in this regard.

tagliala pushed a commit to timokae/data-confirm-modal that referenced this issue May 1, 2021
`focus` and `delegate` have been deprecated respectively in jQuery 3.3.0
and 3.0.0

This commit replaces `focus` with `trigger` (available since v1.0.0) and
`delegate` with `on` (available since v1.7.0)

Ref:
- https://api.jquery.com/category/deprecated/deprecated-3.0/
- jquery/api.jquery.com#972
tagliala pushed a commit to timokae/data-confirm-modal that referenced this issue May 1, 2021
`focus` and `delegate` have been deprecated respectively in jQuery 3.3.0
and 3.0.0

This commit replaces `focus` with `trigger` (available since v1.0.0) and
`delegate` with `on` (available since v1.7.0)

Ref:
- https://api.jquery.com/category/deprecated/deprecated-3.0/
- jquery/api.jquery.com#972
@mgol
Copy link
Member

mgol commented Apr 24, 2023

Everything here has now been documented. I've also verified all deprecated APIs from 3.4-3.6 have also been documented. Closing!

@mgol mgol closed this as completed Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants