-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Resizable: Fix issue with border-box #1563
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
Resizable: Fix issue with border-box #1563
Conversation
Fixes #8932
@munkex The current PR is meant to be merged into master, so it will be available for all future builds. Unfortunately it is not merged yet, the complete lack of interest of the maintainers for this (2 years) old bug and (3 months) old PR, made me switch do a different library and remove jquery-ui dependency completely from my project. I recommend you to take a look here: https://github.com/taye/interact.js |
@razvanphp Great fix and thanks for trying to get it in. Should be merged asap. |
Thank you for the (adapted) contribution. Could you add a unit test, that covers the described border-box case? |
Is this fix going to be part of 1.12 release ? |
@jlowcs only if this PR (or a replacement) gets merged in time, which depends on someone writing a unit test, as mentioned above. Would you be interested in helping out with that? |
Is this going to be merged into 1.12? |
@monsterlane Please read the existing comments which state the requirements (we're waiting on a unit test). There is no chance of this being included in 1.12.0 at this point because we're already in the RC phase of the release process. |
Interact.js is starting to look better by the minute. It's pretty sad that someone took their personal time to fix a 2y old bug in your code and someone from your team can't write a unit test for it when multiple people have said the fix would be useful to them. |
Do you realize that you're asking someone from the team to take their personal time to write the unit test? |
That's exactly what I wrote isn't it? If you're happy with the way this issue is being handled I'll join @razvanphp and start planning my migration away from your library. |
I'm not happy that issues stay open for years. What I'm trying to explain to you is that there is no magic here. There's not some team employed by a company to write all this code. There's not some group of developers that have unlimited time to work on these projects. Your complaint is that you don't want to take your personal time to write the needed code, but that some other person should be required to spend their personal time writing the needed code. Interestingly, what happens here is that you get angry that someone devoted enough time to fixing bugs and implementing features that they now have commit access, but they haven't devoted time to this one specific bug. I could turn this around and say that it's sad that so many people want this but none of them are willing to write a unit test for it. |
I have no idea how to write a unit test and frankly almost every interaction I've had with your team has been met with disdain. Link me a guide on how to write a unit test for your library and I'll give it a shot. |
@monsterlane If you felt disdain from our side i'm sorry that was certainly never our intention and i can assure you was not @scottgonzalez intention here. You must however realize your comments were very aggressive in nature when dealing with an all volunteer team. We will be happy to help and point you in the right direction to write a test. For all our unit tests are written using QUnit https://qunitjs.com/. We also use jQuery Simulate when needed https://github.com/jquery/jquery-simulate. You can see our current tests for resizable here https://github.com/jquery/jquery-ui/tree/master/tests/unit/resizable they may be usefull for inspiration. If you need any further help with this your best bet is probably to catch us on IRC in #jqueryui-dev |
@monsterlane also if you working on the test, this PR needs to be rebased against current master it currently conflicts. |
I apologize if my comments came off as aggressive. I've spoken with several of your members over Twitter and if you'd read those threads you'd understand why. I've tried to help in the past and I will give this a shot, but I'm not convinced it won't be rejected for some asinine reason as my attempts in the past were as well. That's why I didn't offer to help initially. I understand you have high standards, and you should, but it often seems if someone from your foundation doesn't do it you won't accept anything else. Since this issue only exists when a certain CSS rule is applied to the resizable container where is the best place to apply that rule without effecting the other tests? This change applies changes to resizing and alsoResize, are those the only set of tests I need to recreate with the additional CSS rule? |
@monsterlane I would setup a new qunit |
Thanks. |
When you say new module, do you mean a new file? Or what file would this go in? Is this similar to what you're looking for? I'll include all the related ones if this is the correct format.
|
@monsterlane no by module i mean the As for the code pasted parts of it look essentially right however the |
For a single test of |
@arschmitz I've added this to the bottom of the core file, is this correct? Or should I use the stacking format?
Which tests do you want for this? Looking at the list these are the ones I was thinking you'd want: n, s, e, w, ne, se, sw, nw, alsoResize. Since I didn't create this PR I can't rebase it. I can send a new PR off master, when I do so how can I credit the original author of this patch? |
@monsterlane That is exactly what i was talking about. Do you think we need each of the handle options since there is no change in the logic for this bit based on which handle? I think a resize one makes sense though. At this point it would probably make sense for you to fork this PR and submit a new PR including your test so we can properly review and comment on lines. Just make sure to reference this PR in your new PR You don't need to worry about crediting them because you wont change the author of the original commits just add your own ( this PR is infact an updated version of yet someone else's PR ) Just make sure you reference this PR in your commit message and in your description when you open the PR and your good. |
@arschmitz ok I can do that. When I added the resize test it failed (width vs outerWidth) I'll need to make a few other changes before I submit an updated PR. Thanks for your help with this. |
@arschmitz sorry for the delay, I'm a bit confused by this bit of code in _mouseStart:
Why is it comparing the outerWidth to width to detect if the element has changed size? |
We're moving to https://github.com/taye/interact.js as well. Our team is tired of hacking patches into jQuery UI for bugs that don't seem important to contributors of this project. I understand contributors are donating their personal time to work on this but the lack of communication is impeding our ability to move forward. |
@monsterlane I apologize for missing your update here i some how just missed that you had left a new comment. Im sorry your frustrated and feel the need to move to a different lib but am still happy to help you with this patch if you are interested. Just post back if you are and ill get you any information or help you need. If you do have a question and I don't respond in a day or so feel free to ping again to make sure i don't miss it I get hundreds of github emails a day and its easy for one to fall through the cracks sometimes. |
Closing due to inactivity. |
jQuery policy: ignore & keep PR open until it's old enough to get closed unfixed. |
@razvanphp yep. How are you liking Interact? We're loving it. Instead of having to redefine core methods to change functionality like we did with jQuery UI (draggable on a zoomed element for example) we can define our own move/rotate handlers and Interact manages the gestures. As of today we've officially removed all of jQuery UI from our develop branch. Bootstrap + plugins, Interact.js, Sortable.js, Typeahead.js, and I wrote our own version of Selectable. |
This is a duplicate of PR #1451, due to lack of CLA signing success.
If you apply .resizeable() to an element which has border-box sizing and
this element has a border then the container will "shrink" by this
border size immediately as the resizing drag begins.
Unit tests all passing. Thank you @ilanc
Fixes #8932