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

dialogs - better massage options #172022

Merged
merged 1 commit into from
Jan 24, 2023
Merged

dialogs - better massage options #172022

merged 1 commit into from
Jan 24, 2023

Conversation

bpasero
Copy link
Member

@bpasero bpasero commented Jan 23, 2023

No description provided.

@bpasero bpasero enabled auto-merge (squash) January 23, 2023 16:54
@@ -878,7 +878,7 @@ export class DebugService implements IDebugService {
const actions = errorActions.filter((action) => action.id.endsWith('.command')).length > 0 ?
errorActions :
[...errorActions, ...(promptLaunchJson ? [configureAction] : [])];
const { choice } = await this.dialogService.show(severity.Error, message, actions.map(a => a.label).concat(nls.localize('cancel', "Cancel")), { cancelId: actions.length });
const { choice } = await this.dialogService.show(severity.Error, message, actions.map(a => a.label).concat(nls.localize('cancel', "Cancel")), { cancelId: actions.length - 1 });
Copy link
Member Author

Choose a reason for hiding this comment

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

@roblourens @connor4312 fyi, the cancel button was never assigned properly

Copy link
Member

Choose a reason for hiding this comment

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

👍 thanks for the fix

@@ -500,13 +500,13 @@ export class EditSessionsContribution extends Disposable implements IWorkbenchCo
conflictingChanges.length > 1 ?
localize('resume edit session warning many', 'Resuming your working changes from the cloud will overwrite the following {0} files. Do you want to proceed?', conflictingChanges.length) :
localize('resume edit session warning 1', 'Resuming your working changes from the cloud will overwrite {0}. Do you want to proceed?', basename(conflictingChanges[0].uri)),
[cancel, yes],
[yes, cancel],
Copy link
Member Author

Choose a reason for hiding this comment

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

@joyceerhl please check, cancel buttons should be last in the dialog.

@@ -104,8 +104,8 @@ export class PromptExtensionInstallFailureAction extends Action {
if (this.error.name === ExtensionManagementErrorCode.Unsupported) {
const productName = isWeb ? localize('VS Code for Web', "{0} for the Web", this.productService.nameLong) : this.productService.nameLong;
const message = localize('cannot be installed', "The '{0}' extension is not available in {1}. Click 'More Information' to learn more.", this.extension.displayName || this.extension.identifier.id, productName);
const result = await this.dialogService.show(Severity.Info, message, [localize('close', "Close"), localize('more information', "More Information")], { cancelId: 0 });
if (result.choice === 1) {
const result = await this.dialogService.show(Severity.Info, message, [localize('more information', "More Information"), localize('close', "Close")], { cancelId: 1 });
Copy link
Member Author

Choose a reason for hiding this comment

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

@sandy081 fyi

@@ -216,10 +216,10 @@ export class TaskQuickPick extends Disposable {
const changeSettingResult = await this._dialogService.show(Severity.Warning,
nls.localize('TaskQuickPick.changeSettingDetails',
"Task detection for {0} tasks causes files in any workspace you open to be run as code. Enabling {0} task detection is a user setting and will apply to any workspace you open. \n\n Do you want to enable {0} task detection for all workspaces?", selectedType),
[noButton, yesButton],
[yesButton, noButton],
Copy link
Member Author

Choose a reason for hiding this comment

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

@meganrogge fyi, I changed this so that cancelling the dialog would not execute the "Yes" button.

@bpasero bpasero merged commit 9bc6f50 into main Jan 24, 2023
@bpasero bpasero deleted the ben/modern-iguana branch January 24, 2023 05:11
@github-actions github-actions bot locked and limited conversation to collaborators Mar 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants