Releases: ratatui/ratatui
v0.30.0-alpha.1
This is an alpha release of 0.30.0. The focus of the 0.30 release is splitting the crate into a ratatui-core library with the main types and other libs which contain the widgets and terminal backend parts. This should make it easier for widget libraries to rely on a stable crate for longer periods of time and help avoid the need to upgrade all packages to a new version every time a new Ratatui version drops.
Another notable change in this release is that the widgets no longer directly implement the unstable WidgetRef trait. Previously there was a blanket implementation of Widget for &W where W: WidgetRef
, but this has been flipped so that now a blanket implementation of WidgetRef for &W where &W: Widget
is created. This is still marked as unstable and so the WidgetRef
and StatefulWidgetRef
types are in the ratatui crate rather than the ratatui-core trait.
What's Changed
- docs(layout): rename cassowary-rs references to cassowary by @miroim in #1448
- fix(buffer): buffer::get_pos() now correctly handles index > u16::MAX by @joshka in #1447
- chore(deps): bump serde from 1.0.210 to 1.0.213 by @dependabot in #1455
- chore: update repo links to ratatui instead of ratatui-org by @joshka in #1458
- chore: move ratatui crate into workspace folder by @joshka in #1459
- docs: fix example link in readme by @thomas-tacquet in #1462
- ci: replace cargo-make with a custom cargo-xtask by @joshka in #1461
- docs(changelog): fix typo by @orhun in #1463
- chore(backend): change From impls to new backend specific IntoBackend and FromBackend traits by @joshka in #1464
- ci: Update Bencher CLI usage by @epompeii in #1470
- chore: move core types to ratatui-core by @joshka in #1460
- chore: add CI check for up-to-date README.md by @orhun in #1473
- chore(ci): install pre-built binaries for cargo-rdme by @orhun in #1477
- chore(github): enable sponsorship button by @orhun in #1478
- fix: typo by @marcoieni in #1480
- chore(deps): bump tokio from 1.40.0 to 1.41.1 by @dependabot in #1482
- chore(deps): bump unicode-truncate from 1.1.0 to 2.0.0 by @dependabot in #1481
- refactor: move {Stateful,}Widget{,Ref} types into individual files by @joshka in #1479
- docs: Update README.md to include iocraft as an alternative by @kdheepak in #1483
- Fix broken Link in README.md by @nilsmartel in #1485
- chore: move widgets into ratatui-widgets crate by @joshka in #1474
- docs: improve docs for workspace crates by @orhun in #1490
- chore: move unstable widget refs to ratatui by @joshka in #1491
- chore: remove --color always flags from bacon.toml by @joshka in #1502
- fix: Make StatefulWidgetRef work with dyn States. by @thscharler in #1505
- chore(deps): bump instability from 0.3.2 to 0.3.3 by @dependabot in #1497
- chore(deps): bump DavidAnson/markdownlint-cli2-action from 17 to 18 by @dependabot in #1500
- chore(deps): bump codecov/codecov-action from 4 to 5 by @dependabot in #1499
- chore(deps): bump octocrab from 0.41.2 to 0.42.0 by @dependabot in #1498
- chore(deps): bump clap-verbosity-flag from 2.2.2 to 2.2.3 by @dependabot in #1494
- chore(deps): bump clap from 4.5.20 to 4.5.21 by @dependabot in #1496
- chore(deps): bump serde from 1.0.214 to 1.0.215 by @dependabot in #1495
- fix: add feature(doc_cfg) when generating docs by @joshka in #1506
- docs(readme): correct examples link by @HoKim98 in #1484
- feat: add bounds accsess in Painter and off-grid Line points support by @renesat in #1501
- feat(bar): impl Styled for Bar by @Emivvvvv in #1476
- feat(bar)!: update label and text_value to accept Into<> by @Emivvvvv in #1471
- fix: round canvas coordinates to nearest grid cell by @joshka in #1507
- docs(contributing): use cargo-xtask for intructions by @orhun in #1509
- refactor: modularize backends by @orhun in #1508
- fix(table): Allow display of additional table row, if row height > 1 by @Lunderberg in #1452
- feat(barchart): reduce barchart creation verbosity by @Emivvvvv in #1453
- refactor(table): small readability improvements by @joshka in #1510
- docs(widgets): Add simple barchart example by @joshka in #1511
- chore(deps): bump rustls from 0.23.15 to 0.23.18 by @dependabot in #1518
- chore(deps): bump octocrab from 0.42.0 to 0.42.1 by @dependabot in #1515
- chore(deps): bump clap-verbosity-flag from 2.2.3 to 3.0.0 by @dependabot in #1516
- chore(deps): bump cargo_metadata from 0.18.1 to 0.19.0 by @dependabot in #1517
- docs(block): revise the block example by @orhun in #1520
- chore(widgets): enable calendar widget as default by @orhun in #1521
- chore: prepare alpha modularization release by @joshka in #1525
- fix: rust 1.83 clippy lints by @joshka in #1527
- chore: ensure lint config is correct by @joshka in #1528
- chore: Move the demo example to main folder by @joshka in #1523
- chore(xtask): check lints for only library targets by @orhun in #1531
- fix(scrollbar): check for area.is_empty() before rendering by @farmeroy in #1529
- chore: move terminal types to ratatui-core by @joshka in #1530
- chore: move demo2 to top level folder by @joshka in #1524
- docs(widgets): add example for calendar by @orhun in #1532
- docs(widgets): add example for chart by @orhun in #1536
- docs(widgets): add example for canvas by @orhun in #1533
- refactor: rearrange selection_spacing code by @raylu in #1540
- docs(widgets): add example for gauge by @orhun in #1539
- feat(widgets): add the missing constructor to canvas types by @orhun in #1538
- docs(widgets): move the logo example to widgets by @orhun in #1543
- fix(crossterm): terminal should keep Bold when removing Dim by @MarSik in #1541
- docs(widgets): add example for paragraph by @orhun in #1544
- feat(layout): add Offset::new() constructor by @joshka in #1547
- docs: add mouse-drawing example by @joshka in #1546
- build: Remove cargo lint by @joshka in #1549
- docs: add input form example by @joshka in #1551
- docs(widgets): update values in chart example by @orhun in #1558
- docs(widgets): add example for table by @orhun in #1557
- feat(scrollbar): support retrieving the current position of state by @orhun in #1552
- docs(widgets): add example for sparkline by @orhun in #1556
- fix(span): dont render control characters by @EdJoPaTo in #1312
- docs(widgets): add example for list by @orhun in #1542
- docs(widgets): add example for scrollbar by @orhun in #1545
- chore(examples): move async example to apps by @joshka in #1503
- docs(widgets): add example for tabs by @orhun in #1559
- chore(deps): bump clap from 4.5.21 to 4.5.23 by @dependabot in #1565
- chore(deps): bump octocrab from 0.42.0 to 0.42.1 by @dependabot in #1564
- chore(deps): bump tokio-stream from 0.1.16 to 0.1.17 by @dependabot in #1563
- chore...
v0.29.1-alpha.0
v0.29.1-alpha.0 - 2024-10-26
Bug Fixes
Documentation
New Contributors
Full Changelog: v0.29.0...v0.29.1-alpha.0
v0.29.0
v0.29.0 - 2024-10-21
"Food will come, Remy. Food always comes to those who love to cook." – Gusteau
We are excited to announce the new version of ratatui
- a Rust library that's all about cooking up TUIs 👨🍳🐀
✨ Release highlights: https://ratatui.rs/highlights/v029/
Features
-
4c4851c (example) Add drawing feature to the canvas example by @orhun in #1429
fun fact: I had to do 35
pushups for this...
-
e5a7609 (line) Impl From<Cow> for Line by @joshka in #1373 [breaking]
BREAKING-CHANGES:
Line
now implementsFrom<Cow<str>
As this adds an extra conversion, ambiguous inferred values may no longer
compile.// given: struct Foo { ... } impl From<Foo> for String { ... } impl From<Foo> for Cow<str> { ... } let foo = Foo { ... }; let line = Line::from(foo); // now fails due to ambiguous type inference // replace with let line = Line::from(String::from(foo));
Fixes:#1367
-
2805ddd (logo) Add a Ratatui logo widget by @joshka in #1307
This is a simple logo widget that can be used to render the Ratatui logo
in the terminal. It is used in theexamples/ratatui-logo.rs
example,
and may be used in your applications' help or about screens.use ratatui::{Frame, widgets::RatatuiLogo}; fn draw(frame: &mut Frame) { frame.render_widget(RatatuiLogo::tiny(), frame.area()); }
-
d72968d (scrolling-regions) Use terminal scrolling regions to stop Terminal::insert_before from flickering by @nfachan in #1341 [breaking]
The current implementation of Terminal::insert_before causes the
viewport to flicker. This is described in #584 .This PR removes that flickering by using terminal scrolling regions
(sometimes called "scroll regions"). A terminal can have its scrolling
region set to something other than the whole screen. When a scroll ANSI
sequence is sent to the terminal and it has a non-default scrolling
region, the terminal will scroll just inside of that region.We use scrolling regions to implement insert_before. We create a region
on the screen above the viewport, scroll that up to make room for the
newly inserted lines, and then draw the new lines. We may need to repeat
this process depending on how much space there is and how many lines we
need to draw.When the viewport takes up the entire screen, we take a modified
approach. We create a scrolling region of just the top line (could be
more) of the viewport, then use that to draw the lines we want to
output. When we're done, we scroll it up by one line, into the
scrollback history, and then redraw the top line from the viewport.A final edge case is when the viewport hasn't yet reached the bottom of
the screen. This case, we set up a different scrolling region, where the
top is the top of the viewport, and the bottom is the viewport's bottom
plus the number of lines we want to scroll by. We then scroll this
region down to open up space above the viewport for drawing the inserted
lines.Regardless of what we do, we need to reset the scrolling region. This PR
takes the approach of always resetting the scrolling region after every
operation. So the Backend gets new scroll_region_up and
scroll_region_down methods instead of set_scrolling_region, scroll_up,
scroll_down, and reset_scrolling_region methods. We chose that approach
for two reasons. First, we don't want Ratatui to have to remember that
state and then reset the scrolling region when tearing down. Second, the
pre-Windows-10 console code doesn't support scrolling regionThis PR:
- Adds a new scrolling-regions feature.
- Adds two new Backend methods: scroll_region_up and scroll_region_down.
- Implements those Backend methods on all backends in the codebase.
- The crossterm and termion implementations use raw ANSI escape
sequences. I'm trying to merge changes into those two projects
separately to support these functions. - Adds code to Terminal::insert_before to choose between
insert_before_scrolling_regions and insert_before_no_scrolling_regions.
The latter is the old implementation. - Adds lots of tests to the TestBackend to for the
scrolling-region-related Backend methods. - Adds versions of terminal tests that show that insert_before doesn't
clobber the viewport. This is a change in behavior from before.
-
dc8d058 (table) Add support for selecting column and cell by @airblast-dev in #1331 [breaking]
Fixes #1250
Adds support for selecting a column and cell in
TableState
. The
selected column, and cells style can be set by
Table::column_highlight_style
andTable::cell_highlight_style
respectively.The table example has also been updated to display the new
functionality:table_col_cel_selection.mp4
BREAKING CHANGE:The Serialized output of the state will now include the
"selected_column" field. Software that manually parse the serialized the
output (with anything other than theSerialize
implementation on
TableState
) may have to be refactored if the "selected_column" field
is not accounted for. This does not affect users who rely on the
Deserialize
, orSerialize
implementation on the state.BREAKING CHANGE:The
Table::highlight_style
is now deprecated in favor
ofTable::row_highlight_style
.
-
ab6b1fe (tabs) Allow tabs to be deselected by @joshka in #1413 [breaking]
Tabs::select()
now acceptsInto<Option<usize>>
instead ofusize
.
This allows tabs to be deselected by passingNone
.Tabs::default()
is now also implemented manually instead of deriving
Default
, and a new methodTabs::titles()
is added to set the titles
of the tabs.Fixes:#1412
BREAKING CHANGE:
Tabs::select()
now acceptsInto<Option<usize>>
which breaks any code already using parameter type inference:let selected = 1u8; - let tabs = Tabs::new(["A", "B"]).select(selected.into()) + let tabs = Tabs::new(["A", "B"]).select(selected as usize)
-
23c0d52 (text) Improve concise debug view for Span,Line,Text,Style by @joshka in #1410
Improves #1383
The following now round trips when formatted for debug.
This will make it easier to use insta when testing text related views of
widgets.Text::from_iter([ Line::from("Hello, world!"), Line::from("How are you?").bold().left_aligned(), Line::from_iter([ Span::from("I'm "), Span::from("doing ").italic(), Span::from("great!").bold(), ]), ]).on_blue().italic().centered()
-
60cc15b (uncategorized) Add support for empty bar style to
Sparkline
by @fujiapple852 in #1326 [breaking]- distinguish between empty bars and bars with a value of 0
- provide custom styling for empty bars
- provide custom styling for individual bars
- inverts the rendering algorithm to be item first
Closes:#1325
BREAKING CHANGE:
Sparkline::data
takesIntoIterator<Item = SparklineBar>
instead of&[u64]
and is no longer const -
453a308 (uncategorized) Add overlap to layout by @kdheepak in #1398 [breaking]
This PR adds a new feature for the existing
Layout::spacing
method,
and introducing aSpacing
enum.Now
Layout::spacing
is generic and can take- zero or positive numbers, e.g.
Layout::spacing(1)
(current
functionality)...
- zero or positive numbers, e.g.
v0.29.0-alpha.0
v0.29.0-alpha.0 - 2024-10-19
Features
-
3a43274 (color) Add hsluv support by @du-ob in #1333
closes #763
-
e5a7609 (line) Impl From<Cow> for Line by @joshka in #1373 [breaking]
BREAKING-CHANGES:
Line
now implementsFrom<Cow<str>
As this adds an extra conversion, ambiguous infered values may no longer
compile.// given: struct Foo { ... } impl From<Foo> for String { ... } impl From<Foo> for Cow<str> { ... } let foo = Foo { ... }; let line = Line::from(foo); // now fails due to ambiguous type inference // replace with let line = Line::from(String::from(foo));
Fixes:#1367
-
2805ddd (logo) Add a Ratatui logo widget by @joshka in #1307
This is a simple logo widget that can be used to render the Ratatui logo
in the terminal. It is used in theexamples/ratatui-logo.rs
example,
and may be used in your applications' help or about screens.use ratatui::{Frame, widgets::RatatuiLogo}; fn draw(frame: &mut Frame) { frame.render_widget(RatatuiLogo::tiny(), frame.area()); }
-
d72968d (scrolling-regions) Use terminal scrolling regions to stop Terminal::insert_before from flickering by @nfachan in #1341 [breaking]
The current implementation of Terminal::insert_before causes the
viewport to flicker. This is described in #584 .This PR removes that flickering by using terminal scrolling regions
(sometimes called "scroll regions"). A terminal can have its scrolling
region set to something other than the whole screen. When a scroll ANSI
sequence is sent to the terminal and it has a non-default scrolling
region, the terminal will scroll just inside of that region.We use scrolling regions to implement insert_before. We create a region
on the screen above the viewport, scroll that up to make room for the
newly inserted lines, and then draw the new lines. We may need to repeat
this process depending on how much space there is and how many lines we
need to draw.When the viewport takes up the entire screen, we take a modified
approach. We create a scrolling region of just the top line (could be
more) of the viewport, then use that to draw the lines we want to
output. When we're done, we scroll it up by one line, into the
scrollback history, and then redraw the top line from the viewport.A final edge case is when the viewport hasn't yet reached the bottom of
the screen. This case, we set up a different scrolling region, where the
top is the top of the viewport, and the bottom is the viewport's bottom
plus the number of lines we want to scroll by. We then scroll this
region down to open up space above the viewport for drawing the inserted
lines.Regardless of what we do, we need to reset the scrolling region. This PR
takes the approach of always resetting the scrolling region after every
operation. So the Backend gets new scroll_region_up and
scroll_region_down methods instead of set_scrolling_region, scroll_up,
scroll_down, and reset_scrolling_region methods. We chose that approach
for two reasons. First, we don't want Ratatui to have to remember that
state and then reset the scrolling region when tearing down. Second, the
pre-Windows-10 console code doesn't support scrolling regioThis PR:
- Adds a new scrolling-regions feature.
- Adds two new Backend methods: scroll_region_up and scroll_region_down.
- Implements those Backend methods on all backends in the codebase.
- The crossterm and termion implementations use raw ANSI escape
sequences. I'm trying to merge changes into those two projects
separately to support these functions. - Adds code to Terminal::insert_before to choose between
insert_before_scrolling_regions and insert_before_no_scrolling_regions.
The latter is the old implementation. - Adds lots of tests to the TestBackend to for the
scrolling-region-related Backend methods. - Adds versions of terminal tests that show that insert_before doesn't
clobber the viewport. This is a change in behavior from before.
-
dc8d058 (table) Add support for selecting column and cell by @airblast-dev in #1331 [breaking]
Fixes #1250
Adds support for selecting a column and cell in
TableState
. The
selected column, and cells style can be set by
Table::column_highlight_style
andTable::cell_highlight_style
respectively.The table example has also been updated to display the new
functionality:table_col_cel_selection.mp4
BREAKING CHANGE:The Serialized output of the state will now include the
"selected_column" field. Software that manually parse the serialized the
output (with anything other than theSerialize
implementation on
TableState
) may have to be refactored if the "selected_column" field
is not accounted for. This does not affect users who rely on the
Deserialize
, orSerialize
implementation on the state.BREAKING CHANGE:The
Table::highlight_style
is now deprecated in favor
ofTable::row_highlight_style
.
-
ab6b1fe (tabs) Allow tabs to be deselected by @joshka in #1413 [breaking]
Tabs::select()
now acceptsInto<Option<usize>>
instead ofusize
.
This allows tabs to be deselected by passingNone
.Tabs::default()
is now also implemented manually instead of deriving
Default
, and a new methodTabs::titles()
is added to set the titles
of the tabs.Fixes:#1412
BREAKING CHANGE:
Tabs::select()
now acceptsInto<Option<usize>>
which breaks any code already using parameter type inference:let selected = 1u8; - let tabs = Tabs::new(["A", "B"]).select(selected.into()) + let tabs = Tabs::new(["A", "B"]).select(selected as usize)
-
23c0d52 (text) Improve concise debug view for Span,Line,Text,Style by @joshka in #1410
Improves #1383
The following now round trips when formatted for debug.
This will make it easier to use insta when testing text related views of
widgets.Text::from_iter([ Line::from("Hello, world!"), Line::from("How are you?").bold().left_aligned(), Line::from_iter([ Span::from("I'm "), Span::from("doing ").italic(), Span::from("great!").bold(), ]), ]).on_blue().italic().centered()
-
453a308 (uncategorized) Add overlap to layout by @kdheepak in #1398 [breaking]
This PR adds a new feature for the existing
Layout::spacing
method,
and introducing aSpacing
enum.Now
Layout::spacing
is generic and can take- zero or positive numbers, e.g.
Layout::spacing(1)
(current
functionality) - negative number, e.g.
Layout::spacing(-1)
(new) - variant of the
Spacing
(new)
This allows creating layouts with a shared pixel for segments. When
spacing(negative_value)
is used, spacing is ignored and all segments
will be adjacent and have pixels overlapping.
spacing(zero_or_positive_value)
behaves the same as before. These are
internally converted toSpacing::Overlap
orSpacing::Space
.Here's an example output to illustrate the layout solve from this PR:
#[test] fn test_layout() { use crate::layout::Constraint::*; let mut terminal = crate::Terminal::new(crate::backend::TestBackend::new(50, 4)).unwrap(); terminal .draw(|frame| { let [upper, lower] = Layout::vertical([Fill(1), Fill(1)]).areas(frame.area()); let (segments, spacers) = Layout::horizontal([Length(10), Length(10), Length(10)]) .flex(Flex::Center) .split_with_spacers(upper); for segment in segments.iter() { frame.render_widget( crate::widgets::Block::bordered() .border_set(crate::symbols::border::DOUBLE), *segment, ); } for spacer in spacers.iter() { frame.render_widget(crate::widgets::Block::bordered(), *spacer); } let (segments, spacers) = Layout::horizontal([Length(10), Length(10), Length(10)]) .flex(Flex::Center) ...
- zero or positive numbers, e.g.
v0.28.2-alpha.6
v0.28.2-alpha.6 - 2024-10-12
Features
-
2805ddd (logo) Add a Ratatui logo widget by @joshka in #1307
This is a simple logo widget that can be used to render the Ratatui logo
in the terminal. It is used in theexamples/ratatui-logo.rs
example,
and may be used in your applications' help or about screens.use ratatui::{Frame, widgets::RatatuiLogo}; fn draw(frame: &mut Frame) { frame.render_widget(RatatuiLogo::tiny(), frame.area()); }
-
23c0d52 (text) Improve concise debug view for Span,Line,Text,Style by @joshka in #1410
Improves #1383
The following now round trips when formatted for debug.
This will make it easier to use insta when testing text related views of
widgets.Text::from_iter([ Line::from("Hello, world!"), Line::from("How are you?").bold().left_aligned(), Line::from_iter([ Span::from("I'm "), Span::from("doing ").italic(), Span::from("great!").bold(), ]), ]).on_blue().italic().centered()
Bug Fixes
-
0f48239 (terminal) Resize() now resizes fixed viewports by @Patryk27 in #1353
Terminal::resize()
on a fixed viewport used to do nothing due to
an accidentally shadowed variable. This now works as intended. -
b9653ba (uncategorized) Prevent calender render panic when terminal height is small by @adrodgers in #1380
Fixes:#1379
-
da821b4 (uncategorized) Clippy lints from rust 1.81.0 by @fujiapple852 in #1356
-
68886d1 (uncategorized) Add
unstable-backend-writer
feature by @Patryk27 in #1352#991 created a new unstable
feature, but forgot to add it to Cargo.toml, making it impossible to use
on newer versions of rustc - this commit fixes it.
Refactor
-
edcdc8a (layout) Rename element to segment in layout by @kdheepak in #1397
This PR renames
element
tosegment
in a couple of functions in the
layout calculations for clarity.element
can refer tosegment
s or
spacer
s and functions that take onlysegment
s should usesegment
as the variable names. -
1153a9e (uncategorized) Consistent result expected in layout tests by @farmeroy in #1406
Fixes #1399
I've looked through all theassert_eq
and made sure that they follow
theexpected, result
pattern. I wasn't sure if it was desired to
actually pass result and expected as variables to the assert_eq
statements, so I've left everything that seems to have followed the
pattern as is. -
20c88aa (uncategorized) Avoid unneeded allocations by @mo8it in #1345
Documentation
-
b13e2f9 (backend) Added link to stdio FAQ by @Valentin271 in #1349
-
b88717b (constraint) Add note about percentages by @joshka in #1368
-
870bc6a (uncategorized) Use
Frame::area()
instead ofsize()
in examples by @hosseinnedaee in #1361Frame::size()
is deprecated
Styling
Miscellaneous Tasks
-
67c0ea2 (block) Deprecate block::Title by @joshka in #1372
ratatui::widgets::block::Title
is deprecated in favor of usingLine
to represent titles.
This removes an unnecessary layer of wrapping (string -> Span -> Line ->
Title).This struct will be removed in a future release of Ratatui (likely
0.31).
For more information see:To update your code:
Block::new().title(Title::from("foo")); // becomes any of Block::new().title("foo"); Block::new().title(Line::from("foo")); Block::new().title(Title::from("foo").position(Position::TOP)); // becomes any of Block::new().title_top("foo"); Block::new().title_top(Line::from("foo")); Block::new().title(Title::from("foo").position(Position::BOTTOM)); // becomes any of Block::new().title_bottom("foo"); Block::new().title_bottom(Line::from("foo"));
-
c777beb (ci) Bump git-cliff-action to v4 by @orhun in #1350
See:https://github.com/orhun/git-cliff-action/releases/tag/v4.0.0
-
bc10af5 (style) Make Debug output for Text/Line/Span/Style more concise by @joshka in #1383
Given:```rust
Text::from_iter([
Line::from("without line fields"),
Line::from("with line fields").bold().centered(),
Line::from_iter([
Span::from("without span fields"),
Span::from("with span fields")
.green()
.on_black()
.italic()
.not_dim(),
]),
])Debug:``` Text [Line [Span("without line fields")], Line { style: Style::new().add_modifier(Modifier::BOLD), alignment: Some(Center), spans: [Span("with line fields")] }, Line [Span("without span fields"), Span { style: Style::new().green().on_black().add_modifier(Modifier::ITALIC).remove_modifier(Modifier::DIM), content: "with span fields" }]]
Fixes:#1382
-
c32baa7 (uncategorized) Add benchmark for
Table
by @airblast-dev in #1408 -
5ad623c (uncategorized) Remove usage of prelude by @joshka in #1390
This helps make the doc examples more explicit about what is being used.
It will also makes it a bit easier to do future refactoring of Ratatui,
into several crates, as the ambiguity of where types are coming from
will be reduced.Additionally, several doc examples have been simplified to use Stylize,
and necessary imports are no longer hidden.This doesn't remove the prelude. Only the internal usages.
-
f4880b4 (uncategorized) Lock unicode-width version to 0.1.13 by @joshka in #1384
0.1.14 contains breaking changes which we'll need to investigate.
This commit puts a lock on the current version for now.
Continuous Integration
New Contributors
- @farmeroy made their first contribution in #1406
- @adrodgers made their first contribution in #1380
- @Veetaha made their first contribution in #1362
- @hosseinnedaee made their first contribution in #1361
- @Patryk27 made their first contribution in #1352
Full Changelog: v0.28.1...v0.28.2-alpha.6
v0.28.2-alpha.5
v0.28.2-alpha.5 - 2024-10-05
Bug Fixes
-
0f48239 (terminal) Resize() now resizes fixed viewports by @Patryk27 in #1353
Terminal::resize()
on a fixed viewport used to do nothing due to
an accidentally shadowed variable. This now works as intended. -
b9653ba (uncategorized) Prevent calender render panic when terminal height is small by @adrodgers in #1380
Fixes:#1379
-
da821b4 (uncategorized) Clippy lints from rust 1.81.0 by @fujiapple852 in #1356
-
68886d1 (uncategorized) Add
unstable-backend-writer
feature by @Patryk27 in #1352#991 created a new unstable
feature, but forgot to add it to Cargo.toml, making it impossible to use
on newer versions of rustc - this commit fixes it.
Refactor
-
edcdc8a (layout) Rename element to segment in layout by @kdheepak in #1397
This PR renames
element
tosegment
in a couple of functions in the
layout calculations for clarity.element
can refer tosegment
s or
spacer
s and functions that take onlysegment
s should usesegment
as the variable names. -
20c88aa (uncategorized) Avoid unneeded allocations by @mo8it in #1345
Documentation
-
b13e2f9 (backend) Added link to stdio FAQ by @Valentin271 in #1349
-
b88717b (constraint) Add note about percentages by @joshka in #1368
-
870bc6a (uncategorized) Use
Frame::area()
instead ofsize()
in examples by @hosseinnedaee in #1361Frame::size()
is deprecated
Styling
Miscellaneous Tasks
-
67c0ea2 (block) Deprecate block::Title by @joshka in #1372
ratatui::widgets::block::Title
is deprecated in favor of usingLine
to represent titles.
This removes an unnecessary layer of wrapping (string -> Span -> Line ->
Title).This struct will be removed in a future release of Ratatui (likely
0.31).
For more information see:To update your code:
Block::new().title(Title::from("foo")); // becomes any of Block::new().title("foo"); Block::new().title(Line::from("foo")); Block::new().title(Title::from("foo").position(Position::TOP)); // becomes any of Block::new().title_top("foo"); Block::new().title_top(Line::from("foo")); Block::new().title(Title::from("foo").position(Position::BOTTOM)); // becomes any of Block::new().title_bottom("foo"); Block::new().title_bottom(Line::from("foo"));
-
c777beb (ci) Bump git-cliff-action to v4 by @orhun in #1350
See:https://github.com/orhun/git-cliff-action/releases/tag/v4.0.0
-
bc10af5 (style) Make Debug output for Text/Line/Span/Style more concise by @joshka in #1383
Given:```rust
Text::from_iter([
Line::from("without line fields"),
Line::from("with line fields").bold().centered(),
Line::from_iter([
Span::from("without span fields"),
Span::from("with span fields")
.green()
.on_black()
.italic()
.not_dim(),
]),
])Debug:``` Text [Line [Span("without line fields")], Line { style: Style::new().add_modifier(Modifier::BOLD), alignment: Some(Center), spans: [Span("with line fields")] }, Line [Span("without span fields"), Span { style: Style::new().green().on_black().add_modifier(Modifier::ITALIC).remove_modifier(Modifier::DIM), content: "with span fields" }]]
Fixes:#1382
-
5ad623c (uncategorized) Remove usage of prelude by @joshka in #1390
This helps make the doc examples more explicit about what is being used.
It will also makes it a bit easier to do future refactoring of Ratatui,
into several crates, as the ambiguity of where types are coming from
will be reduced.Additionally, several doc examples have been simplified to use Stylize,
and necessary imports are no longer hidden.This doesn't remove the prelude. Only the internal usages.
-
f4880b4 (uncategorized) Lock unicode-width version to 0.1.13 by @joshka in #1384
0.1.14 contains breaking changes which we'll need to investigate.
This commit puts a lock on the current version for now.
Continuous Integration
New Contributors
- @adrodgers made their first contribution in #1380
- @Veetaha made their first contribution in #1362
- @hosseinnedaee made their first contribution in #1361
- @Patryk27 made their first contribution in #1352
Full Changelog: v0.28.1...v0.28.2-alpha.5
v0.28.2-alpha.4
v0.28.2-alpha.4 - 2024-09-28
Bug Fixes
-
0f48239 (terminal) Resize() now resizes fixed viewports by @Patryk27 in #1353
Terminal::resize()
on a fixed viewport used to do nothing due to
an accidentally shadowed variable. This now works as intended. -
b9653ba (uncategorized) Prevent calender render panic when terminal height is small by @adrodgers in #1380
Fixes:#1379
-
da821b4 (uncategorized) Clippy lints from rust 1.81.0 by @fujiapple852 in #1356
-
68886d1 (uncategorized) Add
unstable-backend-writer
feature by @Patryk27 in #1352#991 created a new unstable
feature, but forgot to add it to Cargo.toml, making it impossible to use
on newer versions of rustc - this commit fixes it.
Refactor
Documentation
-
b13e2f9 (backend) Added link to stdio FAQ by @Valentin271 in #1349
-
b88717b (constraint) Add note about percentages by @joshka in #1368
-
870bc6a (uncategorized) Use
Frame::area()
instead ofsize()
in examples by @hosseinnedaee in #1361Frame::size()
is deprecated
Styling
Miscellaneous Tasks
-
67c0ea2 (block) Deprecate block::Title by @joshka in #1372
ratatui::widgets::block::Title
is deprecated in favor of usingLine
to represent titles.
This removes an unnecessary layer of wrapping (string -> Span -> Line ->
Title).This struct will be removed in a future release of Ratatui (likely
0.31).
For more information see:To update your code:
Block::new().title(Title::from("foo")); // becomes any of Block::new().title("foo"); Block::new().title(Line::from("foo")); Block::new().title(Title::from("foo").position(Position::TOP)); // becomes any of Block::new().title_top("foo"); Block::new().title_top(Line::from("foo")); Block::new().title(Title::from("foo").position(Position::BOTTOM)); // becomes any of Block::new().title_bottom("foo"); Block::new().title_bottom(Line::from("foo"));
-
c777beb (ci) Bump git-cliff-action to v4 by @orhun in #1350
See:https://github.com/orhun/git-cliff-action/releases/tag/v4.0.0
-
bc10af5 (style) Make Debug output for Text/Line/Span/Style more concise by @joshka in #1383
Given:```rust
Text::from_iter([
Line::from("without line fields"),
Line::from("with line fields").bold().centered(),
Line::from_iter([
Span::from("without span fields"),
Span::from("with span fields")
.green()
.on_black()
.italic()
.not_dim(),
]),
])Debug:``` Text [Line [Span("without line fields")], Line { style: Style::new().add_modifier(Modifier::BOLD), alignment: Some(Center), spans: [Span("with line fields")] }, Line [Span("without span fields"), Span { style: Style::new().green().on_black().add_modifier(Modifier::ITALIC).remove_modifier(Modifier::DIM), content: "with span fields" }]]
Fixes:#1382
-
f4880b4 (uncategorized) Lock unicode-width version to 0.1.13 by @joshka in #1384
0.1.14 contains breaking changes which we'll need to investigate.
This commit puts a lock on the current version for now.
Continuous Integration
New Contributors
- @adrodgers made their first contribution in #1380
- @Veetaha made their first contribution in #1362
- @hosseinnedaee made their first contribution in #1361
- @Patryk27 made their first contribution in #1352
Full Changelog: v0.28.1...v0.28.2-alpha.4
v0.28.2-alpha.3
v0.28.2-alpha.3 - 2024-09-21
Bug Fixes
-
0f48239 (terminal) Resize() now resizes fixed viewports by @Patryk27 in #1353
Terminal::resize()
on a fixed viewport used to do nothing due to
an accidentally shadowed variable. This now works as intended. -
b9653ba (uncategorized) Prevent calender render panic when terminal height is small by @adrodgers in #1380
Fixes:#1379
-
da821b4 (uncategorized) Clippy lints from rust 1.81.0 by @fujiapple852 in #1356
-
68886d1 (uncategorized) Add
unstable-backend-writer
feature by @Patryk27 in #1352#991 created a new unstable
feature, but forgot to add it to Cargo.toml, making it impossible to use
on newer versions of rustc - this commit fixes it.
Refactor
Documentation
-
b13e2f9 (backend) Added link to stdio FAQ by @Valentin271 in #1349
-
b88717b (constraint) Add note about percentages by @joshka in #1368
-
870bc6a (uncategorized) Use
Frame::area()
instead ofsize()
in examples by @hosseinnedaee in #1361Frame::size()
is deprecated
Styling
Miscellaneous Tasks
-
67c0ea2 (block) Deprecate block::Title by @joshka in #1372
ratatui::widgets::block::Title
is deprecated in favor of usingLine
to represent titles.
This removes an unnecessary layer of wrapping (string -> Span -> Line ->
Title).This struct will be removed in a future release of Ratatui (likely
0.31).
For more information see:To update your code:
Block::new().title(Title::from("foo")); // becomes any of Block::new().title("foo"); Block::new().title(Line::from("foo")); Block::new().title(Title::from("foo").position(Position::TOP)); // becomes any of Block::new().title_top("foo"); Block::new().title_top(Line::from("foo")); Block::new().title(Title::from("foo").position(Position::BOTTOM)); // becomes any of Block::new().title_bottom("foo"); Block::new().title_bottom(Line::from("foo"));
-
c777beb (ci) Bump git-cliff-action to v4 by @orhun in #1350
See:https://github.com/orhun/git-cliff-action/releases/tag/v4.0.0
Continuous Integration
New Contributors
- @adrodgers made their first contribution in #1380
- @Veetaha made their first contribution in #1362
- @hosseinnedaee made their first contribution in #1361
- @Patryk27 made their first contribution in #1352
Full Changelog: v0.28.1...v0.28.2-alpha.3
v0.28.2-alpha.2
v0.28.2-alpha.2 - 2024-09-14
Bug Fixes
-
0f48239 (terminal) Resize() now resizes fixed viewports by @Patryk27 in #1353
Terminal::resize()
on a fixed viewport used to do nothing due to
an accidentally shadowed variable. This now works as intended. -
da821b4 (uncategorized) Clippy lints from rust 1.81.0 by @fujiapple852 in #1356
-
68886d1 (uncategorized) Add
unstable-backend-writer
feature by @Patryk27 in #1352#991 created a new unstable
feature, but forgot to add it to Cargo.toml, making it impossible to use
on newer versions of rustc - this commit fixes it.
Refactor
Documentation
-
b13e2f9 (backend) Added link to stdio FAQ by @Valentin271 in #1349
-
b88717b (constraint) Add note about percentages by @joshka in #1368
-
870bc6a (uncategorized) Use
Frame::area()
instead ofsize()
in examples by @hosseinnedaee in #1361Frame::size()
is deprecated
Styling
Miscellaneous Tasks
- c777beb (ci) Bump git-cliff-action to v4 by @orhun in #1350
See:https://github.com/orhun/git-cliff-action/releases/tag/v4.0.0
Continuous Integration
New Contributors
- @Veetaha made their first contribution in #1362
- @hosseinnedaee made their first contribution in #1361
- @Patryk27 made their first contribution in #1352
Full Changelog: v0.28.1...v0.28.2-alpha.2
v0.28.2-alpha.1
v0.28.2-alpha.1 - 2024-09-07
Bug Fixes
-
0f48239 (terminal) Resize() now resizes fixed viewports by @Patryk27 in #1353
Terminal::resize()
on a fixed viewport used to do nothing due to
an accidentally shadowed variable. This now works as intended. -
68886d1 (uncategorized) Add
unstable-backend-writer
feature by @Patryk27 in #1352#991 created a new unstable
feature, but forgot to add it to Cargo.toml, making it impossible to use
on newer versions of rustc - this commit fixes it.
Refactor
Documentation
- b13e2f9 (backend) Added link to stdio FAQ by @Valentin271 in #1349
Styling
Miscellaneous Tasks
- c777beb (ci) Bump git-cliff-action to v4 by @orhun in #1350
See:https://github.com/orhun/git-cliff-action/releases/tag/v4.0.0
New Contributors
Full Changelog: v0.28.1...v0.28.2-alpha.1