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: replace tui with ratatui #5650

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

therustmonk
Copy link
Contributor

Description

Switch from the tui crate to ratatui.

Motivation and Context

The tui crate is no longer actively maintained. Fixes #5618

How Has This Been Tested?

CI

@therustmonk
Copy link
Contributor Author

After updating the launchpad, I saw that it's an opportune moment to implement the same changes here, given today's minimal alterations.

@ghpbot-tari-project ghpbot-tari-project added P-acks_required Process - Requires more ACKs or utACKs P-reviews_required Process - Requires a review from a lead maintainer to be merged labels Aug 21, 2023
@github-actions
Copy link

github-actions bot commented Aug 21, 2023

Test Results (CI)

1 191 tests   1 191 ✔️  8m 7s ⏱️
     37 suites         0 💤
       1 files           0

Results for commit b90bfe9.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Aug 21, 2023

Test Results (Integration tests)

  2 files  +  2  11 suites  +11   27m 32s ⏱️ + 27m 32s
27 tests +27  23 ✔️ +23  0 💤 ±0  4 +4 
31 runs  +31  27 ✔️ +27  0 💤 ±0  4 +4 

For more details on these failures, see this check.

Results for commit b90bfe9. ± Comparison against base commit 08ba91a.

♻️ This comment has been updated with latest results.

@therustmonk therustmonk marked this pull request as ready for review August 21, 2023 15:10
Copy link
Collaborator

@SWvheerden SWvheerden left a comment

Choose a reason for hiding this comment

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

this does not seem to work correctly:
Screenshot 2023-08-30 at 09 38 35

the transaction view works fine, but all other tabs are empty

@stringhandler
Copy link
Collaborator

Tested on windows, but it skips every second tab when I press left and right

@kdheepak
Copy link

kdheepak commented Feb 2, 2024

On Windows, the duplicate key issue is due to a new feature in Crossterm. You want to make sure you check for the KeyEventKind::Press state:

-  CrosstermEvent::Key(e) => tx.send(Event::Key(e)),
+  CrosstermEvent::Key(key) => {
+      if key.kind == KeyEventKind::Press {
+        tx.send(Event::Key(key));
+      }
+    },

For relevant information here: ratatui-org/ratatui#347 and here: https://ratatui.rs/faq/#why-am-i-getting-duplicate-key-events-on-windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-acks_required Process - Requires more ACKs or utACKs P-reviews_required Process - Requires a review from a lead maintainer to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RUSTSEC-2023-0049: tui is unmaintained; use ratatui instead
5 participants