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

Migrate completely to bubbletea #198

Closed
danvergara opened this issue May 8, 2024 · 0 comments · Fixed by #240
Closed

Migrate completely to bubbletea #198

danvergara opened this issue May 8, 2024 · 0 comments · Fixed by #240
Assignees
Labels
expert Good for advanced developers kind/enhancement New feature or request

Comments

@danvergara
Copy link
Owner

danvergara commented May 8, 2024

Is your feature request related to a problem? Please describe.

dblab relies on a fork of gocui which has been pretty inactive for 3 years, now. So, I think it's time to migrate completely to bubbletea.

Describe the solution you'd like

I'm proposing a complete rewrite of the UI adopting bubbletea and ditching gocui. Can't guarantee that dblab is gonna look the same, maybe a bit similar to what we have today.

Describe alternatives you've considered

There's no alternative, it's only bubbletea.

Additional context
If I manage to pull it off, I may improve the text input capabilities of dblab to improve the experience of typing really long queries.

To migrate successfuly to bubbletea, I need to scope out a new plan to migrate to buubletea.

First off, it;s necessary to list the components of the current UI and see if bubbletea offers similar widgets.

UI Components:

  1. List of tables
  2. Navigation table
  3. Text input (where uses type queries)
  4. Resultset View
  5. Pagination widget

Description of each component

List of tables

This the widget where the available tables are listed. The user can switch to this view and press enter on any to list the first items of that list.

Navigation table

This a widget that shows a menu that displays four options:

  • Rows that displays the first records on a selected table
  • Structure that displays the structure of the selected table
  • Constraints that shows the constraints on a given table
  • Indexes that displays the indexes on a selected table

The user can switch between tabs using key bidings.

Text input

This might be the simplest component right now. It only accepts text and execute queries by pressing ctrl + Space. It could be more complex if I add autocomplete capabilities.

Resultset view

This is where the resultsets are displayed, it highly relies on tables widgets to work. Any kind of migrations should respect current key bindings to navigate through it.

Pagination widget

This is used to navigate through the pages given an offset.

@danvergara danvergara added kind/enhancement New feature or request expert Good for advanced developers labels May 8, 2024
@danvergara danvergara self-assigned this May 8, 2024
@danvergara danvergara mentioned this issue Nov 3, 2024
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
expert Good for advanced developers kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant