Skip to content

v0.26.3-alpha.2

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 04 May 00:15
· 43 commits to main since this release
baedc39

v0.26.3-alpha.2 - 2024-05-04

Features

Bug Fixes

  • 4392759
    (examples) Changed user_input example to work with multi-byte unicode chars by @OkieOth in #1069

    This is the proposed solution for issue #1068. It solves the bug in the
    user_input example with multi-byte UTF-8 characters as input.
    

    Fixes:#1068


  • 20fc0dd
    (examples) Fix key handling in constraints by @psobolik in #1066

    Add check for `KeyEventKind::Press` to constraints example's event
    handler to eliminate double keys
    on Windows.
    

    Fixes:#1062


  • f4637d4
    (reflow) Allow wrapping at zero width whitespace by @kxxt in #1074

  • 0a16496
    (uncategorized) Use to_string to serialize Color by @SleepySwords in #934

    Since deserialize now uses `FromStr` to deserialize color, serializing
    `Color` RGB values, as well as index values, would produce an output
    that would no longer be able to be deserialized without causing an
    error.
    

    Color::Rgb will now be serialized as the hex representation of their
    value.
    For example, with serde_json, Color::Rgb(255, 0, 255) would be
    serialized as "#FF00FF" rather than {"Rgb": [255, 0, 255]}.

    Color::Indexed will now be serialized as just the string of the index.
    For example, with serde_json, Color::Indexed(10) would be serialized
    as "10" rather than {"Indexed": 10}.

Other color variants remain the same.

Refactor

Documentation

  • da1ade7
    (github) Update code owners about past maintainers by @orhun in #1073

    As per suggestion in
    https://github.com/ratatui-org/ratatui/pull/1067#issuecomment-2079766990
    
    It's good for historical purposes!
    
  • 3687f78
    (github) Update code owners by @orhun in #1067

    Removes the team members that are not able to review PRs recently (with
    their approval ofc)
    
  • e95230b
    (uncategorized) Add note about scrollbar state content length by @Utagai in #1077

Performance

  • 366c2a0
    (block) Use Block::bordered by @EdJoPaTo in #1041

    Block::bordered() is shorter than

    Block::new().borders(Borders::ALL), requires one less import
    (Borders) and in case Block::default() was used before can even be
    const.

  • 2e71c18
    (buffer) Simplify Buffer::filled with macro by @EdJoPaTo in #1036

    The `vec![]` macro is highly optimized by the Rust team and shorter.
    Don't do it manually.
    
    This change is mainly cleaner code. The only production code that uses
    this is `Terminal::with_options` and `Terminal::insert_before` so it's
    not performance relevant on every render.
    
  • 81b9633
    (calendar) Use const fn by @EdJoPaTo in #1039

    Also, do the comparison without `as u8`. Stays the same at runtime and
    is cleaner code.
    
  • c442dfd
    (canvas) Change map data to const instead of static by @EdJoPaTo in #1037

  • 1706b0a
    (crossterm) Speed up combined fg and bg color changes by up to 20% by @joshka in #1072

Miscellaneous Tasks

  • 5fbb77a
    (readme) Use terminal theme for badges by @TadoTheMiner in #1026

    The badges in the readme were all the default theme. Giving them
    prettier colors that match the terminal gif is better. I've used the
    colors from the VHS repo.
    
  • bef2bc1
    (cargo) Add homepage to Cargo.toml by @joshka in #1080

  • 64eb391
    (uncategorized) Fixup cargo lint for windows targets by @joshka in #1071

    Crossterm brings in multiple versions of the same dep
    
  • 326a461
    (uncategorized) Add package categories field by @mcskware in #1035

    Add the package categories field in Cargo.toml, with value
    `["command-line-interface"]`. This fixes the (currently non-default)
    clippy cargo group lint
    [`clippy::cargo_common_metadata`](https://rust-lang.github.io/rust-clippy/master/index.html#/cargo_common_metadata).
    
    As per discussion in [Cargo package categories
    suggestions](https://github.com/ratatui-org/ratatui/discussions/1034),
    this lint is not suggested to be run by default in CI, but rather as an
    occasional one-off as part of the larger
    [`clippy::cargo`](https://doc.rust-lang.org/stable/clippy/lints.html#cargo)
    lint group.
    

Build

  • c75aa19
    (uncategorized) Add clippy::cargo lint by @joshka in #1053

    Followup to https://github.com/ratatui-org/ratatui/pull/1035 and
    https://github.com/ratatui-org/ratatui/discussions/1034
    
    It's reasonable to enable this and deal with breakage by fixing any
    specific issues that arise.
    

New Contributors

Full Changelog: v0.26.2...v0.26.3-alpha.2