deno_tui icon indicating copy to clipboard operation
deno_tui copied to clipboard

(WIP) feat!: rework `DrawObject`s

Open Im-Beast opened this issue 2 years ago • 3 comments

This PR is meant to replace DrawObjects with Painters.

Main changes that are planned include:

  • Canvas will now implement Drawable interface, which has draw() method. This will allow for easier interception and/or manipulation of drawing on canvas.
  • BoxObject and TextObject will now use BoxPainter and TextPainter names.
    • This should remove a lot of confussion of what they exactly are and what they do
  • TextObject will use normal rectangle, and will allow for multiline text drawing, simplifying component creation that use text by a lot.
  • new ShapePainter class that will allow for drawing on canvas using 2d array, allowing things like Frame to use only one component instead of combining multiple – again simplyfying component creation
  • Potential performance improvements as painters will try to calculate neccessary data using signals instead of doing it each time rerender() gets called

Im-Beast avatar Aug 04 '23 15:08 Im-Beast

Is this completely dead?

agorushkin avatar Jun 26 '24 09:06 agorushkin

Is this completely dead?

This PR, probably.

Tui in itself? Not really There is just a lot of things I want to do at this moment. I was working on completely rewritten Tui version, but there is a lot of things I want to take in consideration about its design, mostly to completely fix issues I have with current implementation. There is also a lot of unknowns regarding Deno and JSX support on JSR.

Im-Beast avatar Jun 26 '24 09:06 Im-Beast

Alright, I understand.

I really like the concept of this library and its relative novelty, especially in the Deno space. I haven't seen many good alternatives in the Node ecosystem either. However, I've encountered some bugs with rendering and other areas. These might not warrant issues right now, considering a rewrite is planned.

If you develop a more stable design for the project and have a clear vision for its overall feel, I'd be willing to help with some implementations. While I don't have extensive experience in this terminal rendering aspect, I'd be eager to contribute and learn.

agorushkin avatar Jul 12 '24 03:07 agorushkin