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

Closing a dirty split editor (existing OR untitled) should not affect the initial editor #8983

Closed
HookyQR opened this issue Jul 8, 2016 · 10 comments
Assignees
Labels
ux User experience issues verified Verification succeeded workbench-tabs VS Code editor tab issues
Milestone

Comments

@HookyQR
Copy link
Contributor

HookyQR commented Jul 8, 2016

  • VSCode Version: 1.3.0
  • OS Version: OSX 10.11.5

Steps to Reproduce:

  1. Open (or create) a file.
  2. Split the editor.
  3. Add some text in either editor.
  4. Close either editor.
  5. Select "Don't save" when prompted.

There are two end states produced by these steps:

When an existing file is used

The other editor remains, but the text is reverted to the state on disc.

When a file is created

The other editor is also closed.

@bpasero
Copy link
Member

bpasero commented Jul 9, 2016

This is interesting. In ST you can close the dirty one and the other one remains dirty. In Atom, they actually allow you to close a dirty one without being prompted.

@stevencl @bgashler1 fyi, I do like our current behaviour and would not change it though.

@bpasero bpasero changed the title Closing a dirty editor - without saving - resets other editors with the same file Closing a dirty split editor should not affect the initial editor Jul 9, 2016
@bpasero bpasero added feature-request Request for new features or functionality ux User experience issues workbench-tabs VS Code editor tab issues labels Jul 9, 2016
@bpasero bpasero added this to the Backlog milestone Jul 9, 2016
@bpasero bpasero self-assigned this Jul 9, 2016
@bpasero
Copy link
Member

bpasero commented Jul 9, 2016

@stevencl and interestingly, VS also does not ask to save when closing the second dirty editor! maybe we should revisit this :)?

@zbjornson
Copy link

@bpasero bpasero modified the milestones: August 2016, Backlog Jul 12, 2016
@bgashler1
Copy link
Contributor

I remember initially suggesting not prompting if there is another dirty editor still open, but we hypothesized that users would be afraid they lost changes if there wasn't a prompt every time, no matter how many instances are open.

@bpasero I think it would be good to revisit this in light of user feedback that's coming in. Let's put this on the UX agenda for when @stevencl is back. I know he will want to have a say in this.

@bpasero
Copy link
Member

bpasero commented Jul 13, 2016

Yes, 👍

@bpasero bpasero changed the title Closing a dirty split editor should not affect the initial editor Closing a dirty split editor (existing OR untitled) should not affect the initial editor Jul 13, 2016
@mysticatea
Copy link

For what it's worth, I'm surprised that I have lost my editing...

lost

@stevencl
Copy link
Member

Thanks for the feedback. I agree, the current behaviour for closing split editors needs a little finessing.

We have a couple of options:

  1. Don't prompt when the user closes a dirty split editor. Only prompt when the user closes the initial editor (when dirty).
  2. Prompt, but preserve the state in the initial editor if the user chooses 'don't save'. We would need to change the text on the dialog so that it doesn't say that the changes will be lost.

Whichever option we choose, the behaviour should be the same regardless of whether or not the file exists on disk or if the user is editing an untitled file.

@zbjornson
Copy link

Option 1 is closer to what it was before tabs I think: no matter what, if you closed an editor there would be no prompt, the file would remain open in the sidebar, right?

@bgashler1
Copy link
Contributor

UX meeting notes:
We agree that we should no longer prompt users to save when they close a dirty editor if there is another duplicate editor still open. However, we will wait until the August milestone to get one last team member’s feedback before making the change.

@bpasero bpasero closed this as completed in b59f466 Aug 9, 2016
@bpasero
Copy link
Member

bpasero commented Aug 9, 2016

Pushed a change to not ask for saving when the editor to close is opened in another group. This should work for all our actions that close editors (close all, close group, close editor, etc.)

@bpasero bpasero added verification-needed Verification of issue is requested and removed feature-request Request for new features or functionality labels Aug 16, 2016
@bgashler1 bgashler1 added verified Verification succeeded and removed verification-needed Verification of issue is requested labels Aug 31, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ux User experience issues verified Verification succeeded workbench-tabs VS Code editor tab issues
Projects
None yet
Development

No branches or pull requests

6 participants