-
Notifications
You must be signed in to change notification settings - Fork 264
jQuery.boxModel should be listed as removed #451
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
jQuery.boxModel should be listed as removed #451
Conversation
That's true, thanks for noticing! We should also remove the example as it's no longer working (and we shouldn't make obsolete APIs easier to use).
The whole jQuery.support API is subject to change wherever the jQuery team needs; this interface shouldn't be relied on which is clearly stated in the docs. Therefore, I don't think we should document anything about removing a specific property; note that recently we switched some of properties to functions; also, the 2.x branch has way more properties than the 1.x branch so we don't even have API parity here. To be honest, I'd prefer to unpublish
The second point could perhaps be addressed differently than just by exposing the API; the first could be changed to just export an empty object to which other libs can attach properties (or they could conditionally create it if it doesn't exist). Anyway, nothing to document here IMO. |
I only meant the parenthetical part of the deprecation notice in the So, no new documentation to add (for |
Ah, this, you're right. :) Do you maybe want to submit a pull request with all these changes? |
This removes all internal uses of jQuery.support.boxModel. jQuery has never run unit tests with Quirks Mode and has not even feigned support for several years, so these remnants weren't doing much except giving false hope. For now, jQuery.support.boxModel continues to have a value indicating whether the W3C box model is generally in use, but be aware that this is easily overridden on an element-by-element basis by the box-model CSS property. So don't trust this value. |
What do you mean? |
@mzgol Sure, I can probably put in a pull request sometime in the next few days. :] Also, I think @JonathanThiyagarajan means to say that the box-sizing CSS property could be set for some elements, so certain common use cases for Still, I think it's better to recommend feature detection than to continue to point to |
We should not discourage using |
@mzgol Is there an extra "not" in your comment, or should "not only" be "only not"? It sounds like you now don't want me to remove the reference to |
@mzgol, Its not advisable to use when it can easily overridden, so its your Call |
Sorry if I was confusing. :) I meant that we should never encourage using |
@mzgol Ok, that makes more sense, thanks. :] I assume that should be two separate PRs? |
@usmonster It makes sense to do it all in one PR/commit so if you find more of them, feel free to make all the changes together. |
I'm not sure about Mobile, but UI doesn't rely on any support tests from core. We do rely on |
@mzgol A quick grep shows no other encouragements to use In view of @scottgonzalez's comment and your desire to unpublish |
It's definitely an oversight that |
mobile uses it the same as ui we only rely on it existing to add our own properties |
Those are separate issues; we can expose an empty object in jQuery.support and keep our support tests results in a private place. That was my initial attempt; I've changed it to be able to test it and to limit changes done in 1.11/2.1 but if it can be done differently, I'd be in favor of returning to that previous solution. |
On second glance, a couple of the examples in And just a recap of what I understand is wanted for the pull request:
Unclear:
Please advise. |
A quick grep shows no other encouragements to use jQuery.support exist. OK, this PR is meant to be mostly about And just a recap of what I understand is wanted for the pull request: * List `jQuery.boxModel` as removed (in 1.9) * In same doc, add note to use feature detection instead Is that really needed? What's the use case of * In same doc, remove parenthetical reference to `jQuery.support` +1 * List `jQuery.support` as deprecated (in 1.11? please verify)
Unclear: * Remove all examples from newly-deprecated `jQuery.boxModel` doc? (I'd actually argue against it) Yes, definitely remove. Both examples are mostly useless and the live one doesn't even work. They both should be removed. * One of these?: 1. Remove/rewrite examples in `jQuery.cssHooks` to not use `jQuery.support`? Yes, but in a separate PR which will generally discourage using 2. Add a note in the doc for `jQuery.support` to say that is it "an empty object that can be used for blabla see `jQuery.cssHooks` for an example" or sumesuch? No, that's not needed, we don't want to formalize using an empty object or whatever will be used (and we haven't even discussed it yet in the team), we just want no one to rely on its existence at all. |
Third party code.
Unless we want to eventually remove the property altogether. |
OK, in that case let's deprecate it! |
Hooray for deprecating I'll also go ahead and add the note to use feature detection in place of Thanks for the quick responses! |
@mzgol in your comment you wrote
isn't the other way around (1.X has more properties than 2.X)? For example 1.X has ownLast, inlineBlockNeedsLayout, and deleteExpando that 2.X doesn't have. |
Yes, I got it backwards, sorry. :) Michał Gołębiowski |
This good to merge? |
@usmonster: looks good to me. I'll merge. thanks for the ping. |
Closed by e708998 |
jQuery.boxModel
was removed in 1.8. There should probably be a note in the doc to this effect, similar to what's in the doc forjQuery.browser
:Possibly also add this to the "Removed" category?
jQuery.support.boxModel
was also removed in 1.10, so perhaps the reference tojQuery.support
should also be removed from theboxModel
doc.