Open sayi65 opened 2 years ago
Hello @sayi65 and thank you for reaching out.
I am sorry, but I don't understand the question. Can you help me understand what you mean by "put this chat in tview" ?
Hello @mum4k
I want to put the barchart in the pages of the tview I would like to know if there is any way to do this
Thank you for explaining the question.
I think this would be doable, but you would have to write some API adapters. Looks like tview
also uses tcell. Both tview
and termdash
take over the entire screen with tcell
, so they aren't directly compatible. However you could run tview
and import just the widget code from the termdash
repository. If you then write an adapter from the Widget API to what tview
uses when talking to tcell
, you should be able to make any widgets from her work with tview
.
@mum4k Thanks for the response.
I think I have worked out how to put barchat into tview. However, when I change the screen from barchat to tview, it collapses. The current process is to use the TAB keyboard to change screens. is there any way to clear the barchat?
@sayi65 thank you for sharing the screenshots.
First we need to ensure that the barchart is no longer periodically drawing itself onto the terminal after we switch away.
Secondly this looks like we may need to instruct tview
to clear / redraw the entire screen after we switch away form the barchart and stop drawing it. I am not familiar with tview
and its API. Do you know if tview
allows such a call?
@mum4k thank you for your comment. Does it occur when transitioning from the barchat to the page on the tview side, so there is a process to clear in the barchat? Since barchat uses containers, is there a way to clear the containers? If the following function can clear the screen?
@sayi65 is there any way how you could share the code that produce the images uploaded in the thread? Is there a repository or a branch I could look at?
That might help me to point you to the to a function or a process that would clear the screen.
@mum4k Sorry for the late reply.Since this project is private. I will modify the code and share it later.
Hello, my golang project use tview(https://github.com/rivo/tview) I would like to put this chat in tview, is there a way?