charmbracelet / bubbles

TUI components for Bubble Tea 🫧
MIT License
5.52k stars 265 forks source link

Feature request: Tree model #233

Open mariusor opened 2 years ago

mariusor commented 2 years ago

Hello, I want to ask if the charmbracelet community would be interested in accepting a PR for adding a tree model to the project.

A while ago I needed one for a project of mine and at the time there was none available, so I created one.

Currently I think it reached a level of maturity that other people might be interested in using it.

If anyone can have a look at the code, and the example, let me know if it would be accepted as a PR.

mariusor commented 2 years ago

@maaslalani @meowgorithm (apologies for pinging you directly, but I saw you are members of Charm that are active in the issues section).

Is there an interest in my proposal, or should I just keep it as an out of tree model?

muesli commented 2 years ago

@mariusor Apologies for not having responded sooner, but we'll definitely check out your code! A tree-view bubble is probably inevitable and we definitely see a need for such a component. It's certainly one of the most complex visual components and getting it right is non-trivial, so I'm excited to see what you came up with!

mariusor commented 2 years ago

Thank you @muesli. Looking forward to comments.

mariusor commented 11 months ago

Hello everyone, any hope to review my tree model?

I have made some improvements that extend the use to something like a threaded "conversation" model, which has another example

screenshot-20231120125447_560268653-swaygrab

simbafs commented 11 months ago

Look awesome!

bashbunni commented 1 month ago

Hey, thanks for this! I saw your messages on Mastodon as well. We're definitely interested in your implementation, we just need to give it a very thorough review and try to break it. It may take a while to merge, but please don't take that as a lack of interest. Thank you so much for your patience!

mariusor commented 1 month ago

Hi, I think that with the addition of the lipgloss/tree model my PR is probably unnecessary to merge.

I have not played with that one to see if there are any performance or any significant API differences but I trust you guys.