-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A pane doesn't necessarily need to host a terminal. #997
Comments
This issue is related I believe #644 |
From @sharpninja in #4719,
|
c66a566 might be a commit that enables this, accidentally while working on something else. |
<showerthought> what if we just had the Terminal create an HWND in the space of that pane, and let a OOP extension just get that HWND and put whatever it wants into it? Terminal would be responsible for resizing the HWND, hiding it, whatever. It'd be a child HWND of the Terminal, so it'd necessarily be tied to our window. But then a 3p app could just put a Xaml Island in it's own child HWND, in its own process?
|
Instead of `Pane` hosting a `TermControl` directly, it now hosts an `IPaneContent`. This is an abstraction between the TermControl and the pane itself, to allow for arbitrary implementations of `IPaneContent`, with things that might not be terminals. ## References and Relevant Issues * #997 * #1000 ## Detailed Description of the Pull Request / Additional comments This PR by itself doesn't do much. It's just a refactoring. - It doesn't actually add any other types of pane content. - It overall just tries to move code whenever possible, with as little refactoring as possible. There are some patterns from before that don't super scale well to other types of pane content (think: the `xyzChanged` events on `IPaneContent`). - There's a few remaining places where Pane is explicitly checking if its content is a terminal. We probably shouldn't, but meh There are two follow-up PRs to this PR: * #16171 * #16172 In addition, there's more work to be done after these merge: * TODO! issue number for "Replace `IPaneContent::xyzChanged` with `PropertyChanged` events" * TODO! issue number for "Re-write state restoration so panes don't produce `NewTerminalArgs`" ## Validation Steps Performed * It still launches * It still works * Broadcasting still works * The weird restart connection thing from #16001 still works ## PR Checklist - [x] Closes #997 ## other PRs * #16170 <-- you are here * #16171 * #16172
## Summary of the Pull Request Builds upon #16170. This PR simply adds a singly type of non-terminal pane - a "scratchpad pane". This is literally just a single text box, in a pane. It's on the `{ "command": "experimental.openScratchpad" }` action. ## References and Relevant Issues See: #997 ## Detailed Description of the Pull Request / Additional comments I also put it behind velocity so it won't even go into preview while this bakes. This is really just here to demonstrate that this works, and is viable. The next PR is much more interesting. ## Validation Steps Performed Screenshot below. ## other PRs * #16170 * #16171 <-- you are here * #16172
... technically. We still won't let it actually _be_ a pane, but now it acts like one. It's hosted in a `SettingsPaneContent`. There's no more `SettingsTab`. It totally _can_ be in a pane (but don't?) ## Validation Steps Performed * Still opens the settings * Only opens a single settings tab, or re-activates the existing one * Session restores! * Updates the title of the tab appropriately * I previously _did_ use the scratchpad action to open the settings in a pane, and that worked. ## Related PRs * #16170 * #16171 * #16172 <-- you are here * #16895 Refs #997 Closes #8452
A pane doesn't necessarily need to host a terminal. It could potentially host another
UIElement
. One could imagine enabling a user to quickly open up a Browser pane to search for a particular string without needing to leave the terminal.notes:
dev/migrie/f/non-terminal-panes
was the original prototypeThis prototype built a media pane for the Terminal. An example screenshot:
I can't find the original gif, cause that was from 2019. The demo deck is in a recording linked to a mail from jeffbog "RE: DEP Hackathon Share-Out", 8/7/2019
dev/migrie/fhl/adaptive-card-extension
had a draft of this in Oct 2021dev/migrie/fhl/non-terminal-panes-2023
an attempted start circa May 2023. Didn't have more than a few hours for it though.dev/migrie/fhl/scratchpad-pane
for the branch with a test pane in it.dev/migrie/f/sui-panes
dev/migrie/fhl-fall-2023/oceans
dev/migrie/fhl/tasks-pane
dev/migrie/f/sui-panes...dev/migrie/fhl/tasks-pane, somewhere in the neighborhood of VSCode-like Shell Integration #13445dev/migrie/fhl/md-pane
dev/migrie/f/tasks-pane...dev/migrie/fhl/md-panedev/migrie/fhl/2024-spring-merge-base
The text was updated successfully, but these errors were encountered: