Skip to content
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

Components Wishlist (from Bubbles) #5

Open
8 of 11 tasks
leostera opened this issue Dec 14, 2023 · 6 comments
Open
8 of 11 tasks

Components Wishlist (from Bubbles) #5

leostera opened this issue Dec 14, 2023 · 6 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@leostera
Copy link
Owner

leostera commented Dec 14, 2023

Having a nice little library of components to reuse would be amazing, and Bubbles has a nice list that we can just port over:

  • cursor
  • spinner
  • text input
  • text area
  • table (even virtualized!)
  • progress bar: we have something here, not amazing yet but its a good start
  • paginator
  • list with filtering
  • a toggleable help bar
  • key bindings component to help declaratively map keys to actions
  • checkbox – just a tiny little checkbox :)
@leostera leostera added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Dec 14, 2023
@sabine
Copy link
Contributor

sabine commented Dec 20, 2023

Spinner added in #13. 🔥

@lessp
Copy link
Contributor

lessp commented Dec 25, 2023

I began looking at what would be required for text input.

textinput in bubbles makes use of bubbletea itself. This makes one able to simply forward the events to the textinput component. What are your thoughts on doing the same? The alternative would be to simply expose commands from the textinput and map the events yourself. This however, feels like it could become quite cumbersome.

E.g. bubbles does this:

match event with 
| e -> 
  (* do other stuff *)
  let new_text_input = Text_input.update e in
  { model with text_input = new_text_input }

The alternative, if you want leaves to be stand-alone (unless we separate the events), one would have to do this:

match event with 
| KeyDown Left ->
  let new_text_input = Text_input.character_backward model.text_input in
  { model with text_input = new_text_input }
| ...

@leostera
Copy link
Owner Author

I think you made the right call with taking the Event.t and making Leaves depend on MintTea 🙏🏼

@leostera leostera changed the title Copy over components from Bubbles Components Wishlist (from Bubbles) Dec 29, 2023
@metame
Copy link
Contributor

metame commented Feb 12, 2024

I'm starting on a paginator component :)

@metame
Copy link
Contributor

metame commented Mar 12, 2024

Forgot to mention this issue in my PR, but Paginator is done for anyone looking at this list.

@davesnx
Copy link

davesnx commented Oct 22, 2024

I would love to have a "Menu" https://github.com/p-gen/smenu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
Status: No status
Development

No branches or pull requests

5 participants