-
-
Couldn't load subscription status.
- Fork 23.5k
[3.x] CanvasItemEditor: Fix snapping grid misalignment #99922
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
base: 3.x
Are you sure you want to change the base?
Conversation
|
Could this not be cherry-picked automatically? We normally cherry pick to older branches in batches when appropriate |
I didn't know automatic cherry-picking was a thing? 😄 (Work-around is to edit the editstate.cfg of the scene manually, but that becomes cumbersome fast.) |
|
Cherry picking as in But see the comment on the original PR for this #70428 (comment) You also have to credit the original author, see adding co-authors |
(cherry picked from commit 7e22093) Co-authored-by: MrPhnix <76911907+MrPhnix@users.noreply.github.com>
5b1f457 to
e349811
Compare
Yeah, I used the cherry-pick command to cherry-pick the original commit from @phnix-dev. |
|
I had a little look at this yesterday with the view of moving this along, i.e. how to address the regression. I'm not super familiar with the area so had to read some of the previous topics. imo this PR should have a lot more information describing the original problem, why the PR doing the regression was introduced, and then more consideration in the PR "fixing" the regression (which this attempts to cherry pick). It is understandable to some extent given that this is a cherry pick not written by the original author @phnix-dev . But I would like some more input from the original author / other 2d contributors and possibly @timothyqiu who cherry picked as he may be more familiar. If I am correct in assessing the situation:
I can see that this has been the pattern in master, but we are generally a lot more conservative in 3.x as backward compatibility is paramount. My concerns are that #65101 could potentially have created more than just 1 regression, in not just the editor, but potentially also in user projects, and we could end up in a "whack-a-mole" situation trying to fix these. This is feasible in 4.x, which has lots of testing and rapid change, but not so feasible in 3.x, which is in LTS and people are expecting existing code to work "as is". So rather than just merging this fix, we have a potential choice between this, and simply reverting the original PR #65101 and living with the pre-existing bug (which I'm assuming has existed for years without a report, so is not major). These regressions do appear to be more major. With a revert, we then have the opportunity for a new PR re-applying, but also fully considering all possible regressions, which ideally should have been the situation before merging the first PR. Anyway, I'm not an expert here, just speaking from the responsibility of trying to keep the branch as stable as possible, and it may be that this can be guaranteed to be the only regression, but I think we should hear that from the author @phnix-dev . UpdateHaving looked some more, I'm now tending towards thinking the original PR introducing the regressions (#65101 ) was likely a mistake, and the old version was better. The reason is that a step in a control would normally be expected to orientate around zero (or is easier to understand that way). Orientating it around a minimum value (which is arbitrary) will create hard to predict side effects as seen in the regressions. So I'm now leaning towards reverting #65101 (in 3.x). I'll bring this up in rocketchat to discuss in |
|
I think the intention is to only allow input to be The original There is always an ambiguity when the min in the property hint is not divisible by step. For example, should the property hint |
|
But in turn this means that fractional minimums are no longer viable in a lot of cases.
Now as I understand it, that is no longer possible? The other major concern is that this is not backward compatible, not just in the engine, but in third party code. The backward compatibility is my major concern here. 🤔 Really to add what is a new ability, I wonder if we should try and add in a backward compatible way, such as introducing an additional "shift" for the range:
This is a little more to think about, but retains backward compatibility and is flexible for both cases, and likely in most cases the shift would not be used. |
For property hints, using The number is arbitrarily chosen and only works in the inspector. To avoid zero seriously, it should be checked in the setter, then the inspector is zero-free automatically. Update: I guess reverting that PR might be easier than updating related hints indeed. |
Yes, I do worry that this could be a rat's nest and difficult to find all cases, and then we have third party addons / modules etc to consider. And the "primary directive" for 3.x is as an LTS version - we should try and introduce new features / enhancements in a non-breaking way wherever possible. I have no objections to adding it in a backward compatible way, but maybe that would be more appropriate as a new PR starting from the old working state. Anyway we can leave this open for discussion so everyone interested can chime in on the best way to address (I certainly don't want to be making any unilateral decisions), there's no hurry until we are planning an imminent 3.6 point release. This probably does warrant a point release as the 2d snapping grid is the most major bug so far afaik, but we should make sure any other possible pending bugs are fixed too. |
|
Hello 👋, I am the one who made this PR (#65101) |
Cherry-picks changes from #70428 to Godot 3.X.
Bugsquad edit
Fixes #98466
Grid alignment is horrible broken in Godot 3.X and needs to be fixed asap, especially for pixelart games in which grid alignment is crucial.