[PR #10392] [MERGED] Cancel the preview of nested commands when moving back on the stack. #28027

Open
opened 2026-01-31 09:25:51 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/10392
Author: @kovdu
Created: 6/10/2021
Status: Merged
Merged: 6/14/2021
Merged by: @undefined

Base: mainHead: 10165-cancel-preview-nested-commands


📝 Commits (1)

  • e3ea469 Cancel the preview of nested commands when moving back on the stack.

📊 Changes

1 file changed (+9 additions, -0 deletions)

View changed files

📝 src/cascadia/TerminalApp/CommandPalette.cpp (+9 -0)

📄 Description

Summary of the Pull Request

Immediately cancelling the preview when the user is navigating back from a nested command.

References

PR Checklist

  • Closes option to autodetect desktop wallpaper for use as backgroundImage (#10165)
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Documentation updated. If checked, please file a pull request on our docs repo and link it here: #xxx
  • Schema updated.
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments

Basically 2 changes are done here:

  • Allow the click handler to run for the back button when the button has focus and user hits the enter key (similarly as hitting space now).
  • Now immediately cancelling the preview when the user is navigating back. Felt nicer to do it immediately at that point then keeping the preview active until the user hits cancel to close the palette. So the preview is already cancelled at step 5 instead of 6 as mentioned in the reproduction steps here https://github.com/microsoft/terminal/issues/10165#issue-899838383. But of course let me know if you're not agreeing here 😀 .

Validation Steps Performed

  • Open 'Color Scheme' and verified preview is still working fine when selecting different schemes.
  • After tabbing back to the Back button verified that when hitting enter or space the preview is cancelled and the original color scheme is being used again.
  • Then after going back to 'Color Scheme' previews are still working ok.
  • After hitting Enter on one of the Color Schemes the scheme still becomes active as before.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/10392 **Author:** [@kovdu](https://github.com/kovdu) **Created:** 6/10/2021 **Status:** ✅ Merged **Merged:** 6/14/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `10165-cancel-preview-nested-commands` --- ### 📝 Commits (1) - [`e3ea469`](https://github.com/microsoft/terminal/commit/e3ea4692f563befb1c34fa813062c49f2729f164) Cancel the preview of nested commands when moving back on the stack. ### 📊 Changes **1 file changed** (+9 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/CommandPalette.cpp` (+9 -0) </details> ### 📄 Description <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Immediately cancelling the preview when the user is navigating back from a nested command. <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes #10165 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx * [ ] Schema updated. * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments Basically 2 changes are done here: - Allow the click handler to run for the back button when the button has focus and user hits the enter key (similarly as hitting space now). - Now immediately cancelling the preview when the user is navigating back. Felt nicer to do it immediately at that point then keeping the preview active until the user hits cancel to close the palette. So the preview is already cancelled at step **5** instead of 6 as mentioned in the reproduction steps here https://github.com/microsoft/terminal/issues/10165#issue-899838383. But of course let me know if you're not agreeing here 😀 . <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed - Open 'Color Scheme' and verified preview is still working fine when selecting different schemes. - After tabbing back to the Back button verified that when hitting enter or space the preview is cancelled and the original color scheme is being used again. - Then after going back to 'Color Scheme' previews are still working ok. - After hitting Enter on one of the Color Schemes the scheme still becomes active as before. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:25:51 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#28027