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

Always default to creating a new window on open recent #12259

Closed
wants to merge 3 commits into from

Conversation

effdotsh
Copy link
Contributor

Release Notes:

There are three methods of prompting to open a recent project. Using the keyboard shortcut, using the menu bar, and clicking the project name in the top left of the window. Before, clicking the project name would map enter to reusing the current window and while ⌘enter opens the project in a new window, and the other two had the reverse mapping. This PR standardizes all three methods to open a new window by default, and reuse the same window with the command key.

image

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label May 24, 2024
@maxdeviant maxdeviant changed the title Always default to create new window on open rescent Always default to creating a new window on open recent May 24, 2024
@effdotsh effdotsh marked this pull request as draft May 24, 2024 19:31
@effdotsh
Copy link
Contributor Author

Converting to a draft so I can examine the test later

@effdotsh effdotsh marked this pull request as ready for review May 24, 2024 20:05
@effdotsh
Copy link
Contributor Author

Ok it's all good

@RemcoSmitsDev
Copy link
Contributor

I think this change is going to confuse a lot of people, because it behaves different to how most modern applications work. For example, if you look how the browser behaves. If you click a link, it would open it inside the current tab unless someone specified that it should open in a new blank tab. Or, if you want to open it in a new tab your self, you hold the command key while clicking the link.

So changing this would not make sense to me. Feel like this would be a breaking change for a lot of people. It would make more sense if you add a setting to determine this, so the people that would love to opt out the normal behavior can do this just by changing the setting.

@VladasZ
Copy link
Contributor

VladasZ commented May 30, 2024

There is such settings. You need to attach it to key binding.
See Default Key Bindings:

  {
    "context": "Workspace",
    "bindings": {
      // Change the default action on `menu::Confirm` by setting the parameter
      // "alt-cmd-o": [
      //     "projects::OpenRecent",
      //     {
      //         "create_new_window": true
      //     }
      // ]
      "alt-cmd-o": "projects::OpenRecent",

I'm a new zed user and this situation was a bit confusing for me too. At first I tried to find this setting in settings.json but actually it needs to be set in keymap.json.

@RemcoSmitsDev
Copy link
Contributor

I think this PR can be closed in favor of #12525.

@effdotsh
Copy link
Contributor Author

effdotsh commented Jun 3, 2024

Personally, I feel it makes more sense to open in separate windows rather than the current one as a default (easier to close an open window than reopen a project you accidentally closed), but happy to be overruled on that and #12525 makes it configurable.

@effdotsh effdotsh closed this Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Open project behaves inconsistently
4 participants