-
Notifications
You must be signed in to change notification settings - Fork 788
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
Tree widget #237
Tree widget #237
Conversation
7265d73
to
628de8f
Compare
/cc @cjbassi |
Thanks for the pr! I'd like to merge this but I'll need some time to look over it and possibly suggest any changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks nice. 2 considerations:
-
How should the cursor be positioned after collapsing a node? Currently it seems like
SelectedRow
stays the same, but sometimes that leaves no currently visible node selected. Although that might be fine. Just wanted to get some thoughts. -
Expand
and the other functions that operate onself.rows
would potentially operate on an incorrect node if a node is added andExpand
is called before the tree is rerendered, sinceself.rows
is only updated inDraw
. What if we madeself.Nodes
private and added aSetNodes
method that callsprepareNodes
? That would also eliminate calling prepareNodes every draw too.
I did it intentionally. IMHO, cursor position relates to the line in block area, not to the content is rendered to this area. May be I wrong.
I like the idea to add public method |
gentle ping @cjbassi |
Apologies for the delay, but I haven't forgotten about this! Currently finishing up the school quarter and I should be able to get to this soon. |
No problem) Good luck in the school!
…On Sat, 8 Jun 2019 at 01:29, Caleb Bassi ***@***.***> wrote:
Apologies for the delay, but I haven't forgotten about this! Currently
finishing up the school quarter and I should be able to get to this soon.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#237?email_source=notifications&email_token=AAC7VQCTB4GANFAKG4F5NKTPZLOLHA5CNFSM4HG547Q2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXHEVUA#issuecomment-500058832>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAC7VQCKD4BKOMW3UL4RWRDPZLOLHANCNFSM4HG547QQ>
.
|
Sorry for the delay again! Been out of commission a bit due to an injury. I've looked it over again and it LGTM. Changing the widget so that nodes are set with |
I accidentally merged before force pushing the PR which is why it says the PR was closed just btw. |
Hello, there.
I've created a tree widget for my project. I believe this can be useful for anyone else :)
Let me know, please, what you think about that.
Thanks for the termui project!