Add configurable setting for job delete confirmation dialog#4327
Add configurable setting for job delete confirmation dialog#4327BRGOVIND wants to merge 1 commit into
Conversation
zFernand0
left a comment
There was a problem hiding this comment.
Please address failing tests
https://github.com/zowe/zowe-explorer-vscode/actions/runs/27552741216/job/81443298737?pr=4327#step:7:289
| const confirmDelete = vscode.workspace | ||
| .getConfiguration() | ||
| .get<boolean>("zowe.jobs.confirmDelete", true); | ||
|
|
||
| if (confirmDelete) { | ||
| const deleteChoice = await Gui.warningMessage(message, { | ||
| items: [deleteButton], | ||
| vsCodeOpts: { modal: true }, | ||
| }); | ||
|
|
||
| if (!deleteChoice || deleteChoice === "Cancel") { | ||
| ZoweLogger.debug(vscode.l10n.t("Delete action was canceled.")); | ||
| Gui.showMessage(vscode.l10n.t("Delete action was cancelled.")); | ||
| return; | ||
| } | ||
| } |
There was a problem hiding this comment.
Please keep the indentation of this code block consistent with the rest of the file.
|
|
||
| ### New features and enhancements | ||
|
|
||
| - Added a new VS Code toggle setting `zowe.jobs.confirmDelete` that allows users to disable the job deletion confirmation dialog. [#4315](https://github.com/zowe/zowe-explorer-vscode/issues/4315) |
There was a problem hiding this comment.
@traeok Maybe outside the scope of this PR, but I noticed the issue mentions the confirmDelete setting only for the Jobs tree. Wouldn't it be useful to have across all the trees?
| "zowe.jobs.confirmDelete": { | ||
| "type": "boolean", | ||
| "default": true, | ||
| "description": "Prompt for confirmation before deleting jobs.", |
There was a problem hiding this comment.
Please localize this string by using the same style of placeholder as other setting descriptions and define the description in package.nls.json.
8f6def3 to
f294f35
Compare
|
Thanks for the detailed review @t1m0thyj! I've addressed the feedback:
Re the cross-tree |
|
Rebased again on latest |
…ialog - Add zowe.jobs.confirmDelete boolean setting (default: true) to allow users to skip the confirmation dialog when deleting jobs - Localize description via package.nls.json placeholder - Fix indentation of confirmation logic in deleteSingleJob/deleteMultipleJobs - Add CHANGELOG entry for the new setting
8ce4c3a to
ecc9e7f
Compare
|
There is one commit incorrectly signed off, triggering DCO failures. Can you please add a sign off to your latest commit? |
zFernand0
left a comment
There was a problem hiding this comment.
Changes LGTM! 😋
I'd recommend avoiding force pushing since that makes things harder for reviewers.
Also, before I can approve, I'd like to have you join standup to discuss the progression of this PR. 🙏
|
@traeok |
|
@zFernand0 |
Forgot to mention that we have a stand-up for Zowe Explorer on Tuesdays and Thursdays at 11am EDT. |
|
Hey @BRGOVIND, |
Proposed changes
Resolves #4315
Adds a new VS Code setting,
zowe.jobs.confirmDelete, that allows users to disable the job deletion confirmation dialog.The setting defaults to
true, preserving the current behavior. When disabled, users can delete jobs without being prompted for confirmation.The setting is applied to both single-job and multi-job deletion workflows.
Release Notes
Milestone: TBD
Changelog:
zowe.jobs.confirmDeletesetting to control whether users are prompted before deleting jobs.Types of changes
Checklist
General
Code coverage
Deployment
Further comments
The existing delete confirmation behavior remains unchanged by default. The new setting provides an option for power users and enables easier automation and end-to-end testing scenarios where interactive confirmation dialogs are undesirable.