mirror of
https://github.com/mum4k/termdash.git
synced 2026-04-26 19:05:52 +03:00
[GH-ISSUE #321] How to use in tview #149
Labels
No labels
bug
cleanup
enhancement
enhancement
enhancement
good first issue
help wanted
help wanted
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/termdash#149
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sayi65 on GitHub (Mar 18, 2022).
Original GitHub issue: https://github.com/mum4k/termdash/issues/321
Hello, my golang project use tview(https://github.com/rivo/tview)
I would like to put this chat in tview, is there a way?
@mum4k commented on GitHub (Mar 18, 2022):
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" ?
@sayi65 commented on GitHub (Mar 20, 2022):
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
@mum4k commented on GitHub (Mar 22, 2022):
Thank you for explaining the question.
I think this would be doable, but you would have to write some API adapters. Looks like
tviewalso uses tcell. Bothtviewandtermdashtake over the entire screen withtcell, so they aren't directly compatible. However you could runtviewand import just the widget code from thetermdashrepository. If you then write an adapter from the Widget API to whattviewuses when talking totcell, you should be able to make any widgets from her work withtview.@sayi65 commented on GitHub (Mar 22, 2022):
@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?
@mum4k commented on GitHub (Mar 23, 2022):
@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
tviewto clear / redraw the entire screen after we switch away form the barchart and stop drawing it. I am not familiar withtviewand its API. Do you know iftviewallows such a call?@sayi65 commented on GitHub (Mar 23, 2022):
@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?
github.com/mum4k/termdash@d2b202a0d3/container/options.go (L380)@mum4k commented on GitHub (Mar 24, 2022):
@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.
@sayi65 commented on GitHub (Mar 29, 2022):
@mum4k
Sorry for the late reply.Since this project is private. I will modify the code and share it later.