Skip to content
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

Add new code sample for GUIConsole using WinUI 3 - Windows App SDK v1.1 #13851

Open
OculiViridi opened this issue Aug 25, 2022 · 5 comments
Open
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Help Wanted We encourage anyone to jump in on these. Issue-Docs It's a documentation issue that really should be on MicrosoftDocs/Console-Docs Product-Meta The product is the management of the products.
Milestone

Comments

@OculiViridi
Copy link

Description of the new feature/enhancement

I'm creating a WinUI 3 Desktop application (using VS 2022 17.3 Blank App WinUI 3 in Desktop template) where I'd like to use the Windows Terminal API to create a terminal window control to use inside my application.

I started by looking at your GUIConsole.WPF sample that is written in WPF for .NET Framework 4.6.1.

I tried to port the classes and the XAML window but I'm not able to let it work. I still have errors both on XAML and on code.

Proposed technical implementation details

Can you please add a new version of the code sample that is written using the new Windows App SDK v1.1?

@OculiViridi OculiViridi added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Aug 25, 2022
@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Aug 25, 2022
@zadjii-msft
Copy link
Member

Alrighty so there's kinda two separate bits here:

  • Create a version of the sample that uses WinUI3 & WASDK
  • Create a Terminal Control to use in a WASDK app

The first is probably a lot easier. The sample is mostly illustrative of the ConPTY APIs. All of the GUIConsole.ConPTY project should work the same in WASDK. The GUIConsole.WPF project is more of a placeholder app - it shows how to wire that up to some UI layer, but I'd never recommend anyone build production code on top of that. It's a viable place to start to understand the APIs, but appending lines to a text block is a terribly un-performant way of rendering text.

The second is... much harder. We do have a TermControl written for WinUI2 today. It's not ready for someone to take a dependency on it, for sure. I don't think we're doing anything MUX 2.x with it though, but there's definitely gaps before it's ready to be used in WinUI 3. We're tracking productizing that control in #6999.

I'll use this issue to track the first point. Thanks!

@zadjii-msft zadjii-msft added Help Wanted We encourage anyone to jump in on these. Issue-Docs It's a documentation issue that really should be on MicrosoftDocs/Console-Docs Product-Meta The product is the management of the products. and removed Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels Aug 25, 2022
@zadjii-msft zadjii-msft added this to the Icebox ❄ milestone Aug 25, 2022
@OculiViridi
Copy link
Author

Create a Terminal Control to use in a WASDK app

That would be AWESOME! ❤️

It is what I was looking for at the beginning of my project. But then, when I saw that the Windows Terminal also has APIs, I thought it might be worth a try and I find out the GUIConsole WPF sample.

...but I'd never recommend anyone build production code on top of that. It's a viable place to start to understand the APIs, but appending lines to a text block is a terribly un-performant way of rendering text.

Thanks for the hint!
Given this consideration, would it be possible to improve the code sample to let it use a better approach?

Thanks a lot!

@zadjii-msft
Copy link
Member

Given this consideration, would it be possible to improve the code sample to let it use a better approach

I mean, maybe? But the point of that sample isn't really an exercise in performant text rendering, it's more about "how do I use the conpty APIs in a WPF application". In that sense, the sample does quite well. We certainly don't have the bandwidth to optimize that sample farther, but I wouldn't reject PRs to it. I'd rather spend our efforts on the real solution. If you're serious about embedding a terminal control in your application, then #6999 is probably what you'd be more interested in.

@zadjii-msft zadjii-msft added Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Aug 25, 2022
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Aug 25, 2022
@OculiViridi
Copy link
Author

OculiViridi commented Jan 10, 2024

@zadjii-msft Are there any news about those 2 arguments?

  1. Create a version of the sample that uses WinUI3 & WASDK
  2. Create a Terminal Control to use in a WASDK app

@zadjii-msft
Copy link
Member

zadjii-msft commented Jan 10, 2024

Nope, no progress on this front. EDIT: To clarify, this is in the Icebox, which basically means we don't expect the core team to ever have the resources to get around to this. We'd definitely accept community contributions though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Help Wanted We encourage anyone to jump in on these. Issue-Docs It's a documentation issue that really should be on MicrosoftDocs/Console-Docs Product-Meta The product is the management of the products.
Projects
None yet
Development

No branches or pull requests

2 participants