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

Replace tui_react::Terminal with tui::Terminal #246

Merged
merged 2 commits into from
May 27, 2024

Commits on May 27, 2024

  1. Replace tui_react::Terminal with tui::Terminal

    This is an experiment in converting a program that used the Terminal
    provided by tui-react into a program that uses the Terminal provided by
    ratatui. My hypothesis was that the two were not significantly different
    from eachother, and this seems to be true in this case.
    
    I found that `Widget` trait used by ratatui's `Terminal` is sufficiently
    powerful to pass arbitrary mutable state to rendering code. A relatively
    simple `FunctionWidget` trampoline is used to achieve this.
    
    The tui_react dependency is retained. The code still calls some
    tui_react utility functions and uses its List widget instead of the
    ratatui List widget. These utilities do not depend on the tui_react
    Terminal and could, in theory, be split out of tui-react into a separate
    crate.
    matta authored and Byron committed May 27, 2024
    Configuration menu
    Copy the full SHA
    1350c2f View commit details
    Browse the repository at this point in the history
  2. update dependencies to fix CI

    Byron committed May 27, 2024
    Configuration menu
    Copy the full SHA
    69a7cdd View commit details
    Browse the repository at this point in the history