Terminal.Gui icon indicating copy to clipboard operation
Terminal.Gui copied to clipboard

Support TUI apps running in the browser - aka Add HTML5 rendering support

Open JessicaMulein opened this issue 2 years ago • 13 comments

Per side conversation with @BDisp in #1601, creating this ticket to track development of this feature/project.

At the moment, it seems like the Blazor required references might be best kept in a separate project. I'm thinking I may not necessarily need to fork.

I may create a new repo that is more closely aligned to Gui.cs and does not also accommodate Spectre.console (that'll be a fork I suppose)..

Primary repos (at the moment) https://github.com/HACC-ers/HACC https://github.com/HACC-ers/HACC.Development

JessicaMulein avatar Mar 13 '22 19:03 JessicaMulein

I made this changes in gui.cs: https://github.com/BDisp/gui.cs/commit/4921492db6bfa49ad70d4a8ad4a7af118150c518

The changes in HACC: https://github.com/BDisp/HACC/commit/8bfc71b110e1d1152aec4ea89a9898764fb84c39

The changes in HACC.Development: https://github.com/BDisp/HACC.Development/commit/70d98466ef619841078f9f41036a6344223de77a

BDisp avatar Mar 14 '22 17:03 BDisp

Would it be better for this Issue to be renamed to "Add HTML5 rendering support"??? I think that's a more customer-centric way of stating it, no?

tig avatar Mar 17 '22 09:03 tig

Unfortunately it depends presently on a lot of newer DotNet 6 features, which could maybe be avoided- but having the demo on bleeding edge Blazor seems to make sense-ish?

JessicaMulein avatar Mar 18 '22 19:03 JessicaMulein

Some seven days later, BDisp and I have made a lot of progress on this and have it a little better distilled into a usable package. We still have a ways to go on finishing the implementation but we're a heck of a lot closer!

unlisted: https://www.nuget.org/packages/HACC/

Our project board https://github.com/orgs/HACC-ers/projects/1/views/1

JessicaMulein avatar Mar 25 '22 20:03 JessicaMulein

My take is that something like HTML5 rendering support as HACC implements is a good candidate for an add-on to Gui.cs, in the same way that the terminal emulation is an add-on component to Gui.cs.

The rationale is that these are components with evolving APIs and evolving implementations, and should grow, mature and evolve on their own (also, they can be used with other libraries)

migueldeicaza avatar Mar 27 '22 16:03 migueldeicaza

Yes, it so happens that I was able to inherit your structure and implement Spectre.Console's Interface pattern at the same time. I think we're going to be a multi-compatible component. Your one stop blazor gui shop!

That being said, if you ever wanted to internalize your section of the code (90%) you're welcome to it and we'd be happy to help.

JessicaMulein avatar Mar 31 '22 17:03 JessicaMulein

PS @migueldeicaza I am a big fan of yours. So sad you're not at Microsoft (for selfish reasons! Still had hoped to work with you).

But of course, I am not tied to microsoft... Maybe our paths will yet cross!

JessicaMulein avatar Mar 31 '22 17:03 JessicaMulein

We've basically formed a team/organization in the process of this and we're getting very close to a working version. Starting to display text in the right colors and places.

JessicaMulein avatar Apr 09 '22 20:04 JessicaMulein

https://github.com/Blazor-Console/HACC/blob/main/README.md image

JessicaMulein avatar Apr 11 '22 05:04 JessicaMulein

Looking great!

tznind avatar Apr 11 '22 10:04 tznind

are the problems on the right border caused by non-monospaced fonts?

Trolldemorted avatar Apr 22 '22 21:04 Trolldemorted

are the problems on the right border caused by non-monospaced fonts?

No, because it's a monospaced "Courier" font. It has to do with wide runes that not been yet well coded.

BDisp avatar Apr 22 '22 21:04 BDisp

Related to, but not the same as:

  • #2938

tig avatar Jan 19 '24 16:01 tig