feat(ui): add configurable input panel max rows and horizontal scrolling
- Introduce `ui.input_max_rows` (default 5) to control how many rows the input panel expands before scrolling. - Bump `CONFIG_SCHEMA_VERSION` to **1.2.0** and update migration documentation. - Update `configuration.md` and migration guide to describe the new setting. - Adjust TUI height calculation to respect `input_max_rows` and add horizontal scrolling support for long lines. - Add `unicode-segmentation` dependency for proper grapheme handling.
This commit is contained in:
@@ -11,7 +11,7 @@ use std::time::Duration;
|
||||
pub const DEFAULT_CONFIG_PATH: &str = "~/.config/owlen/config.toml";
|
||||
|
||||
/// Current schema version written to `config.toml`.
|
||||
pub const CONFIG_SCHEMA_VERSION: &str = "1.1.0";
|
||||
pub const CONFIG_SCHEMA_VERSION: &str = "1.2.0";
|
||||
|
||||
/// Core configuration shared by all OWLEN clients
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
@@ -706,6 +706,8 @@ pub struct UiSettings {
|
||||
pub wrap_column: u16,
|
||||
#[serde(default = "UiSettings::default_show_onboarding")]
|
||||
pub show_onboarding: bool,
|
||||
#[serde(default = "UiSettings::default_input_max_rows")]
|
||||
pub input_max_rows: u16,
|
||||
}
|
||||
|
||||
impl UiSettings {
|
||||
@@ -732,6 +734,10 @@ impl UiSettings {
|
||||
const fn default_show_onboarding() -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
const fn default_input_max_rows() -> u16 {
|
||||
5
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for UiSettings {
|
||||
@@ -743,6 +749,7 @@ impl Default for UiSettings {
|
||||
show_role_labels: Self::default_show_role_labels(),
|
||||
wrap_column: Self::default_wrap_column(),
|
||||
show_onboarding: Self::default_show_onboarding(),
|
||||
input_max_rows: Self::default_input_max_rows(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user