Skip to content

Commit

Permalink
feat: Bump to ratatui 0.23.0 ✨
Browse files Browse the repository at this point in the history
  • Loading branch information
kdheepak committed Aug 29, 2023
1 parent e6d3784 commit ae44577
Show file tree
Hide file tree
Showing 13 changed files with 82 additions and 68 deletions.
82 changes: 48 additions & 34 deletions Cargo.lock

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

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ anyhow = "1.0.75"
better-panic = "0.3.0"
cassowary = "0.3.0"
chrono = "0.4.26"
clap = { version = "4.4.0", features = ["derive"] }
clap = { version = "4.4.1", features = ["derive"] }
crossterm = { version = "0.27.0", features = [
"event-stream",
] }
Expand All @@ -29,16 +29,16 @@ log = "0.4.20"
log4rs = "1.2.0"
path-clean = "1.0.1"
rand = "0.8.5"
regex = "1.9.3"
regex = "1.9.4"
rustyline = { version = "12.0.0", features = ["with-file-history", "derive"] }
serde = { version = "1.0.186", features = ["derive"] }
serde = { version = "1.0.188", features = ["derive"] }
serde_json = "1.0.105"
shellexpand = "3.1.0"
shlex = "1.1.0"
task-hookrs = "0.9.0"
tokio = { version = "1.32.0", features = ["full"] }
tokio-stream = "0.1.14"
tui = { package = "ratatui", version = "0.22.0" }
ratatui = "0.23.0"
unicode-segmentation = "1.10.1"
unicode-truncate = "0.2.0"
unicode-width = "0.1.10"
Expand All @@ -60,6 +60,6 @@ incremental = true
lto = "off"

[build-dependencies]
clap = { version = "4.4.0", features = ["derive"] }
clap = { version = "4.4.1", features = ["derive"] }
clap_complete = "4.4.0"
shlex = "1.1.0"
14 changes: 7 additions & 7 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ use std::io::Write;

use std::time::SystemTime;

use ratatui::symbols::bar::FULL;
use task_hookrs::date::Date;
use task_hookrs::import::import;
use task_hookrs::status::TaskStatus;
use task_hookrs::task::Task;
use tui::symbols::bar::FULL;
use uuid::Uuid;

use unicode_segmentation::Graphemes;
Expand All @@ -42,15 +42,15 @@ use std::sync::mpsc;

use std::sync::{Arc, Mutex};

use std::time::Duration;
use tui::{
use ratatui::{
backend::Backend,
layout::{Alignment, Constraint, Direction, Layout, Margin, Rect},
style::{Color, Modifier, Style},
terminal::Frame,
text::{Line, Span, Text},
widgets::{Block, BorderType, Borders, Clear, Gauge, LineGauge, List, ListItem, Paragraph, Wrap},
};
use std::time::Duration;

use rustyline::history::SearchDirection as HistoryDirection;
use rustyline::line_buffer::LineBuffer;
Expand All @@ -60,8 +60,8 @@ use rustyline::Word;

use crate::history::HistoryContext;

use ratatui::{backend::CrosstermBackend, Terminal};
use std::io;
use tui::{backend::CrosstermBackend, Terminal};

use regex::Regex;

Expand All @@ -88,7 +88,7 @@ use task_hookrs::project::Project;
use versions::Versioning;

use log::{debug, error, info, log_enabled, trace, warn, Level, LevelFilter};
use tui::widgets::Tabs;
use ratatui::widgets::Tabs;

const MAX_LINE: usize = 4096;

Expand Down Expand Up @@ -3732,12 +3732,12 @@ pub fn remove_tag(task: &mut Task, tag: &str) {
#[cfg(test)]
mod tests {
use super::*;
use ratatui::backend::TestBackend;
use ratatui::buffer::Buffer;
use std::ffi::OsStr;
use std::fs::File;
use std::path::Path;
use std::{fmt::Write, io};
use tui::backend::TestBackend;
use tui::buffer::Buffer;

/// Returns a string representation of the given buffer for debugging purpose.
fn buffer_view(buffer: &Buffer) -> String {
Expand Down
2 changes: 1 addition & 1 deletion src/calendar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const COL_WIDTH: usize = 21;

use chrono::{format::Fixed, DateTime, Datelike, Duration, FixedOffset, Local, Month, NaiveDate, NaiveDateTime, TimeZone};

use tui::{
use ratatui::{
buffer::Buffer,
layout::Rect,
style::{Color, Modifier, Style},
Expand Down
4 changes: 2 additions & 2 deletions src/completion.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use log::{debug, error, info, log_enabled, trace, warn, Level, LevelFilter};
use std::{error::Error, io};
use tui::{
use ratatui::{
layout::{Constraint, Corner, Direction, Layout},
style::{Color, Modifier, Style},
text::{Line, Span},
widgets::{Block, Borders, List, ListItem, ListState},
Terminal,
};
use std::{error::Error, io};

use rustyline::highlight::{Highlighter, MatchingBracketHighlighter};
use rustyline::hint::Hinter;
Expand Down
8 changes: 4 additions & 4 deletions src/config.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use anyhow::{Context, Result};
use std::collections::HashMap;
use std::error::Error;
use std::str;
use tui::{
use ratatui::{
style::{Color, Modifier, Style},
symbols::bar::FULL,
symbols::line::DOUBLE_VERTICAL,
};
use std::collections::HashMap;
use std::error::Error;
use std::str;

trait TaskWarriorBool {
fn get_bool(&self) -> Option<bool>;
Expand Down
2 changes: 1 addition & 1 deletion src/help.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::cmp;

use tui::{
use ratatui::{
buffer::Buffer,
layout::{Alignment, Rect},
style::{Modifier, Style},
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use crossterm::{
terminal::{disable_raw_mode, enable_raw_mode, Clear, ClearType, EnterAlternateScreen, LeaveAlternateScreen},
};
use futures::stream::{FuturesUnordered, StreamExt};
use tui::{backend::CrosstermBackend, Terminal};
use ratatui::{backend::CrosstermBackend, Terminal};

use path_clean::PathClean;

Expand Down
2 changes: 1 addition & 1 deletion src/pane/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const ACTIVE: &str = "Complete";

use chrono::{Datelike, Duration, Local, Month, NaiveDate, NaiveDateTime, TimeZone};

use tui::{
use ratatui::{
buffer::Buffer,
layout::{Alignment, Rect},
style::{Color, Modifier, Style},
Expand Down
2 changes: 1 addition & 1 deletion src/pane/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const COMPLETE_HEADER: &str = "Complete";

use chrono::{Datelike, Duration, Local, Month, NaiveDate, NaiveDateTime, TimeZone};

use tui::{
use ratatui::{
buffer::Buffer,
layout::Rect,
style::{Color, Modifier, Style},
Expand Down
2 changes: 1 addition & 1 deletion src/scrollbar.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use tui::{
use ratatui::{
backend::Backend,
buffer::Buffer,
layout::{Margin, Rect},
Expand Down
Loading

0 comments on commit ae44577

Please sign in to comment.