[PR #9523] [MERGED] Add an action for identifying windows #27612

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/9523
Author: @zadjii-msft
Created: 3/17/2021
Status: ✅ Merged
Merged: 3/30/2021
Merged by: @undefined

Base: main ← Head: dev/migrie/f/identifyWindows


📝 Commits (10+)

📊 Changes

28 files changed (+755 additions, -420 deletions)

View changed files

📝 src/cascadia/Remoting/Monarch.cpp (+60 -0)
📝 src/cascadia/Remoting/Monarch.h (+5 -0)
📝 src/cascadia/Remoting/Peasant.cpp (+47 -0)
📝 src/cascadia/Remoting/Peasant.h (+4 -0)
📝 src/cascadia/Remoting/Peasant.idl (+4 -0)
📝 src/cascadia/TerminalApp/AppActionHandlers.cpp (+35 -2)
📝 src/cascadia/TerminalApp/AppLogic.cpp (+30 -0)
📝 src/cascadia/TerminalApp/AppLogic.h (+7 -0)
📝 src/cascadia/TerminalApp/AppLogic.idl (+5 -0)
📝 src/cascadia/TerminalApp/Resources/en-US/Resources.resw (+8 -0)
📝 src/cascadia/TerminalApp/ShortcutActionDispatch.cpp (+53 -227)
📝 src/cascadia/TerminalApp/ShortcutActionDispatch.h (+49 -45)
📝 src/cascadia/TerminalApp/ShortcutActionDispatch.idl (+50 -45)
📝 src/cascadia/TerminalApp/TerminalAppLib.vcxproj (+3 -0)
📝 src/cascadia/TerminalApp/TerminalPage.cpp (+152 -48)
📝 src/cascadia/TerminalApp/TerminalPage.h (+71 -48)
📝 src/cascadia/TerminalApp/TerminalPage.idl (+8 -1)
📝 src/cascadia/TerminalApp/TerminalPage.xaml (+11 -0)
➕ src/cascadia/TerminalApp/Toast.cpp (+40 -0)
➕ src/cascadia/TerminalApp/Toast.h (+38 -0)

...and 8 more files

📄 Description

Summary of the Pull Request

This is a follow up to #9300. Now that we have names on our windows, it would be nice to see who is named what. So this adds two actions:

  • identifyWindow: This action will pop up a little toast (#8592) displaying the name and ID of the window, and is bound by default.
    identify-window-toast-000

  • identifyWindows: This action will request that ALL windows pop up that toast. This is meant to feel like the "Identify" button on the Windows display settings. However, sometimes, it's wonky.
    teaching-tip-dismiss-001
    That's being tracked upstream on https://github.com/microsoft/microsoft-ui-xaml/issues/4382
    Because it's so wonky, we won't bind that by default. Maybe if we get that fixed, then we'll change the default binding from identifyWindow to identifyWindows

References

PR Checklist

Detailed Description of the Pull Request / Additional comments

You may note that there are some macros to make interacting with lots and lots of actions easier. There's a lot of boilerplate whenever you need to make a new action, so I thought: "Can we make that easier?"

Turns out you can make it a LOT easier, but that work is still behind another PR after this one. Get excited


🔄 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/9523 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 3/17/2021 **Status:** ✅ Merged **Merged:** 3/30/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/migrie/f/identifyWindows` --- ### 📝 Commits (10+) - [`1c7da00`](https://github.com/microsoft/terminal/commit/1c7da000fcacc1e076d4538316435b873db3ee90) Rebase all the changes on main - [`97818c6`](https://github.com/microsoft/terminal/commit/97818c68e608b96de2eecf44ac7f3007eff98dd0) fix a bug and fix the tests - [`2ec9415`](https://github.com/microsoft/terminal/commit/2ec94159746125a0b28a4ee38ee1dbb0740169d8) fix tests - [`e13e1e7`](https://github.com/microsoft/terminal/commit/e13e1e7fe55657b084a41d4860df26ec80c97f22) Good ole Java - [`136ce6d`](https://github.com/microsoft/terminal/commit/136ce6d983c8b2b7031576f54d760e7999cf35d7) finish that test - [`ec97c43`](https://github.com/microsoft/terminal/commit/ec97c43af43b67e099981ae3ad87578bca1ab843) macros are life - [`fa26f7f`](https://github.com/microsoft/terminal/commit/fa26f7f569ad843997cff960590d4abfcf38f1b3) THIS NEEDS TO GO TO THE PARENT - [`a391455`](https://github.com/microsoft/terminal/commit/a391455410f7f242c82670405526a5bd74ed589f) Plumb the events up and down - [`001f545`](https://github.com/microsoft/terminal/commit/001f545b9f482e16476fdc93c38729155d4b87dd) Bind the labels to the actual TerminalPage object - [`9270e0f`](https://github.com/microsoft/terminal/commit/9270e0fce3ecd03b124445ac8b7a37991b28f719) bind the name, id down to the actual page ### 📊 Changes **28 files changed** (+755 additions, -420 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/Remoting/Monarch.cpp` (+60 -0) 📝 `src/cascadia/Remoting/Monarch.h` (+5 -0) 📝 `src/cascadia/Remoting/Peasant.cpp` (+47 -0) 📝 `src/cascadia/Remoting/Peasant.h` (+4 -0) 📝 `src/cascadia/Remoting/Peasant.idl` (+4 -0) 📝 `src/cascadia/TerminalApp/AppActionHandlers.cpp` (+35 -2) 📝 `src/cascadia/TerminalApp/AppLogic.cpp` (+30 -0) 📝 `src/cascadia/TerminalApp/AppLogic.h` (+7 -0) 📝 `src/cascadia/TerminalApp/AppLogic.idl` (+5 -0) 📝 `src/cascadia/TerminalApp/Resources/en-US/Resources.resw` (+8 -0) 📝 `src/cascadia/TerminalApp/ShortcutActionDispatch.cpp` (+53 -227) 📝 `src/cascadia/TerminalApp/ShortcutActionDispatch.h` (+49 -45) 📝 `src/cascadia/TerminalApp/ShortcutActionDispatch.idl` (+50 -45) 📝 `src/cascadia/TerminalApp/TerminalAppLib.vcxproj` (+3 -0) 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+152 -48) 📝 `src/cascadia/TerminalApp/TerminalPage.h` (+71 -48) 📝 `src/cascadia/TerminalApp/TerminalPage.idl` (+8 -1) 📝 `src/cascadia/TerminalApp/TerminalPage.xaml` (+11 -0) ➕ `src/cascadia/TerminalApp/Toast.cpp` (+40 -0) ➕ `src/cascadia/TerminalApp/Toast.h` (+38 -0) _...and 8 more files_ </details> ### 📄 Description ## Summary of the Pull Request This is a follow up to #9300. Now that we have names on our windows, it would be nice to see who is named what. So this adds two actions: * `identifyWindow`: This action will pop up a little toast (#8592) displaying the name and ID of the window, and is bound by default. ![identify-window-toast-000](https://user-images.githubusercontent.com/18356694/111529085-bf710580-872f-11eb-8880-b0b617596cfc.gif) * `identifyWindows`: This action will request that ALL windows pop up that toast. This is meant to feel like the "Identify" button on the Windows display settings. However, sometimes, it's wonky. ![teaching-tip-dismiss-001](https://user-images.githubusercontent.com/18356694/111529292-fe06c000-872f-11eb-8d4a-5688e4ce1175.gif) That's being tracked upstream on https://github.com/microsoft/microsoft-ui-xaml/issues/4382 Because it's so wonky, we won't bind that by default. Maybe if we get that fixed, then we'll change the default binding from `identifyWindow` to `identifyWindows` ## References ## PR Checklist * [x] Closes https://github.com/microsoft/terminal/projects/5#card-51431492 * [x] I work here * [x] Tests added/passed * [ ] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments You may note that there are some macros to make interacting with lots and lots of actions easier. There's a lot of boilerplate whenever you need to make a new action, so I thought: "Can we make that easier?" Turns out you can make it a _LOT_ easier, but that work is still behind another PR after this one. Get excited --- <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:23:01 +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#27612