Orhun Parmaksız
363c4c54e8
chore(release): prepare for 0.26.2 ( #1029 )
2024-04-15 13:38:55 +03:00
Josh McKinney
b7778e5cd1
fix(paragraph): unit test typo ( #1022 )
2024-04-08 17:33:05 -07:00
dependabot[bot]
b5061c5250
chore(deps): update stability requirement from 0.1.1 to 0.2.0 ( #1021 )
...
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Josh McKinney <joshka@users.noreply.github.com>
2024-04-08 22:43:04 +03:00
EdJoPaTo
359204c929
refactor: simplify to io::Result ( #1016 )
...
Simplifies the code, logic stays exactly the same.
2024-04-03 02:08:42 -07:00
EdJoPaTo
14461c3a35
docs(breaking-changes): typos and markdownlint ( #1009 )
2024-04-03 02:07:39 -07:00
Josh McKinney
3b002fdcab
docs: update incompatible code warning in examples readme ( #1013 )
...
Co-authored-by: EdJoPaTo <rfc-conform-git-commit-email@funny-long-domain-label-everyone-hates-as-it-is-too-long.edjopato.de>
2024-04-01 13:34:03 -07:00
Tadeas Uradnik
0207160784
fix(line): line truncation respects alignment ( #987 )
...
When rendering a `Line`, the line will be truncated:
- on the right for left aligned lines
- on the left for right aligned lines
- on bot sides for centered lines
E.g. "Hello World" will be rendered as "Hello", "World", "lo wo" for
left, right, centered lines respectively.
Fixes: https://github.com/ratatui-org/ratatui/issues/932
2024-03-30 18:10:33 -07:00
Josh McKinney
26af65043e
feat(text): add push methods for text and line ( #998 )
...
Adds the following methods to the `Text` and `Line` structs:
- Text::push_line
- Text::push_span
- Line::push_span
This allows for adding lines and spans to a text object without having
to call methods on the fields directly, which is usefult for incremental
construction of text objects.
2024-03-28 15:30:21 -07:00
Benjamin Nickolls
07da90a718
chore(funding): add eth address for receiving funds from drips.network ( #994 )
2024-03-27 18:11:26 +03:00
Orhun Parmaksız
125ee929ee
chore(docs): fix typos in crate documentation ( #1002 )
2024-03-27 16:28:23 +03:00
Josh McKinney
742a5ead06
fix(text): fix panic when rendering out of bounds ( #997 )
...
Previously it was possible to cause a panic when rendering to an area
outside of the buffer bounds. Instead this now correctly renders nothing
to the buffer.
2024-03-24 22:06:31 -07:00
EdJoPaTo
8719608bda
refactor(span): rename to_aligned_line into into_aligned_line ( #993 )
...
With the Rust method naming conventions these methods are into methods
consuming the Span. Therefore, it's more consistent to use `into_`
instead of `to_`.
```rust
Span::to_centered_line
Span::to_left_aligned_line
Span::to_right_aligned_line
```
Are marked deprecated and replaced with the following
```rust
Span::into_centered_line
Span::into_left_aligned_line
Span::into_right_aligned_line
```
2024-03-22 04:29:29 -07:00
Josh McKinney
f6c4e447e6
fix: ensure that paragraph correctly renders styled text ( #992 )
...
Paragraph was ignoring the new `Text::style` field added in 0.26.0
Fixes: https://github.com/ratatui-org/ratatui/issues/990
2024-03-22 02:14:59 -07:00
Jack Wills
c56f49b9fb
fix(list): saturating_sub to fix highlight_symbol overflow ( #949 )
...
An overflow (pedantically an underflow) can occur if the
highlight_symbol is a multi-byte char, and area is reduced to a size
less than that char length.
2024-03-16 15:58:39 -07:00
Orhun Parmaksız
078e97e4ff
chore(github): add EdJoPaTo as a maintainer ( #986 )
2024-03-16 19:29:57 +01:00
EdJoPaTo
8e68db9e2f
refactor: remove pointless default on internal structs ( #980 )
...
See #978
Also remove other derives. They are unused and just slow down
compilation.
2024-03-12 00:33:30 -07:00
EdJoPaTo
541f0f9953
perf(cell): use const CompactString::new_inline ( #979 )
...
Some minor find when messing around trying to `const` all the things.
While `reset()` and `default()` can not be `const` it's still a benefit
when their contents are.
2024-03-05 22:05:24 +01:00
Josh McKinney
88bfb5a430
docs(text): update Text and Line docs ( #969 )
2024-03-05 22:02:07 +01:00
EdJoPaTo
c4ce7e8ff6
build: enable more satisfied lints ( #974 )
...
These lints dont generate warnings and therefore dont need refactoring.
I think they are useful in the future.
2024-03-03 21:41:24 -08:00
EdJoPaTo
3be189e3c6
refactor: clippy::thread_local_initializer_can_be_made_const ( #974 )
...
enabled by default on nightly
2024-03-03 21:41:24 -08:00
EdJoPaTo
5c4efacd1d
refactor: clippy::map_err_ignore ( #974 )
2024-03-03 21:41:24 -08:00
EdJoPaTo
bbb6d65e06
refactor: clippy::else_if_without_else ( #974 )
2024-03-03 21:41:24 -08:00
EdJoPaTo
fdb14dc7cd
refactor: clippy::redundant_type_annotations ( #974 )
2024-03-03 21:41:23 -08:00
EdJoPaTo
9b3b23ac14
refactor: remove literal suffix ( #974 )
...
its not needed and can just be assumed
related: clippy::(un)separated_literal_suffix
2024-03-03 21:41:23 -08:00
EdJoPaTo
58b6e0be0f
refactor: clippy::should_panic_without_expect ( #974 )
2024-03-03 21:41:23 -08:00
EdJoPaTo
6e6ba27a12
build(lint): warn on pedantic and allow the rest ( #974 )
2024-03-03 21:41:23 -08:00
EdJoPaTo
c870a41057
refactor: clippy::many_single_char_names ( #974 )
2024-03-03 21:41:23 -08:00
EdJoPaTo
a6036ad789
refactor: clippy::similar_names ( #974 )
2024-03-03 21:41:23 -08:00
EdJoPaTo
060d26b6dc
refactor: clippy::match_same_arms ( #974 )
2024-03-03 21:41:23 -08:00
EdJoPaTo
a4e84a6a7f
build!: increase msrv to 1.74.0 ( #974 )
...
configure lints in Cargo.toml requires 1.74.0
BREAKING CHANGE: rust 1.74 is required now
2024-03-03 21:41:22 -08:00
EdJoPaTo
fcbea9ee68
refactor: clippy::uninlined_format_args ( #974 )
2024-03-03 21:41:22 -08:00
EdJoPaTo
14b24e7585
refactor: clippy::if_not_else ( #974 )
2024-03-03 21:41:22 -08:00
EdJoPaTo
5ed1f43c62
refactor: clippy::redundant_closure_for_method_calls ( #974 )
2024-03-03 21:41:22 -08:00
EdJoPaTo
c8c7924e0c
refactor: clippy::too_many_lines ( #974 )
2024-03-03 21:41:22 -08:00
EdJoPaTo
e3afe7c8a1
refactor: clippy::unreadable_literal ( #974 )
2024-03-03 21:41:22 -08:00
EdJoPaTo
a1f54de7d6
refactor: clippy::bool_to_int_with_if ( #974 )
2024-03-03 21:41:22 -08:00
EdJoPaTo
b8ea190bf2
refactor: clippy::cast_lossless ( #974 )
2024-03-03 21:41:21 -08:00
EdJoPaTo
0de5238ed3
refactor: dead_code ( #974 )
...
enabled by default, only detected by nightly yet
2024-03-03 21:41:21 -08:00
EdJoPaTo
df5dddfbc9
refactor: unused_imports ( #974 )
...
enabled by default, only detected on nightly yet
2024-03-03 21:41:21 -08:00
EdJoPaTo
f1398ae6cb
refactor: clippy::useless_vec ( #974 )
...
Lint enabled by default but only nightly finds this yet
2024-03-03 21:41:21 -08:00
EdJoPaTo
525848ff4e
refactor: manually apply clippy::use_self for impl with lifetimes ( #974 )
2024-03-03 21:41:21 -08:00
EdJoPaTo
660c7183c7
refactor: clippy::empty_line_after_doc_comments ( #974 )
2024-03-03 21:41:21 -08:00
EdJoPaTo
ab951fae81
refactor: clippy::return_self_not_must_use ( #974 )
2024-03-03 21:41:21 -08:00
EdJoPaTo
3cd4369176
refactor: clippy::doc_markdown ( #974 )
2024-03-03 21:41:20 -08:00
EdJoPaTo
9bc014d7f1
refactor: clippy::items_after_statements ( #974 )
2024-03-03 21:41:20 -08:00
EdJoPaTo
36a0cd56e5
refactor: clippy::deref_by_slicing ( #974 )
2024-03-03 21:41:20 -08:00
EdJoPaTo
b831c5688c
refactor(widget-ref): clippy::needless_pass_by_value ( #974 )
2024-03-03 21:41:20 -08:00
EdJoPaTo
8195f526cb
perf: clippy::needless_pass_by_value ( #974 )
2024-03-03 21:41:20 -08:00
EdJoPaTo
f7f66928a8
refactor: clippy::equatable_if_let ( #974 )
2024-03-03 21:41:20 -08:00
EdJoPaTo
01418eb7c2
refactor: clippy::default_trait_access ( #974 )
2024-03-03 21:41:20 -08:00