Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ratatui/ratatui
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.28.0
Choose a base ref
...
head repository: ratatui/ratatui
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.28.1
Choose a head ref
  • 18 commits
  • 100 files changed
  • 11 contributors

Commits on Aug 8, 2024

  1. Configuration menu
    Copy the full SHA
    3fdb5e8 View commit details
    Browse the repository at this point in the history
  2. docs: remove superfluous doc(inline) (#1310)

    It's no longer needed since #1260
    EdJoPaTo authored Aug 8, 2024
    Configuration menu
    Copy the full SHA
    097ee86 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    730dfd4 View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2024

  1. Configuration menu
    Copy the full SHA
    d5477b5 View commit details
    Browse the repository at this point in the history

Commits on Aug 12, 2024

  1. Configuration menu
    Copy the full SHA
    57d8b74 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8b624f5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fdd5d8c View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2024

  1. build: simplify Windows build (#1317)

    Termion is not supported on Windows, so we need to avoid building it.
    
    Adds a conditional dependency to the Cargo.toml file to only include
    termion when the target is not Windows. This allows contributors to
    build using the `--all-features` flag on Windows rather than needing
    to specify the features individually.
    joshka authored Aug 13, 2024
    Configuration menu
    Copy the full SHA
    0256269 View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2024

  1. fix: fix u16 overflow in Terminal::insert_before. (#1323)

    If the amount of characters in the screen above the viewport was greater
    than u16::MAX, a multiplication would overflow. The multiply was used to
    compute the maximum chunk size. The fix is to just do the multiplication
    as a usize and also do the subsequent division as a usize.
    
    There is currently another outstanding issue that limits the amount of
    characters that can be inserted when calling Terminal::insert_before to
    u16::MAX. However, this bug can still occur even if the viewport and the
    amount of characters being inserted are both less than u16::MAX, since
    it's dependant on how large the screen is above the viewport.
    
    Fixes #1322
    nfachan authored Aug 14, 2024
    Configuration menu
    Copy the full SHA
    2fb0b8a View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2024

  1. Configuration menu
    Copy the full SHA
    6d1bd99 View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2024

  1. chore: rename ratatui-org to ratatui (#1334)

    All urls updated to point at https://github.com/ratatui
    
    To update your repository remotes, you can run the following commands:
    
    ```shell
    git remote set-url origin https://github.com/ratatui/ratatui
    ```
    joshka authored Aug 21, 2024
    Configuration menu
    Copy the full SHA
    23516bc View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2024

  1. feat(terminal): Add ratatui::init() and restore() methods (#1289)

    These are simple opinionated methods for creating a terminal that is
    useful to use in most apps. The new init method creates a crossterm
    backend writing to stdout, enables raw mode, enters the alternate
    screen, and sets a panic handler that restores the terminal on panic.
    
    A minimal hello world now looks a bit like:
    
    ```rust
    use ratatui::{
        crossterm::event::{self, Event},
        text::Text,
        Frame,
    };
    
    fn main() {
        let mut terminal = ratatui::init();
        loop {
            terminal
                .draw(|frame: &mut Frame| frame.render_widget(Text::raw("Hello World!"), frame.area()))
                .expect("Failed to draw");
            if matches!(event::read().expect("failed to read event"), Event::Key(_)) {
                break;
            }
        }
        ratatui::restore();
    }
    ```
    
    A type alias `DefaultTerminal` is added to represent this terminal
    type and to simplify any cases where applications need to pass this
    terminal around. It is equivalent to:
    `Terminal<CrosstermBackend<Stdout>>`
    
    We also added `ratatui::try_init()` and `try_restore()`, for situations
    where you might want to handle initialization errors yourself instead
    of letting the panic handler fire and cleanup. Simple Apps should
    prefer the `init` and `restore` functions over these functions.
    
    Corresponding functions to allow passing a `TerminalOptions` with
    a `Viewport` (e.g. inline, fixed) are also available
    (`init_with_options`,
    and `try_init_with_options`).
    
    The existing code to create a backend and terminal will remain and
    is not deprecated by this approach. This just provides a simple one
    line initialization using the common options.
    
    ---------
    
    Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
    joshka and orhun authored Aug 22, 2024
    Configuration menu
    Copy the full SHA
    ed51c4b View commit details
    Browse the repository at this point in the history
  2. test: Avoid unneeded allocations in assertions (#1335)

    A vector can be compared to an array.
    mo8it authored Aug 22, 2024
    Configuration menu
    Copy the full SHA
    0d5f3c0 View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2024

  1. docs(examples): add widget implementation example (#1147)

    This new example documents the various ways to implement widgets in
    Ratatui. It demonstrates how to implement the `Widget` trait on a type,
    a reference, and a mutable reference. It also shows how to use the
    `WidgetRef` trait to render boxed widgets.
    joshka authored Aug 23, 2024
    Configuration menu
    Copy the full SHA
    3631b34 View commit details
    Browse the repository at this point in the history
  2. fix(terminal): Terminal::insert_before would crash when called while …

    …the viewport filled the screen (#1329)
    
    Reimplement Terminal::insert_before. The previous implementation would
    insert the new lines in chunks into the area between the top of the
    screen and the top of the (new) viewport. If the viewport filled the
    screen, there would be no area in which to insert lines, and the
    function would crash.
    
    The new implementation uses as much of the screen as it needs to, all
    the way up to using the whole screen.
    
    This commit:
    - adds a scrollback buffer to the `TestBackend` so that tests can
    inspect and assert the state of the scrollback buffer in addition to the
    screen
    - adds functions to `TestBackend` to assert the state of the scrollback
    - adds and updates `TestBackend` tests to test the behavior of the
    scrollback and the new asserting functions
    - reimplements `Terminal::insert_before`, including adding two new
    helper functions `Terminal::draw_lines` and `Terminal::scroll_up`.
    - updates the documentation for `Terminal::insert_before` to clarify
    some of the edge cases
    - updates terminal tests to assert the state of the scrollback buffer
    - adds a new test for the condition that causes the bug
    - adds a conversion constructor `Cell::from(char)`
    
    Fixes: #999
    nfachan authored Aug 23, 2024
    Configuration menu
    Copy the full SHA
    aed60b9 View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2024

  1. Configuration menu
    Copy the full SHA
    9ed85fd View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2024

  1. chore(ci): update release strategy (#1337)

    closes #1232 
    
    Now we can trigger point releases by pushing a tag (follow the
    instructions in `RELEASE.md`). This will create a release with generated
    changelog.
    
    There is still a lack of automation (e.g. updating `CHANGELOG.md`), but
    this PR is a good start towards improving that.
    orhun authored Aug 25, 2024
    Configuration menu
    Copy the full SHA
    65da535 View commit details
    Browse the repository at this point in the history
  2. chore(release): prepare for 0.28.1 (#1343)

    🧀 
    
    The current release steps in reference to #1337
    
    - Bump version in `Cargo.toml`
    - `git cliff -u -p CHANGELOG.md -t v0.28.1`
    - Merge the PR
    - `git tag v0.28.1`
    - `git push origin v0.28.1`
    
    We can probably automate away most of these with `release-plz` when it
    fully supports `git-cliff`'s GitHub integration.
    orhun authored Aug 25, 2024
    Configuration menu
    Copy the full SHA
    3a90e2a View commit details
    Browse the repository at this point in the history
Loading