New interface using Charm.sh libraries
Topic How hard would it be to redo the UI using charm.sh libraries?
NOTE: I have no affiliation with them
This is soft-serve a git server built with it:
It is an SSH App made with Wish
Here are some more images for inspiration:
Bubbles
Bubbles is a library of TUI components for Bubble Tea 🫧
Progress
Viewport
List
TextArea
Table
Lipgloss
Style definitions for nice terminal layouts 👄
Your thoughts I think this would probably require a task force that I'm happy to be a part of
I'm interested in charm. I've considered both switching to tview and charm, but I haven't spent any proper time evaluating either of them.
tview uses tcell as an underlying library which is also the case for our existing rendering library gocui. So there may not be as much work moving to tview than moving to charm. k9s is an application I've used which uses tview and it seems to be a good fit there.
Now, as for charm: I'm a huge fan of the design, but, I've clicked through all the existing projects using it and the only one I found that actually seemed to be more than just a POC was https://github.com/dlvhdr/gh-dash, and even that has little functionality. So it's lacking in good exemplar projects that I can learn from.
I'll also note that charm's design looks great, but in Lazygit we really need to display a whole lot of information at once which requires a compact look. I don't know how easy it is to roll your own widgets in charm but it would be a necessity.
Also, it may be that sticking with gocui is the easiest option, simply because the library is fairly straightforward and it's simple to make changes to the fork. But I won't lie: it is a maintenance burden to worry about a bunch of low-level view-layer stuff that is probably handled perfectly in some other library.
Hey @jesseduffield I just noticed this was still open. I think only you can decide if the effort is worth it or not. I have no idea how much work the migration to a different UI lib would be.
As for customization, check out charm.sh. They have several packages that work together to allow you progressive customization.
First, there's Bubble Tea which is the TUI framework (I guess it's equivalent to gocui)
These are the [libraries used in/with Bubble Tea]:(https://github.com/charmbracelet/bubbletea?tab=readme-ov-file#libraries-we-use-with-bubble-tea)
- Bubbles: Common Bubble Tea components such as text inputs, viewports, spinners and so on
- Lip Gloss: Style, format and layout tools for terminal applications
- Harmonica: A spring animation library for smooth, natural motion
- BubbleZone: Easy mouse event tracking for Bubble Tea components
- Termenv: Advanced ANSI styling for terminal applications
- Reflow: Advanced ANSI-aware methods for working with text
There are a bunch of component examples in Bubbles and style examples in Lip Gloss. And other libraries like Teacup - bubble components.
There a list of Bubble Tea programs in production. Here are some I find nice and kinda complex
- circumflex: read Hacker News in the terminal
- fm: a terminal-based file manager
- Neon Modem Overdrive: a BBS-style TUI client for Discourse, Lemmy, Lobste.rs and Hacker News
- redis-viewer: a Redis databases browser
- Soft Serve - Git server
The most data-dense app I found there was SlurmCommander
I'm not saying all this to try to convince you. I'm just trying to make it easier for you to have all the information you need. I already love lazygit, so that's the least I could do. You can close this issue, if you want to.
But before that, just a question: is it possible to customize lazygit's appearance?
gh-dash is a bit similar to lazygit and could give some inspiration on what is possible with charms libs!