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

Add tview #240

Merged
merged 12 commits into from
Nov 4, 2024
Merged

Add tview #240

merged 12 commits into from
Nov 4, 2024

Conversation

danvergara
Copy link
Owner

@danvergara danvergara commented Oct 30, 2024

Migrate to tview as TUI library

Description

This project started out using gocui as TUI library but I quickly regretted that decision, since it's been 3 years since the last meaningful commit. At some point, I forked the library to add the tabs feature I used the database's metadata views.

At the beginning of the year I planned out to migrate the app to bubbletea, but I couldn't worked on it due to multiple reasons (personal and professional reasons), until now, but I didn't migrate the app to the library mentioned above because I found out that wasn't a good fit for the way dblab works.

Then. I came across a tutorial on tview and I considered it as a potential option for dblab. Finally, I read some tutorials on the matter and quickly found that they have a database client demo that could serve as the foundation layer of the migration to it.

The final object of the migration to a new TUI library is being able to add more modern and flexible features to the client, Gocui was very limited and the fact that was very outdated adds more to it. After landing this change we can scope out the addition of more ambitious features and more database management systems.

To accomplish the migration, this PR removes the gui package and adds a new one called tui. Also, it removes my forked library from the dblab's dependency graph and adds tview as new dependency.

Screenshot from 2024-11-02 19-39-00

Fixes #198

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

I ran the test databases I have for testing and ran the new client against them.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have checked my code and corrected any misspellings

@danvergara danvergara marked this pull request as ready for review November 3, 2024 05:21
Copy link
Collaborator

@ThiagoMowszet ThiagoMowszet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tested it and it works great, congratulations, great migration! 💯🖖

Copy link
Collaborator

@ThiagoMowszet ThiagoMowszet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice update!

* docs(demo-gif): update the gif with the new version

* docs(typo): fix a typo

* add local file

* fix url

* remove old gif
@danvergara danvergara merged commit e72f649 into main Nov 4, 2024
8 checks passed
@danvergara danvergara deleted the add-tview branch November 4, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate completely to bubbletea
2 participants