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 ratatui support #52

Merged
merged 6 commits into from
Aug 22, 2023
Merged

Add ratatui support #52

merged 6 commits into from
Aug 22, 2023

Conversation

r-bar
Copy link
Contributor

@r-bar r-bar commented Aug 22, 2023

Description

As of Aug 14, 2022 the creator of tui-rs announced he was stepping back from the project and has since archived the repository. ratatui has emerged as the successor library and has demonstrated a year of solid development.

I apologize for not opening a feature issue first. I wrote the update to use for my own purposes before considering contributing my changes upstream. No hard feelings if you choose to close this PR.

List here your changes

  • Broke up with-<backend> feature flags to generalize them across the new high level TUI library options. I suggest deprecating the with- feature flags in favor of explicitly naming each component feature individually (eg. --features ratatui,crossterm,derive). See the README changes for more details. I may have to update the README here depending on your feedback.
  • Added conditional compilation cfgs based on the new feature flags.

Maintainability notes

I have listed this as a breaking change in the questionnaire below. As written this should not actually be a breaking change for tui-realm users, it is strictly an enhancement allowing the use of the currently maintained tui-rs alternative. As the project owner I urge you to consider issuing a breaking change to switch the default TUI library to ratatui (and potentially drop tui-rs support).

Testing and CI notes

To effectively check the changes introduced by this PR you have to run the test suite with the cross product of backends and TUI libraries supported. The following cargo test commands are passing and should be added to the CI:

  • cargo test --features tui,crossterm,derive --no-default-features
  • cargo test --features tui,termion,derive --no-default-features
  • cargo test --features ratatui,crossterm,derive --no-default-features
  • cargo test --features ratatui,termion,derive --no-default-features

Type of change

Please select relevant options.

  • 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

Checklist

  • My code follows the contribution 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
  • My changes generate no new warnings
  • I formatted the code with cargo fmt
  • I checked my code using cargo clippy and reports no warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have introduced no new C-bindings
  • The changes I've made are Windows, MacOS, UNIX, Linux compatible (or I've handled them using cfg target_os)
  • I increased or maintained the code coverage for the project, compared to the previous commit

@veeso veeso self-requested a review August 22, 2023 07:44
@veeso
Copy link
Owner

veeso commented Aug 22, 2023

Wow, thanks! Great job!

@veeso veeso merged commit f4e6a08 into veeso:main Aug 22, 2023
6 checks passed
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.

2 participants