Skip to content

Commit

Permalink
Bump tui-tree-widget from 0.12.0 to 0.13.0 (#4073)
Browse files Browse the repository at this point in the history
Bumps [tui-tree-widget](https://github.com/EdJoPaTo/tui-rs-tree-widget)
from 0.12.0 to 0.13.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/EdJoPaTo/tui-rs-tree-widget/releases">tui-tree-widget's
releases</a>.</em></p>
<blockquote>
<h2>v0.13.0</h2>
<ul>
<li>feat: migrate to ratatui (<a
href="https://redirect.github.com/EdJoPaTo/tui-rs-tree-widget/issues/26">#26</a>)
3f30effd19cfd1f987357aa2bf87c3144500a555</li>
<li>build: ignore msrv 17de58e23901ad8672da75628ab5d82c6a9dfb19</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/EdJoPaTo/tui-rs-tree-widget/commit/18bc19abaf066848d88d0eb5654f8e13bd3dfc87"><code>18bc19a</code></a>
build: v0.13.0</li>
<li><a
href="https://github.com/EdJoPaTo/tui-rs-tree-widget/commit/3f30effd19cfd1f987357aa2bf87c3144500a555"><code>3f30eff</code></a>
feat: migrate to ratatui (<a
href="https://redirect.github.com/EdJoPaTo/tui-rs-tree-widget/issues/26">#26</a>)</li>
<li><a
href="https://github.com/EdJoPaTo/tui-rs-tree-widget/commit/100a8166a37ee731cd27a0050384dad1d81dedfa"><code>100a816</code></a>
build(cargo): update crossterm requirement from 0.25 to 0.27 (<a
href="https://redirect.github.com/EdJoPaTo/tui-rs-tree-widget/issues/25">#25</a>)</li>
<li><a
href="https://github.com/EdJoPaTo/tui-rs-tree-widget/commit/17de58e23901ad8672da75628ab5d82c6a9dfb19"><code>17de58e</code></a>
build: ignore msrv</li>
<li><a
href="https://github.com/EdJoPaTo/tui-rs-tree-widget/commit/56bb8cab247f1a87392dff7802445cfa87c07eae"><code>56bb8ca</code></a>
ci(coverage): generate using cargo-llvm-cov</li>
<li><a
href="https://github.com/EdJoPaTo/tui-rs-tree-widget/commit/1b601ea06bce3e644fa50c98171949dbd5736a51"><code>1b601ea</code></a>
build: bump msrv to 1.60.0</li>
<li><a
href="https://github.com/EdJoPaTo/tui-rs-tree-widget/commit/8a53caced7af408f10129460393ca4558edae83c"><code>8a53cac</code></a>
refactor(lint): improve and adapt to lints</li>
<li>See full diff in <a
href="https://github.com/EdJoPaTo/tui-rs-tree-widget/compare/v0.12.0...v0.13.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tui-tree-widget&package-manager=cargo&previous-version=0.12.0&new-version=0.13.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

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 <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> 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 <dependency name> 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 <dependency name>` 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 <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adam H. Leventhal <[email protected]>
  • Loading branch information
dependabot[bot] and ahl authored Sep 13, 2023
1 parent b966d8b commit b833389
Show file tree
Hide file tree
Showing 29 changed files with 263 additions and 254 deletions.
62 changes: 36 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ propolis-server = { git = "https://github.com/oxidecomputer/propolis", rev = "de
proptest = "1.2.0"
quote = "1.0"
rand = "0.8.5"
ratatui = "0.23.0"
rayon = "1.7"
rcgen = "0.10.0"
ref-cast = "1.0"
Expand Down Expand Up @@ -354,7 +355,6 @@ trust-dns-server = "0.22"
trybuild = "1.0.84"
tufaceous = { path = "tufaceous" }
tufaceous-lib = { path = "tufaceous-lib" }
tui = "0.19.0"
unicode-width = "0.1.10"
update-engine = { path = "update-engine" }
uuid = { version = "1.4.1", features = ["serde", "v4"] }
Expand Down
2 changes: 1 addition & 1 deletion wicket-dbg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ camino.workspace = true
ciborium.workspace = true
clap.workspace = true
crossterm.workspace = true
ratatui.workspace = true
serde.workspace = true
slog.workspace = true
slog-async.workspace = true
slog-term.workspace = true
slog-envlogger.workspace = true
tokio = { workspace = true, features = ["full"] }
tui.workspace = true
wicket.workspace = true

# used only by wicket-dbg binary
Expand Down
4 changes: 2 additions & 2 deletions wicket/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ itertools.workspace = true
omicron-common.workspace = true
once_cell.workspace = true
owo-colors.workspace = true
ratatui.workspace = true
reqwest.workspace = true
rpassword.workspace = true
semver.workspace = true
Expand All @@ -37,8 +38,7 @@ tokio = { workspace = true, features = ["full"] }
tokio-util.workspace = true
toml.workspace = true
toml_edit.workspace = true
tui.workspace = true
tui-tree-widget = "0.12.0"
tui-tree-widget = "0.13.0"
unicode-width.workspace = true
zeroize.workspace = true

Expand Down
4 changes: 2 additions & 2 deletions wicket/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ upon event receipt, and that a screen never processes an event that can mutate
the global state and render in the same method. However, due to the stateful
rendering model of `tui.rs`, we do allow `Controls` to mutate their internal
state when executing the `draw` method. This allows reuse of `tui.rs` stateful
widgets like `list`. `Controls` create `tui::widget::Widgets` on demand during
widgets like `list`. `Controls` create `ratatui::widget::Widgets` on demand during
rendering, which themselves display to a given subset of the terminal, known
as a `tui::layout::Rect`. If necessary, custom `Widgets` can be created, as
as a `ratatui::layout::Rect`. If necessary, custom `Widgets` can be created, as
we have done with the `Rack` and `BoxConnector` widgets. Custom widgets can be
found in `src/ui/widgets`.

Expand Down
6 changes: 3 additions & 3 deletions wicket/src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ use crossterm::terminal::{
LeaveAlternateScreen,
};
use futures::StreamExt;
use ratatui::backend::CrosstermBackend;
use ratatui::Terminal;
use slog::Logger;
use slog::{debug, error, info};
use std::env::VarError;
Expand All @@ -23,8 +25,6 @@ use tokio::sync::mpsc::{
unbounded_channel, UnboundedReceiver, UnboundedSender,
};
use tokio::time::{interval, Duration};
use tui::backend::CrosstermBackend;
use tui::Terminal;
use wicketd_client::types::AbortUpdateOptions;
use wicketd_client::types::ClearUpdateStateOptions;
use wicketd_client::types::StartUpdateOptions;
Expand All @@ -38,7 +38,7 @@ use crate::{Action, Cmd, Event, KeyHandler, Recorder, State, TICK_INTERVAL};

// We can avoid a bunch of unnecessary type parameters by picking them ahead of time.
pub type Term = Terminal<CrosstermBackend<Stdout>>;
pub type Frame<'a> = tui::Frame<'a, CrosstermBackend<Stdout>>;
pub type Frame<'a> = ratatui::Frame<'a, CrosstermBackend<Stdout>>;

const MAX_RECORDED_EVENTS: usize = 10000;

Expand Down
2 changes: 1 addition & 1 deletion wicket/src/state/inventory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
use anyhow::anyhow;
use once_cell::sync::Lazy;
use ratatui::text::Text;
use serde::{Deserialize, Serialize};
use std::collections::BTreeMap;
use std::fmt::Display;
use std::iter::Iterator;
use tui::text::Text;
use wicketd_client::types::{
RackV1Inventory, RotInventory, RotSlot, SpComponentCaboose,
SpComponentInfo, SpIgnition, SpState, SpType,
Expand Down
4 changes: 2 additions & 2 deletions wicket/src/state/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
//! through wicketd.
use crate::ui::defaults::style;
use ratatui::style::Style;
use ratatui::text::Span;
use serde::{Deserialize, Serialize};
use std::time::Duration;
use tui::style::Style;
use tui::text::Span;

// This should be greater than the highest poll value for each service
const LIVENESS_THRESHOLD: Duration = Duration::from_secs(30);
Expand Down
2 changes: 1 addition & 1 deletion wicket/src/state/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

use tui::style::Style;
use ratatui::style::Style;
use wicket_common::update_events::{
EventReport, ProgressEventKind, StepEventKind, UpdateComponent,
UpdateStepId,
Expand Down
4 changes: 2 additions & 2 deletions wicket/src/ui/controls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

use crate::{Action, Cmd, Frame, State};
use tui::layout::Rect;
use ratatui::layout::Rect;

/// A [`Control`] is the an item on a screen that can be selected and interacted with.
/// Control's render [`tui::widgets::Widget`]s when drawn.
/// Control's render [`ratatui::widgets::Widget`]s when drawn.
///
///
/// Due to the rendering model of stateful widgets in `tui.rs`, `self` must
Expand Down
2 changes: 1 addition & 1 deletion wicket/src/ui/defaults/colors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//!
//! Thanks for the idea JMC!
use tui::style::Color;
use ratatui::style::Color;

pub const OX_YELLOW: Color = Color::Rgb(0xF5, 0xCF, 0x65);
pub const OX_OFF_WHITE: Color = Color::Rgb(0xE0, 0xE0, 0xE0);
Expand Down
2 changes: 1 addition & 1 deletion wicket/src/ui/defaults/dimensions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

//! Default dimensions for various widgets common across screens
use tui::layout::Rect;
use ratatui::layout::Rect;

// Extension trait for Rects that provide centering and placement capabilities
pub trait RectExt {
Expand Down
6 changes: 3 additions & 3 deletions wicket/src/ui/defaults/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
//! Default consistent styling for various widgets
use super::colors::*;
use tui::style::Color;
use tui::style::Modifier;
use tui::style::Style;
use ratatui::style::Color;
use ratatui::style::Modifier;
use ratatui::style::Style;

pub fn selected() -> Style {
Style::default().fg(TUI_GREEN)
Expand Down
12 changes: 6 additions & 6 deletions wicket/src/ui/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ use crate::ui::defaults::colors::*;
use crate::ui::defaults::style;
use crate::ui::widgets::Fade;
use crate::{Action, Cmd, Frame, State, Term};
use ratatui::layout::{Alignment, Constraint, Direction, Layout, Rect};
use ratatui::style::{Modifier, Style};
use ratatui::text::{Line, Span};
use ratatui::widgets::{Block, BorderType, Borders, List, ListItem, Paragraph};
use slog::{o, Logger};
use tui::layout::{Alignment, Constraint, Direction, Layout, Rect};
use tui::style::{Modifier, Style};
use tui::text::{Span, Spans};
use tui::widgets::{Block, BorderType, Borders, List, ListItem, Paragraph};
use wicketd_client::types::GetLocationResponse;

/// The [`MainScreen`] is the primary UI element of the terminal, covers the
Expand Down Expand Up @@ -204,7 +204,7 @@ impl MainScreen {
spans.push(Span::styled(" | ", style::divider()));
spans.push(Span::styled("MGS: ", style::service()));
spans.extend_from_slice(&mgs_spans);
let main = Paragraph::new(Spans::from(spans));
let main = Paragraph::new(Line::from(spans));
frame.render_widget(main, rect);

let system_version = state
Expand All @@ -213,7 +213,7 @@ impl MainScreen {
.as_ref()
.map_or_else(|| "UNKNOWN".to_string(), |v| v.to_string());

let test = Paragraph::new(Spans::from(vec![
let test = Paragraph::new(Line::from(vec![
Span::styled(
"UPDATE VERSION: ",
Style::default().fg(TUI_GREEN_DARK),
Expand Down
2 changes: 1 addition & 1 deletion wicket/src/ui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ mod widgets;
mod wrap;

use crate::{Action, Cmd, State, Term};
use ratatui::widgets::ListState;
use slog::{o, Logger};
use tui::widgets::ListState;

use main::MainScreen;
use splash::SplashScreen;
Expand Down
Loading

0 comments on commit b833389

Please sign in to comment.