-
Notifications
You must be signed in to change notification settings - Fork 53
Show quit confirmation dialog when sites are running #2314
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
base: dev/studio-cli-i2
Are you sure you want to change the base?
Show quit confirmation dialog when sites are running #2314
Conversation
| runningSiteCount | ||
| ), | ||
| buttons: [ __( 'Stop sites' ), __( 'Leave running' ) ], | ||
| checkboxLabel: __( 'Remember my choice' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use something lile "Don't ask again" to be consistent with other checkboxes around the app?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that actually we have default fallback as Don't show this warning again. I would propose change teh default value to Don't ask again and remove checkboxLabel here and in src/components/content-tab-import-export.tsx
| checkboxLabel: __( 'Remember my choice' ), | ||
| cancelId: LEAVE_RUNNING_BUTTON_INDEX, | ||
| defaultId: STOP_SITES_BUTTON_INDEX, | ||
| } ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, if we go with adding this option, let's ensure that the Esc button just closes the popup, since now it applies "closing app w/o turning off sites", which is IMO a bit unexpected.

Related issues
Proposed Changes
stopSitesOnQuitboolean in user data (undefined = show dialog, true = stop, false = leave running)getRunningSiteCount()helper function to track running sitesTesting Instructions
Happy Path
studio site list)Remember Choice
stopSitesOnQuitfrom~/Library/Application Support/WordPress Studio/appdata-v1.jsonEdge Cases
Pre-merge Checklist