danvergara / dblab

The database client every command line junkie deserves.
MIT License
2.37k stars 62 forks source link

Migrate dblab to a new tui framework #43

Closed danvergara closed 3 years ago

danvergara commented 3 years ago

Is your feature request related to a problem? Please describe. The current framework that dbladb relies on is gocui, but is not under active development. So, if we spot a nasty bug or we can add extra functionality out of those we currently have, we're not gonna be able fix or add them.

Describe the solution you'd like I'm proposing to migrate to lipbgloss, which is another alternative that is under active development and looks nicer than the current solution.

Describe alternatives you've considered I considered temui, but it's not an option because of the lack of critical features. I was a direct competitor to gocui at the beginning.

Additional context I'm considering to add a view to show the schema of the selected table on the interface, but currenly we don't have available space to do so. I'm thinking to take advantage of the tabs feature that lipgloss provides as show below:

lipgloss
danvergara commented 3 years ago

After a couple of hours, I realized that lipgloss is not an option for this project. But good news, I found tview which looks promising and is really famous framework among go developers. It's the framework behind cool projects like: k9s, github-tui and more. Actually, it includes an example that looks so similar to a feature that I'd like to add to dblab in incoming releases.

postgres-tui

danvergara commented 3 years ago

Turns out tview lacks of very important feature which is a good input text field. It actually has one, but it's not big enough to hold a multi-line query. The only option left is the gocui fork. It's the only one library available that provides that tabs feature that I've looking for. So, the plan is migrate to the this fork, and take advantage from the tabs features to show the query window along the schema one. 2241d784-lazydocker2

danvergara commented 3 years ago

There's another fork maintained by a community, which is even more promising than the described above. I'm gonna try that.

https://github.com/awesome-gocui/gocui