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

Remove constrained view in the 2D editor #47628

Merged

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Apr 4, 2021

We initially added an option to disable constraining the 2D editor view. This setting was still enabled by default to avoid confusing users who end up scrolling too far away from their current scene (which is a problem if you don't know about the F key to focus on the selection).

However, it's probably a better choice to unconstrain the 2D editor view by default because:

  • Lots of people don't know about this setting and wonder how they can scroll far away from the scene. This feels really limiting for them, and it can even lead to some people thinking Godot intentionally limits scene sizes.
  • The 3D editor doesn't have such a constrain mechanism. This makes the 2D editor more consistent with the 3D editor.

See also #25616.

@Calinou Calinou added cherrypick:3.x Considered for cherry-picking into a future 3.x release enhancement topic:editor usability labels Apr 4, 2021
@Calinou Calinou added this to the 4.0 milestone Apr 4, 2021
@Calinou Calinou force-pushed the 2d-editor-remove-contrained-view branch from 9fcd738 to c4fa1b3 Compare April 5, 2021 21:51
Copy link
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok. I only ever saw complains (and confusion) about the constrains, so it's good to have them gone. If people won't like this change we can always revert it, but I doubt it will happen.

@pouleyKetchoupp
Copy link
Contributor

This setting was still enabled by default to avoid confusing users who end up scrolling too far away from their current scene (which is a problem if you don't know about the F key to focus on the selection).

Maybe adding a button to focus on the selection, or re-center to the default location could be useful in order to solve the problem of users getting lost far away from the initial location.
I'm not proposing to add it to this PR though, it can be a separate change.

@akien-mga akien-mga requested a review from groud April 6, 2021 07:09
@groud
Copy link
Member

groud commented Apr 6, 2021

As @pouleyKetchoupp mentionned, I still don't like the fact that unzooming a lot, then zooming in an empty area may lead to you screen being lost in a completely empty area, with a very wide distance to scroll to get your content back.

I am against removing the constrained view until we find a proper solution to this problem. And I don't think the the 'F' key shortcut is a valid solution here, it's too much of an unknown shortcut, and is not, IMHO, something users would naturally think as a proper proper way to "go back to my 2D editor working state" button.

Maybe an idea would be to add a "center view to content" button (or something like that), in the corner between the scrollbars? Most likely disabled by default, but if you get lost somewhere it gets enabled. That would make it appear as the "solve my problem button" when you are lost.

@MunWolf
Copy link
Contributor

MunWolf commented May 1, 2023

My 2 cents on this, I have never found constraining the viewport to be useful.
I usually work in an unrestrained viewport and have never got lost or needed a button to get back.

On that front I don't even think a button to recenter the viewport is necessary as you can always double click a node to center on it in the node list.

The only thing the constrained viewport has done for me is make me annoyed when I reinstall godot and have to go find the option again.

We initially added an option to disable constraining the 2D editor view.
This setting was still enabled by default to avoid confusing users
who end up scrolling too far away from their current scene
(which is a problem if you don't know about the F key to focus
on the selection).

However, it's probably a better choice to unconstrain the 2D editor view
by default because:

- Lots of people don't know about this setting and wonder how they
  can scroll far away from the scene. This feels really limiting for them,
  and it can even lead to some people thinking Godot intentionally limits
  scene sizes.
- The 3D editor doesn't have such a contrain mechanism.
  This makes the 2D editor more consistent with the 3D editor.
@Calinou Calinou force-pushed the 2d-editor-remove-contrained-view branch from 188e5eb to 86314e1 Compare May 20, 2023 01:01
@Calinou Calinou requested a review from a team as a code owner May 20, 2023 01:01
@YuriSizov
Copy link
Contributor

I'm not proposing to add it to this PR though, it can be a separate change.

I agree with that. The concern is valid, but I think we can merge this PR as is, and then if centering the view proves to be unintuitive, I'm sure a PR will be made to fix that. I don't think this change makes the issue worse.

I would argue that viewport constraints are the bigger problem out of two right now. I've been making a trailer for my game last year, fully in engine, and needed to pan a long distance in one scene. The constrained view was very much getting in my way, especially given that it was connected to the zoom level, making it very hard.

@groud Do you insist on blocking this PR until we address the centering UX issue or would you agree on pushing this problem to a follow-up PR?

@KoBeWi
Copy link
Member

KoBeWi commented May 31, 2023

By centering UX you mean the center view button, right?

@YuriSizov
Copy link
Contributor

YuriSizov commented May 31, 2023

Do you have more such useful and on-point PRs up your sleeves? 😆

The problem seems to be that @groud is against that PR as well... I would be partial to merging both.

@YuriSizov YuriSizov modified the milestones: 4.x, 4.1 May 31, 2023
@groud
Copy link
Member

groud commented May 31, 2023

I am still not convinced this is better UX, but well, the support for the change seems significant enough for trying it in production, despite my convictions.

So I am ok with merging this PR if we merge Kobewi's PR before.

@YuriSizov YuriSizov merged commit 282f5eb into godotengine:master May 31, 2023
@YuriSizov
Copy link
Contributor

Let's give it a go! Thanks 🙃

@Macksaur
Copy link
Contributor

Macksaur commented Jun 6, 2023

Oh this is a shame. I don't want to see this go, I even fixed the weird crusty behaviour in: #73223

@Calinou Calinou deleted the 2d-editor-remove-contrained-view branch June 7, 2023 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherrypick:3.x Considered for cherry-picking into a future 3.x release enhancement topic:editor usability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants