v0.28.0-alpha.0 - 2024-07-27
Features
-
5b51018 (chart) Add GraphType::Bar by @joshka in #1205
![Demo](https://vhs.charm.sh/vhs-50v7I5n7lQF7tHCb1VCmFc.gif)
-
36d49e5 (table) Select first, last, etc to table state by @robertpsoane in #1198
Add select_previous, select_next, select_first & select_last to TableState Used equivalent API as in ListState
-
3bb374d (terminal) Add Terminal::try_draw() method by @joshka in #1209
This makes it easier to write fallible rendering methods that can use the `?` operator ```rust terminal.try_draw(|frame| { some_method_that_can_fail()?; another_faillible_method()?; Ok(()) })?; ```
-
3725262 (text) Add
Add
andAddAssign
implementations forLine
,Span
, andText
by @joshka in #1236This enables: ```rust let line = Span::raw("Red").red() + Span::raw("blue").blue(); let line = Line::raw("Red").red() + Span::raw("blue").blue(); let line = Line::raw("Red").red() + Line::raw("Blue").blue(); let text = Line::raw("Red").red() + Line::raw("Blue").blue(); let text = Text::raw("Red").red() + Line::raw("Blue").blue(); let mut line = Line::raw("Red").red(); line += Span::raw("Blue").blue(); let mut text = Text::raw("Red").red(); text += Line::raw("Blue").blue(); line.extend(vec![Span::raw("1"), Span::raw("2"), Span::raw("3")]); ```
-
c34fb77 (text) Remove unnecessary lifetime from ToText trait by @joshka in #1234 [breaking]
BREAKING CHANGE:The ToText trait no longer has a lifetime parameter.
This change simplifies the trait and makes it easier implement.
Bug Fixes
-
7e1bab0 (buffer) Dont render control characters by @EdJoPaTo in #1226
-
03f3124 (paragraph) Line_width, and line_count include block borders by @airblast-dev in #1235
The `line_width`, and `line_count` methods for `Paragraph` would not take into account the `Block` if one was set. This will now correctly calculate the values including the `Block`'s width/height.
Fixes:#1233
-
7ddfbc0 (uncategorized) Unnecessary allocations when creating Lines by @SUPERCILEX in #1237
-
84f3341 (uncategorized) Clippy lints from rust 1.80.0 by @joshka in #1238
Refactor
-
e81663b (list) Split up list.rs into smaller modules by @joshka in #1204
-
32a0b26 (uncategorized) Simplify WordWrapper implementation by @tranzystorekk in #1193
Documentation
-
6ce447c (block) Add docs about style inheritance by @joshka in #1190
Fixes:#1129
-
55e0880 (block) Update block documentation by @leohscl in #1206
Update block documentation with constructor methods and setter methods in the main doc comment Added an example for using it to surround widgets
Fixes:#914
-
935a718 (examples) Add missing examples to README by @kibibyt3 in #1225
Resolves:#1014
-
50e5674 (examples) Fix: fix typos in tape files by @kibibyt3 in #1224
-
810da72 (examples) Fix hyperlink example tape by @kibibyt3 in #1222
Performance
-
663486f (list) Avoid extra allocations when rendering
List
by @airblast-dev in #1244When rendering a `List`, each `ListItem` would be cloned. Removing the clone, and replacing `Widget::render` with `WidgetRef::render_ref` saves us allocations caused by the clone of the `Text<'_>` stored inside of `ListItem`. Based on the results of running the "list" benchmark locally; Performance is improved by %1-3 for all `render` benchmarks for `List`.
-
be3eb75 (table) Avoid extra allocations when rendering
Table
by @airblast-dev in #1242When rendering a `Table` the `Text` stored inside of a `Cell` gets cloned before rendering. This removes the clone and uses `WidgetRef` instead, saving us from allocating a `Vec<Line<'_>>` inside `Text`. Also avoids an allocation when rendering the highlight symbol if it contains an owned value.
Miscellaneous Tasks
-
efef0d0 (ci) Change label from
breaking change
toType: Breaking Change
by @kdheepak in #1243This PR changes the label that is auto attached to a PR with a breaking change per the conventional commits specification.
-
3e7458f (github) Add forums and faqs to the issue template by @joshka in #1201
-
7bab9f0 (uncategorized) Add more CompactString::const_new instead of new by @joshka in #1230
-
ccf83e6 (uncategorized) Update labels in issue templates by @joshka in #1212
Build
New Contributors
- @airblast-dev made their first contribution in #1242
- @SUPERCILEX made their first contribution in #1237
- @kibibyt3 made their first contribution in #1225
- @EmiOnGit made their first contribution in #1217
- @leohscl made their first contribution in #1206
- @robertpsoane made their first contribution in #1198
Full Changelog: v0.27.0...v0.28.0-alpha.0