[PR #12558] [MERGED] When we delete a profile, focus the delete button automatically #29110

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/12558
Author: @zadjii-msft
Created: 2/23/2022
Status: Merged
Merged: 3/11/2022
Merged by: @DHowett

Base: mainHead: dev/migrie/b/11971-refocus-delete


📝 Commits (7)

  • 4e67123 The whole thing
  • d03eb67 typo
  • 15a973b comments to resw too
  • 9593fe6 this sure is bodgy but it works
  • caae047 Merge remote-tracking branch 'origin/main' into dev/migrie/b/11971-refocus-delete
  • 303fa86 Merge remote-tracking branch 'origin/main' into dev/migrie/b/11971-refocus-delete
  • 3032123 Update src/cascadia/TerminalSettingsEditor/Profiles_Base.cpp

📊 Changes

7 files changed (+26 additions, -4 deletions)

View changed files

📝 src/cascadia/TerminalSettingsEditor/MainPage.cpp (+3 -2)
📝 src/cascadia/TerminalSettingsEditor/MainPage.h (+1 -1)
📝 src/cascadia/TerminalSettingsEditor/Profiles.h (+1 -0)
📝 src/cascadia/TerminalSettingsEditor/Profiles.idl (+1 -0)
📝 src/cascadia/TerminalSettingsEditor/Profiles_Base.cpp (+17 -0)
📝 src/cascadia/TerminalSettingsEditor/Profiles_Base.h (+1 -0)
📝 src/cascadia/TerminalSettingsEditor/Profiles_Base.xaml (+2 -1)

📄 Description

This sure is bodgy, but it makes sense. Right now, when we delete a profile, we load in a totally new content for the new profile's settings. That one resets the scroll view and the focus, and now the "delete" button is obviously not focused.

Instead, this PR will manually re-focus the delete button of a profile page when the page is navigated to because we deleted another profile.

  • This will take care of #11971
  • I work here
  • tested manually

🔄 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/12558 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 2/23/2022 **Status:** ✅ Merged **Merged:** 3/11/2022 **Merged by:** [@DHowett](https://github.com/DHowett) **Base:** `main` ← **Head:** `dev/migrie/b/11971-refocus-delete` --- ### 📝 Commits (7) - [`4e67123`](https://github.com/microsoft/terminal/commit/4e67123cf2af15662d49f5956b801809e7163ebe) The whole thing - [`d03eb67`](https://github.com/microsoft/terminal/commit/d03eb670c2c69bc7ca374501aaa40edb5030eb24) typo - [`15a973b`](https://github.com/microsoft/terminal/commit/15a973bfc3b2fbddd7d0b4e0fc85a538e1e588e1) comments to resw too - [`9593fe6`](https://github.com/microsoft/terminal/commit/9593fe6f8dd7dc029a3bc63d34f367f93c2da93c) this sure is bodgy but it works - [`caae047`](https://github.com/microsoft/terminal/commit/caae0473a2f318210735a929ffa3b5b1af143663) Merge remote-tracking branch 'origin/main' into dev/migrie/b/11971-refocus-delete - [`303fa86`](https://github.com/microsoft/terminal/commit/303fa862eca3f5408de1e675358938ece2b21172) Merge remote-tracking branch 'origin/main' into dev/migrie/b/11971-refocus-delete - [`3032123`](https://github.com/microsoft/terminal/commit/3032123137b407e874e5906219fddfbf2749f240) Update src/cascadia/TerminalSettingsEditor/Profiles_Base.cpp ### 📊 Changes **7 files changed** (+26 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalSettingsEditor/MainPage.cpp` (+3 -2) 📝 `src/cascadia/TerminalSettingsEditor/MainPage.h` (+1 -1) 📝 `src/cascadia/TerminalSettingsEditor/Profiles.h` (+1 -0) 📝 `src/cascadia/TerminalSettingsEditor/Profiles.idl` (+1 -0) 📝 `src/cascadia/TerminalSettingsEditor/Profiles_Base.cpp` (+17 -0) 📝 `src/cascadia/TerminalSettingsEditor/Profiles_Base.h` (+1 -0) 📝 `src/cascadia/TerminalSettingsEditor/Profiles_Base.xaml` (+2 -1) </details> ### 📄 Description This sure is bodgy, but it makes sense. Right now, when we delete a profile, we load in a totally new content for the new profile's settings. That one resets the scroll view and the focus, and now the "delete" button is obviously not focused. Instead, this PR will manually re-focus the delete button of a profile page when the page is navigated to _because we deleted another profile_. * [x] This will take care of #11971 * [x] I work here * [x] tested manually --- <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:32:53 +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#29110