ed51c4b(terminal) Add ratatui::init() and restore() methods by @joshka in #1289
These are simple opinionated methods for creating a terminal that is
useful to use in most apps. The new init method creates a crossterm
backend writing to stdout, enables raw mode, enters the alternate
screen, and sets a panic handler that restores the terminal on panic.
A minimal hello world now looks a bit like:
use ratatui::{
crossterm::event::{self, Event},
text::Text,
Frame,
};
fn main() {
let mut terminal = ratatui::init();
loop {
terminal
.draw(|frame: &mut Frame| frame.render_widget(Text::raw("Hello World!"), frame.area()))
.expect("Failed to draw");
if matches!(event::read().expect("failed to read event"), Event::Key(_)) {
break;
}
}
ratatui::restore();
}
A type alias DefaultTerminal is added to represent this terminal
type and to simplify any cases where applications need to pass this
terminal around. It is equivalent to:
Terminal<CrosstermBackend<Stdout>>
We also added ratatui::try_init() and try_restore(), for situations
where you might want to handle initialization errors yourself instead
of letting the panic handler fire and cleanup. Simple Apps should
prefer the init and restore functions over these functions.
Corresponding functions to allow passing a TerminalOptions with
a Viewport (e.g. inline, fixed) are also available
(init_with_options,
and try_init_with_options).
ed51c4b(terminal) Add ratatui::init() and restore() methods by @joshka in #1289
These are simple opinionated methods for creating a terminal that is
useful to use in most apps. The new init method creates a crossterm
backend writing to stdout, enables raw mode, enters the alternate
screen, and sets a panic handler that restores the terminal on panic.
A minimal hello world now looks a bit like:
use ratatui::{
crossterm::event::{self, Event},
text::Text,
Frame,
};
fn main() {
let mut terminal = ratatui::init();
loop {
terminal
.draw(|frame: &mut Frame| frame.render_widget(Text::raw("Hello World!"), frame.area()))
.expect("Failed to draw");
if matches!(event::read().expect("failed to read event"), Event::Key(_)) {
break;
}
}
ratatui::restore();
}
A type alias DefaultTerminal is added to represent this terminal
type and to simplify any cases where applications need to pass this
terminal around. It is equivalent to:
Terminal<CrosstermBackend<Stdout>>
We also added ratatui::try_init() and try_restore(), for situations
where you might want to handle initialization errors yourself instead
of letting the panic handler fire and cleanup. Simple Apps should
prefer the init and restore functions over these functions.
Corresponding functions to allow passing a TerminalOptions with
a Viewport (e.g. inline, fixed) are also available
(init_with_options,
and try_init_with_options).
The existing code to create a backend and terminal will remain and
... (truncated)
Commits
3a90e2a chore(release): prepare for 0.28.1 (#1343)
Added opts functions to control server timeouts (get_server_connect_timeout_in_milliseconds, set_server_connect_timeout_in_milliseconds, get_server_timeout_in_milliseconds, set_server_timeout_in_milliseconds), and add ErrorCode::Timeout.
#1052
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Bumps the all group with 6 updates in the / directory:
0.9.0
0.10.0
0.23.0
0.24.0
0.26.3
0.28.1
0.27.0
0.28.1
0.5.0
0.6.0
0.18.3
0.19.0
Updates
testcontainers-modules
from 0.9.0 to 0.10.0Release notes
Sourced from testcontainers-modules's releases.
Changelog
Sourced from testcontainers-modules's changelog.
Commits
480d5ed
chore: release v0.10.0 (#204)cd740ed
feat!: updatetestcontainers
to 0.22.0 (#203)a7fd7d0
docs: documents the neo4j plugins (#194)804139b
docs: addpub mod
docs (#193)afe100c
docs: complete the*_PORT
documentation (#195)72fd4f6
docs: complete the documentation for the meilisearch module (#192)31a5a8e
feat: add support forapache\kafka
docker image (#178)ab0cdbd
docs: fixed a bit of missing docs in the openldap module (#191)2facbec
refactor!: changedKAFKA_PORT
to aContainerPort
(#185)377f162
docs: fixed rustfmt violation in theopenldap
module (#189)Updates
tungstenite
from 0.23.0 to 0.24.0Changelog
Sourced from tungstenite's changelog.
Commits
00c00d4
Prepare 0.24.0 release4f9c5cb
Flush stream on final handshake stage (#431)1617041
style: simplify string formatting (#435)7829e0e
Update GitHub workflow to use rustc 1.635e970b4
Raise MSRV and update the CHANGELOGfb83cd1
Fix behavior when connecting wss url without TLS support (#437)Updates
ratatui
from 0.26.3 to 0.28.1Release notes
Sourced from ratatui's releases.
... (truncated)
Changelog
Sourced from ratatui's changelog.
... (truncated)
Commits
3a90e2a
chore(release): prepare for 0.28.1 (#1343)65da535
chore(ci): update release strategy (#1337)9ed85fd
docs(table): fix incorrect backticks inTableState
docs (#1342)aed60b9
fix(terminal): Terminal::insert_before would crash when called while the view...3631b34
docs(examples): add widget implementation example (#1147)0d5f3c0
test: Avoid unneeded allocations in assertions (#1335)ed51c4b
feat(terminal): Add ratatui::init() and restore() methods (#1289)23516bc
chore: rename ratatui-org to ratatui (#1334)6d1bd99
docs: minor grammar fixes (#1330)2fb0b8a
fix: fix u16 overflow in Terminal::insert_before. (#1323)Updates
crossterm
from 0.27.0 to 0.28.1Release notes
Sourced from crossterm's releases.
Changelog
Sourced from crossterm's changelog.
... (truncated)
Commits
Updates
map_vec
from 0.5.0 to 0.6.0Commits
Updates
git2
from 0.18.3 to 0.19.0Changelog
Sourced from git2's changelog.
Commits
9a5c970
Merge pull request #1059 from ehuss/bump-versionsdb3a3ce
Bump versions for 1.8.1b318ea3
Merge pull request #1056 from ericswpark/doc-add79b1bed
repo: add branch_upstream_remote refname doc (#1055)9598e97
Merge pull request #1052 from Qovery/feat/support-server-timeouts-mastere17e77c
Add global opts related to server timeoutsc9b5f81
Merge pull request #1043 from ehuss/callback-errors324f421
Merge pull request #1032 from bnjmnt4n/libgit2-v1.8.0949aa49
Merge pull request #1053 from kornelski/smallerr0715c33
Reduce Error size with Box<str>Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show