terminal/doc
Mike Griese fb597ed304
Add support for renaming windows (#9662)
## Summary of the Pull Request

This PR adds support for renaming windows.

![window-renaming-000](https://user-images.githubusercontent.com/18356694/113034344-9a30be00-9157-11eb-9443-975f3c294f56.gif)
![window-renaming-001](https://user-images.githubusercontent.com/18356694/113034452-b5033280-9157-11eb-9e35-e5ac80fef0bc.gif)


It does so through two new actions:
* `renameWindow` takes a `name` parameter, and attempts to set the window's name
  to the provided name. This is useful if you always want to hit <kbd>F3</kbd>
  and rename a window to "foo" (READ: probably not that useful)
* `openWindowRenamer` is more interesting: it opens a `TeachingTip` with a
  `TextBox`. When the user hits Ok, it'll request a rename for the provided
  value. This lets the user pick a new name for the window at runtime.

In both cases, if there's already a window with that name, then the monarch will
reject the rename, and pop a `Toast` in the window informing the user that the
rename failed. Nifty!

## References
* Builds on the toasts from #9523
* #5000 - process model megathread

## PR Checklist
* [x] Closes https://github.com/microsoft/terminal/projects/5#card-50771747
* [x] I work here
* [x] Tests addded (and pass with the help of #9660)
* [ ] Requires documentation to be updated

## Detailed Description of the Pull Request / Additional comments

I'm sending this PR while finishing up the tests. I figured I'll have time to sneak them in before I get the necessary reviews.

> PAIN: We can't immediately focus the textbox in the TeachingTip. It's
> not technically focusable until it is opened. However, it doesn't
> provide an even tto tell us when it is opened. That's tracked in
> microsoft/microsoft-ui-xaml#1607. So for now, the user _needs_ to
> click on the text box manually.
> We're also not using a ContentDialog for this, because in Xaml
> Islands a text box in a ContentDialog won't recieve _any_ keypresses.
> Fun!

## Validation Steps Performed

I've been playing with 

```json
        { "keys": "f1", "command": "identifyWindow" },
        { "keys": "f2", "command": "identifyWindows" },
        { "keys": "f3", "command": "openWindowRenamer" },
        { "keys": "f4", "command": { "action": "renameWindow", "name": "foo" } },
        { "keys": "f5", "command": { "action": "renameWindow", "name": "bar" } },
```

and they seem to work as expected
2021-04-02 16:00:04 +00:00
..
cascadia Add support for renaming windows (#9662) 2021-04-02 16:00:04 +00:00
images Run all images through ImgBot (#8169) 2020-11-05 18:03:40 -08:00
reference Fix the spellbot (#8259) 2020-11-13 09:45:08 -08:00
specs Update #597 - Tab Sizing.md 2021-02-09 10:50:20 -08:00
user-docs doc: add a link to MSYS2's WT profiles page (#8060) 2020-10-27 13:27:00 -07:00
AddASetting.md Minor grammatical fix (#8603) 2020-12-17 15:12:36 -08:00
bot.md Changed feedback hub request rule (#2680) 2019-09-06 08:55:13 -05:00
building.md docs: use unlikely example versions in nuget package script (#7448) 2020-09-04 13:01:51 -07:00
ConsoleCtrlEvent.md Fixed typo's and improved consistency. (#704) 2019-05-15 21:02:42 -07:00
ConsoleHostSettings.md Added information on WxH character (#2104) 2019-08-01 08:34:18 -05:00
creating_a_new_project.md Remove all our path antics; force native projects to bin/, obj/ (#8062) 2020-10-27 15:00:41 -07:00
Debugging.md doc: Add debugging notes on DebugBreak (#4163) 2020-01-09 17:56:05 -08:00
EXCEPTIONS.md Code highlighting and capitalization fix for doc/EXCEPTIONS.md (#1283) 2019-06-17 23:41:27 +00:00
Niksa.md Add a "shell vs terminal" section to Niksa.md (#7202) 2020-08-06 16:23:54 -05:00
ORGANIZATION.md Fix a bunch of spelling errors across the project (#4295) 2020-02-10 20:40:01 +00:00
STYLE.md Converts Dispatcher().RunAsync to WinRT Coroutines (#4051) 2020-01-10 03:29:49 +00:00
submitting_code.md Prepare for the primary branch name to change to main (#7985) 2020-10-21 17:29:36 -07:00
TAEF.md Change TAEF nuget package to use new Microsoft.Taef name; Update to 10.58 release build version. (#9656) 2021-03-30 10:58:11 +00:00
terminal-v1-roadmap.md doc: update roadmap with proper v1 release date (#4860) 2020-03-09 17:04:54 -07:00
terminal-v2-roadmap.md Update roadmap to reflect new release cadence (#9366) 2021-03-17 14:24:00 -05:00
UniversalTest.md Fixed typo's and improved consistency. (#704) 2019-05-15 21:02:42 -07:00
virtual-dtors.md Fix a bunch of spelling errors across the project (#4295) 2020-02-10 20:40:01 +00:00
WIL.md Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
WindowsTestPasses.md Fixed typo's and improved consistency. (#704) 2019-05-15 21:02:42 -07:00