Skip to content

Views should collapse downwards (fix #126523) #243558

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

gjsjohnmurray
Copy link
Contributor

@gjsjohnmurray gjsjohnmurray commented Mar 14, 2025

This PR fixes #126523

image

junk

@gjsjohnmurray
Copy link
Contributor Author

/assign @benibenj who owns the issue this fixes.

Copy link
Contributor

@benibenj benibenj left a comment

Choose a reason for hiding this comment

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

I did not have a close look at the implementation yet, but I see there is a setting which is being added. I do not think we should add a setting for this. We should think about what the best possible behaviour is and make sure everyone uses that.

@gjsjohnmurray
Copy link
Contributor Author

I'm wary of the fallout that typically arises when behaviour changes without it being an optional change.

@benibenj
Copy link
Contributor

You are right, which is why we should only change the behaviour if we are actually improving it. But for smaller behavioural issues like this, we do not want to add a setting because these are very hard to discover and only a very small amount of users will benefit from it.

@gjsjohnmurray
Copy link
Contributor Author

I've often wished that we could make a change to behaviour behind a setting that defaults to "new way" for new installs of VS Code and to "old way" for existing users. Or better still, produce a little notification the first time an existing user experiences the new behaviour after the update that introduced it, giving them a chance to opt out of the change. In this case, collapsing a view the first time might notify "We now collapse views downward whenever possible. Do you want to revert to the old behavior of collapsing upwards?"

In the absence of such a capability I'm OK to remove the setting on this change if doing that will increase its chances of being merged.

@gjsjohnmurray
Copy link
Contributor Author

I also wondered if Alt+click could offer the opposite behaviour. And maybe a tip on the button hinting at this.

@gjsjohnmurray gjsjohnmurray requested a review from benibenj March 18, 2025 17:17
@benibenj benibenj added this to the April 2025 milestone Mar 24, 2025
@benibenj benibenj changed the title Add workbench.view.collapseDownwards setting (fix #126523) Views should collapse downwards (fix #126523) Apr 7, 2025
@benibenj benibenj modified the milestones: April 2025, Backlog Apr 22, 2025
@benibenj
Copy link
Contributor

I gave this a try but I doesn't really feel better. See how when collapsing a view, the header moves away from the cursor so it's not possible to expand easily again. Also I think it should notice when the user resizes a view to not change the size of that view. I'm not sure how this could be solved without a overcomplicated solution.

@gjsjohnmurray
Copy link
Contributor Author

See how when collapsing a view, the header moves away from the cursor so it's not possible to expand easily again.

A similar thing already happens when expanding a view after having resized the one above it.

junk

And after I do move the mouse to reverse the expansion action it collapses upwards, so I have to drag the split downward again in order to reinstate the larger area of the view above (Explorer in this case).

@gjsjohnmurray
Copy link
Contributor Author

Also currently happens on collapse of the last view:

junk

@gjsjohnmurray
Copy link
Contributor Author

All cases mitigated by being able to use left-arrow key to collapse and right-arrow to expand instead of moving the mouse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure splitview collapse and uncollapse leaves views in the same state
2 participants