danvergara / dblab

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

[FEATURE] Navigate between panels with the mouse and/or arrow keys #210

Closed coandco closed 3 months ago

coandco commented 3 months ago

Is your feature request related to a problem? Please describe. I just tried dblab for the first time, and the usage instructions in README.md say things like "to see the structure of a table, locate yourself in the tables list, select your table, and hit enter" without actually specifying how to get to the tables list. Confusingly, clicking on a table in the list will select the table in it, but the focus won't switch so hitting enter does nothing. As far as I could tell, there's nothing in the program itself to give you a clue how to get there, and the actual shortcut (ctrl-H to switch to the panel to your left) is buried in the documentation, even though "select a table and see its structure" is one of the first things that makes sense to try when exploring a database.

Describe the solution you'd like There are a few possible solutions. One, clicking could switch panes, so you could click on a table name and hit enter to display it. Two, there could be some kind of in-app cheatsheet, like what happens in lazygit when you press the question mark key. Three, some aliases could be added for navigation -- I realize that hjkl are intuitive to vim users, but the first thing I reach for is the arrow keys, so maybe ctrl-left/right/up/down could go between panes?

I realize this is a bit unfocused, but I figured I'd try to give first-time-user feedback and hopefully help improve the experience for those unfamiliar with the interface. I love the functionality of dblab now that I've figured it out and think you've got a great project here!

danvergara commented 3 months ago

Hi @coandco

Thanks for reaching out!

I'm so sorry for the confusion. I need to improve the navigation description. It clearly lacks a description on how to navigate between panels. I'll add that as soon as I can.

When it comes to the proposed solutions, I won't invest time on improving the current ux/ui because I'll introduce a new gui/tui library (migration described in #198), because the current one is old and unsupported, so it might change the way we interact with dblab drastically.

The best I can do is right now is improve the navigation documentation. I'll keep this open until now.