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

Fix tview ux #244

Merged
merged 2 commits into from
Nov 12, 2024
Merged

Fix tview ux #244

merged 2 commits into from
Nov 12, 2024

Conversation

danvergara
Copy link
Owner

Description

I just realized that the ux was a little broken compared the previous behaviors before the ports.

Changes

  • Fix the tables list by only showing content and data info by pressing enter on the the desired table
  • Fix the pagination text view. It wasn't getting resetted after doing a query.

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?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

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

return nil
}

func (t *Tui) setupPagination() {
t.aw.pagination = tview.NewTextView().SetText("1 / 10")
t.aw.pagination = tview.NewTextView().SetText(fmt.Sprintf("%4d / %4d", 1, 1))

Choose a reason for hiding this comment

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

Porque se cambia el SetText("1 / 10")?

Copy link

@Sirpyerre Sirpyerre left a comment

Choose a reason for hiding this comment

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

Leave some comments.

@@ -112,6 +112,8 @@ func (t *Tui) setupQueries() {
return event
}

t.aw.pagination.SetText(fmt.Sprintf("%4d / %4d", 1, 1))

Choose a reason for hiding this comment

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

¿Que significa estofmt.Sprintf("%4d / %4d", 1, 1), se setea un solo elemento? No sería más sinificativo si se colocan constantes o no vale la pena?

@danvergara danvergara merged commit 459cc1b into main Nov 12, 2024
8 checks passed
@danvergara danvergara deleted the fix-tview-ux branch November 12, 2024 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants