Update Deps and Fix Typo#46
Conversation
Changed cfg condition from target_os="linux" to not(target_os="windows") to support both Linux and macOS. Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
- Update dependencies: tui 0.18 -> ratatui 0.29, crossterm 0.23 -> 0.29 - Replace tui:: imports with ratatui:: - Update API: Spans -> Line, f.size() -> f.area(), Frame<B> -> Frame - Update Table API: widths() removed, highlight_style -> row_highlight_style - Refactor KeyEvent creation to use KeyEvent::new() constructor Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
- Fix typo: boader -> border in SettingTheme struct and related methods - Rename movement commands to use full names (e.g., move_to_parent_dir -> move_to_parent_directory) - Rename functions for clarity (e.g., default_vim_ctrl_movements -> default_vim_control_key_movements) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- config.ron: fix typos (Yello->Yellow, hightlight->highlight, imput->input, experement->experiment, boader->border) - Rename classifiy_kinds to classify_kinds - Rename functions for clarity: - insert_new_statefuldir -> insert_new_state_full_directory - current_dir_path -> current_directory_path_from_environment - get_home_directory_path -> get_home_directory_path_from_environment - make_info_files_from_dirpath -> make_info_files_from_directory_path - create_dir_by_relpath -> create_directory_by_relative_path - Update command names to use full directory naming 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates dependencies from the deprecated tui library to its successor ratatui (version 0.29.0), alongside fixing multiple typos throughout the codebase. The migration includes updating API calls to match ratatui's interface changes and improving function naming for better code clarity.
Key changes:
- Migrated from
tui0.18.0 toratatui0.29.0 and updated related dependencies - Fixed typos including "boader" → "border", "classifiy" → "classify", and "denide" → "denied"
- Renamed functions for better clarity (e.g.,
make_info_files_from_dirpath→make_info_files_from_directory_path)
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| Cargo.toml | Updated dependencies to use ratatui 0.29.0, crossterm 0.29.0, ron 0.12.0, and chrono 0.4.42 |
| src/ui.rs | Migrated to ratatui imports, fixed "boader" → "border" typo, updated Frame and Table API usage |
| src/state.rs | Updated imports to ratatui, renamed function call to use expanded naming |
| src/path_process.rs | Fixed "classifiy" → "classify" typo, renamed functions for clarity, improved cross-platform support comments |
| src/main.rs | Updated imports and function calls to match renamed path_process functions |
| src/load_config.rs | Updated imports to ratatui, fixed "boader" → "border" typo, refactored string_to_keyevent, updated ron error types |
| src/keymapping.rs | Updated function calls to use new directory naming convention |
| src/input_ui.rs | Migrated to ratatui with DefaultTerminal type, updated Frame API usage |
| src/file_item_list.rs | Fixed "classifiy" → "classify" typo in method name |
| src/application.rs | Updated imports to ratatui, renamed methods, updated function references |
| config.ron | Fixed typos in comments: "Yello" → "Yellow", "boader" → "border", "hightlight" → "highlight", "imput" → "input", "experement" → "experiment" |
Comments suppressed due to low confidence (1)
src/load_config.rs:79
- Inconsistent command naming: These lines use the old abbreviated form "move_to_parent_dir" and "move_to_child_dir", while lines 72 and 75 use the expanded form "move_to_parent_directory" and "move_to_child_directory". This inconsistency should be resolved to use the same naming pattern throughout the stacker mode configuration.
("left", "move_to_parent_dir"),
("right", "move_to_child_dir"),
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| .split(f.size())[0]; | ||
| .split(f.area())[0]; | ||
|
|
||
| let input_style = Style::default().bg(Color::LightYellow).bg(Color::White); |
There was a problem hiding this comment.
Setting background color twice: .bg(Color::LightYellow).bg(Color::White) will result in only Color::White being applied since the second call overwrites the first. This appears to be a copy-paste error. If the intent was to set both background and foreground colors, use .bg(Color::LightYellow).fg(Color::White) instead.
| let input_style = Style::default().bg(Color::LightYellow).bg(Color::White); | |
| let input_style = Style::default().bg(Color::LightYellow).fg(Color::White); |
| @@ -61,29 +61,32 @@ pub fn current_dir_path() -> PathBuf { | |||
|
|
|||
| // C:\Users\UserNmae | |||
There was a problem hiding this comment.
Typo in comment: "UserNmae" should be "UserName"
| // C:\Users\UserNmae | |
| // C:\Users\UserName |
|
|
||
| pub fn string_map_to_user_keyboad(keybinds: &HashMap<String, String>) -> HashMap<KeyEvent, String> { | ||
| let mut keybind: HashMap<KeyEvent, String> = HashMap::new(); | ||
| pub fn string_map_to_user_keybindings( |
There was a problem hiding this comment.
Typo in function name: "keyboad" should be "keyboard"
| ) -> HashMap<KeyEvent, String> { | ||
| let mut keybindings: HashMap<KeyEvent, String> = HashMap::new(); | ||
| for (key, cmd) in keybinds.iter() { | ||
| let user_keyboad = string_to_keyevent(key); |
There was a problem hiding this comment.
Typo in variable name: "user_keyboad" should be "user_keyboard"
| keybindings | ||
| } | ||
|
|
||
| pub fn multi_string_map_to_user_keyboad( |
There was a problem hiding this comment.
Typo in function name: "keyboad" should be "keyboard"
| use crate::load_config::{ | ||
| load_user_config_file, multi_string_map_to_user_keyboad, SettingTheme, UserConfig, UserKeyCode, | ||
| UserKeybinds, | ||
| load_user_config_file, multi_string_map_to_user_keyboad, SettingTheme, UserConfig, UserKeybinds, |
There was a problem hiding this comment.
Typo in imported function name: "keyboad" should be "keyboard"
| load_user_config_file, multi_string_map_to_user_keyboad, SettingTheme, UserConfig, UserKeybinds, | |
| load_user_config_file, multi_string_map_to_user_keyboard, SettingTheme, UserConfig, UserKeybinds, |
| pub fn current_directory_path_from_environment() -> PathBuf { | ||
| match current_dir() { | ||
| Ok(path) => path, | ||
| Err(e) => panic!("Permission denide: {}", e), |
There was a problem hiding this comment.
Typo in error message: "denide" should be "denied"
| Err(e) => panic!("Permission denide: {}", e), | |
| Err(e) => panic!("Permission denied: {}", e), |
No description provided.