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(deps): update rust crate ratatui to 0.27.0 #352

Merged
merged 2 commits into from
Jun 24, 2024
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 24, 2024

Mend Renovate

This PR contains the following updates:

Package Type Update Change
ratatui (source) dependencies minor 0.26.2 -> 0.27.0

Release Notes

ratatui-org/ratatui (ratatui)

v0.27.0

Compare Source

In this version, we have focused on enhancing usability and functionality with new features like
background styles for LineGauge, palette colors, and various other improvements including
improved performance. Also, we added brand new examples for tracing and creating hyperlinks!

Release highlights: https://ratatui.rs/highlights/v027/

⚠️ List of breaking changes can be found here.

Features
  • eef1afe (linegauge) Allow LineGauge background styles by @​nowNick in #​565

    This PR deprecates `gauge_style` in favor of `filled_style` and
    `unfilled_style` which can have it's foreground and background styled.
    
    `cargo run --example=line_gauge --features=crossterm`
    
    line_gauge_demo.mov

    Implements:#​424

  • 1365620 (borders) Add FULL and EMPTY border sets by @​joshka in #​1182

    border::FULL uses a full block symbol, while border::EMPTY uses an
    empty space. This is useful for when you need to allocate space for the
    border and apply the border style to a block without actually drawing a
    border. This makes it possible to style the entire title area or a block
    rather than just the title content.

use ratatui::{symbols::border, widgets::Block};
let block = Block::bordered().title("Title").border_set(border::FULL);
let block = Block::bordered().title("Title").border_set(border::EMPTY);
cargo run --example tracing
RUST_LOG=trace cargo run --example=tracing
cat tracing.log

Made with VHS

  • 1520ed9 (layout) Impl Display for Position and Size by @​joshka in #​1162

  • 46977d8 (list) Add list navigation methods (first, last, previous, next) by @​joshka in #​1159 [breaking]

    Also cleans up the list example significantly (see also
    <https://github.com/ratatui-org/ratatui/issues/1157>)
    

    Fixes:#​1159

    BREAKING CHANGE:The List widget now clamps the selected index to the
    bounds of the list when navigating with first, last, previous, and
    next, as well as when setting the index directly with select.

  • 10d7788 (style) Add conversions from the palette crate colors by @​joshka in #​1172

    This is behind the "palette" feature flag.
    
    ```rust
    use palette::{LinSrgb, Srgb};
    use ratatui::style::Color;
    
    let color = Color::from(Srgb::new(1.0f32, 0.0, 0.0));
    let color = Color::from(LinSrgb::new(1.0f32, 0.0, 0.0));
    ```
    
  • 7ef2dae (text) support conversion from Display to Span, Line and Text by @​orhun in #​1167

    Now you can create `Line` and `Text` from numbers like so:
    
    ```rust
    let line = 42.to_line();
    let text = 666.to_text();
    ```
    
  • 74a32af (uncategorized) Re-export backends from the ratatui crate by @​joshka in #​1151

    `crossterm`, `termion`, and `termwiz` can now be accessed as
    `ratatui::{crossterm, termion, termwiz}` respectively. This makes it
    possible to just add the Ratatui crate as a dependency and use the
    backend of choice without having to add the backend crates as
    dependencies.
    
    To update existing code, replace all instances of `crossterm::` with
    `ratatui::crossterm::`, `termion::` with `ratatui::termion::`, and
    `termwiz::` with `ratatui::termwiz::`.
    
  • 3594180 (uncategorized) Make Stylize's .bg(color) generic by @​kdheepak in #​1103 [breaking]

  • 0b5fd6b (uncategorized) Add writer() and writer_mut() to termion and crossterm backends by @​enricozb in #​991

    It is sometimes useful to obtain access to the writer if we want to see
    what has been written so far. For example, when using &mut [u8] as a
    writer.
    
Bug Fixes
Refactor
- list.start_corner(Corner::TopLeft);
- list.start_corner(Corner::TopRight);
// This is not an error, BottomRight rendered top to bottom previously
- list.start_corner(Corner::BottomRight);
// all becomes
+ list.direction(ListDirection::TopToBottom);
- list.start_corner(Corner::BottomLeft);
// becomes
+ list.direction(ListDirection::BottomToTop);

layout::Corner is removed entirely.

  • 4f77910 (padding) Add Padding::ZERO as a constant by @​EdJoPaTo in #​1133

    Deprecate Padding::zero()
    
  • 8061813 (uncategorized) Expand glob imports by @​joshka in #​1152

    Consensus is that explicit imports make it easier to understand the
    example code. This commit removes the prelude import from all examples
    and replaces it with the necessary imports, and expands other glob
    imports (widget::*, Constraint::*, KeyCode::*, etc.) everywhere else.
    Prelude glob imports not in examples are not covered by this PR.
    
    See https://github.com/ratatui-org/ratatui/issues/1150 for more details.
    
  • d929971 (uncategorized) Dont manually impl Default for defaults by @​EdJoPaTo in #​1142

    Replace `impl Default` by `#[derive(Default)]` when its implementation
    equals.
    
  • 8a60a56 (uncategorized) Needless_pass_by_ref_mut by @​EdJoPaTo in #​1137

    https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

  • 1de9a82 (uncategorized) Simplify if let by @​EdJoPaTo in #​1135

    While looking through lints
    [`clippy::option_if_let_else`](https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else)
    found these. Other findings are more complex so I skipped them.
    
Documentation
Performance
-let area = area.inner(&Margin {
+let area = area.inner(Margin {
     vertical: 0,
     horizontal: 2,
 });
Styling
Testing
Miscellaneous Tasks
  • 7b45f74 (prelude) Add / remove items by @​joshka in #​1149 [breaking]

    his PR removes the items from the prelude that don't form a coherent
    common vocabulary and adds the missing items that do.
    
    Based on a comment at
    <https://www.reddit.com/r/rust/comments/1cle18j/comment/l2uuuh7/>
    

    BREAKING CHANGE:The following items have been removed from the prelude:

  • style::Styled - this trait is useful for widgets that want to
    support the Stylize trait, but it adds complexity as widgets have two
    style methods and a set_style method.

  • symbols::Marker - this item is used by code that needs to draw to
    the Canvas widget, but it's not a common item that would be used by
    most users of the library.

  • terminal::{CompletedFrame, TerminalOptions, Viewport} - these items
    are rarely used by code that needs to interact with the terminal, and
    they're generally only ever used once in any app.

The following items have been added to the prelude:

  • layout::{Position, Size} - these items are used by code that needs
    to interact with the layout system. These are newer items that were
    added in the last few releases, which should be used more liberally.

  • cd64367 (symbols) Add tests for line symbols by @​joshka in #​1186

  • 8cfc316 (uncategorized) Alphabetize examples in Cargo.toml by @​joshka in #​1145

Build
  • 70df102 (bench) Improve benchmark consistency by @​EdJoPaTo in #​1126

    Codegen units are optimized on their own. Per default bench / release
    have 16 codegen units. What ends up in a codeget unit is rather random
    and can influence a benchmark result as a code change can move stuff
    into a different codegen unit → prevent / allow LLVM optimizations
    unrelated to the actual change.
    
    More details: https://doc.rust-lang.org/cargo/reference/profiles.html
    
New Contributors

Full Changelog: ratatui/ratatui@v0.26.3...v0.27.0


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot enabled auto-merge (squash) June 24, 2024 12:48
renovate-approve[bot]
renovate-approve bot previously approved these changes Jun 24, 2024
Copy link
Contributor Author

renovate bot commented Jun 24, 2024

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

@renovate renovate bot merged commit 6ad3961 into master Jun 24, 2024
5 checks passed
@renovate renovate bot deleted the renovate/ratatui-0.x branch June 24, 2024 20:38
@github-actions github-actions bot mentioned this pull request Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant