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

No more are you sure boxes #4101

Merged
12 commits merged into from
Jan 31, 2020
Merged

No more are you sure boxes #4101

12 commits merged into from
Jan 31, 2020

Conversation

rstat1
Copy link
Contributor

@rstat1 rstat1 commented Jan 2, 2020

Summary of the Pull Request

So this PR adds a profile setting called "confirmCloseAllTabs", that allows one to enable or disable the "Do you want close all tabs?" dialog that appears when you close a window with multiple open tabs. It current defaults to "true". Also adds a checkbox to that dialog that also sets "confirmCloseAllTabs"

References

PR Checklist

Detailed Description of the Pull Request / Additional comments

I added a checkbox to the close dialog to set this setting, but I'm not sure how to best go about actually changing the setting from code; am open to suggestions, as to how it should be done, or if I should also just remove it and stick with the profile setting.

Validation Steps Performed

  1. Set "confirmCloseAllTabs" to false in my profile.json file.
  2. Opened a 2nd tab.
  3. Closed the window
  4. Observed that there was no confirmation before the window closed.
  5. Set "confirmCloseAllTabs" to true
  6. Repeat steps 2 and 3
  7. Observe that there was a confirmation before the window closed.

@rstat1 rstat1 changed the title No are you sure boxes No more are you sure boxes Jan 2, 2020
Copy link
Member

@zadjii-msft zadjii-msft left a comment

Choose a reason for hiding this comment

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

Okay I really like this so far, but I think it'll be easiest to just add the setting in profiles.json right now, and not add the checkbox in this PR.

Right now, we're only really writing out the profiles.json file when dynamic profiles are added, and when that happens, we're surgically modifying the profiles.json file to insert the new profiles - we're not re-serializing the settings. Unfortunately, I'm not sure that surgical insertion code could be easily re-used for this scenario. It might be tricky to add similar code to enable writing out an update of a single setting like this. If you're really interested, you could look at CascadiaSettings::_AppendDynamicProfilesToUserSettings and CascadiaSettings::_PrependSchemaDirective for samples, but HERE BE DRAGONS.

I'd rather just get the setting added now, and figure out the tricky part later IMO.

src/cascadia/TerminalApp/userDefaults.json Outdated Show resolved Hide resolved
src/cascadia/TerminalApp/TerminalPage.cpp Outdated Show resolved Hide resolved
@zadjii-msft zadjii-msft added Area-Settings Issues related to settings and customizability, for console or terminal Product-Terminal The new Windows Terminal. labels Jan 3, 2020
@rstat1
Copy link
Contributor Author

rstat1 commented Jan 3, 2020

Ok, so I also removed the checkbox (and related event handlers) as well. Though I would like to revisit doing that later.

@rstat1 rstat1 marked this pull request as ready for review January 3, 2020 21:44
src/cascadia/TerminalApp/Resources/en-US/Resources.resw Outdated Show resolved Hide resolved
src/cascadia/TerminalApp/userDefaults.json Outdated Show resolved Hide resolved
@ghost ghost added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jan 9, 2020
@ghost ghost removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jan 9, 2020
@rstat1 rstat1 requested a review from miniksa January 9, 2020 19:55
Copy link
Member

@carlos-zamora carlos-zamora left a comment

Choose a reason for hiding this comment

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

Also make sure you update the following files with the new setting:

I think the setting key is ok too, but I wanna quickly poll @cinnamon-msft for her thoughts just to keep her in the loop 😊

src/cascadia/TerminalApp/GlobalAppSettings.cpp Outdated Show resolved Hide resolved
src/cascadia/TerminalApp/Resources/en-US/Resources.resw Outdated Show resolved Hide resolved
src/cascadia/TerminalApp/TerminalPage.cpp Outdated Show resolved Hide resolved
src/cascadia/TerminalApp/userDefaults.json Outdated Show resolved Hide resolved
@ghost ghost added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jan 13, 2020
Apparently trying to fix merge conflicts using GitHub's web-based
conflict resolution thing screws up the formatting.
(ok so this time it shouldn't screw with the formatting)
Copy link
Member

@zadjii-msft zadjii-msft left a comment

Choose a reason for hiding this comment

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

I like it. Thanks!

@zadjii-msft zadjii-msft added the Needs-Second It's a PR that needs another sign-off label Jan 21, 2020
@ghost ghost requested review from DHowett-MSFT and leonMSFT January 21, 2020 16:16
@cinnamon-msft
Copy link
Contributor

I dig this :)

@miniksa miniksa added AutoMerge Marked for automatic merge by the bot when requirements are met and removed Needs-Second It's a PR that needs another sign-off labels Jan 31, 2020
@ghost
Copy link

ghost commented Jan 31, 2020

Hello @miniksa!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

Copy link
Member

@miniksa miniksa left a comment

Choose a reason for hiding this comment

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

Thanks!

@ghost ghost merged commit 3dc8fdb into microsoft:master Jan 31, 2020
@ghost
Copy link

ghost commented Feb 13, 2020

🎉Windows Terminal Preview v0.9.433.0 has been released which incorporates this pull request.:tada:

Handy links:

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal AutoMerge Marked for automatic merge by the bot when requirements are met Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Close on multiple tabs confirmation dialog being optional.
6 participants