From 47fdee190a2fc37272abc50c3738669498d89e3d Mon Sep 17 00:00:00 2001 From: Alex Clarke Date: Mon, 12 Jan 2026 15:28:03 -0700 Subject: [PATCH] fix: Expanded the history item details size so that it can include all the available information for a given item; was previously being cut off on some screens --- src/ui/lidarr_ui/history/mod.rs | 2 +- ...tests__history_tab_HistoryItemDetails.snap | 15 +++++--- ...oading_history_tab_HistoryItemDetails.snap | 15 +++++--- src/ui/sonarr_ui/history/mod.rs | 2 +- ...tests__history_tab_HistoryItemDetails.snap | 15 +++++--- ...oading_history_tab_HistoryItemDetails.snap | 15 +++++--- .../sonarr_ui/library/episode_details_ui.rs | 2 +- src/ui/sonarr_ui/library/season_details_ui.rs | 2 +- src/ui/sonarr_ui/library/series_details_ui.rs | 2 +- ...isode_details_EpisodeHistoryDetails_1.snap | 16 ++++----- ...isode_details_EpisodeHistoryDetails_1.snap | 16 ++++----- ...season_details_SeasonHistoryDetails_1.snap | 16 ++++----- ...season_details_SeasonHistoryDetails_1.snap | 16 ++++----- ...etails_renders_SeasonHistoryDetails_1.snap | 16 ++++----- ...y_series_details_SeriesHistoryDetails.snap | 24 ++++++------- ...ies_details_ui_SeriesHistoryDetails_1.snap | 34 +++++++++---------- src/ui/widgets/popup.rs | 2 ++ src/ui/widgets/popup_tests.rs | 1 + 18 files changed, 117 insertions(+), 94 deletions(-) diff --git a/src/ui/lidarr_ui/history/mod.rs b/src/ui/lidarr_ui/history/mod.rs index 32ce649..fb6b8a8 100644 --- a/src/ui/lidarr_ui/history/mod.rs +++ b/src/ui/lidarr_ui/history/mod.rs @@ -116,5 +116,5 @@ fn draw_history_item_details_popup(f: &mut Frame<'_>, app: &mut App<'_>) { .style(secondary_style()) .alignment(Alignment::Left); - f.render_widget(Popup::new(message).size(Size::NarrowMessage), f.area()); + f.render_widget(Popup::new(message).size(Size::NarrowLongMessage), f.area()); } diff --git a/src/ui/lidarr_ui/history/snapshots/managarr__ui__lidarr_ui__history__history_ui_tests__tests__snapshot_tests__history_tab_HistoryItemDetails.snap b/src/ui/lidarr_ui/history/snapshots/managarr__ui__lidarr_ui__history__history_ui_tests__tests__snapshot_tests__history_tab_HistoryItemDetails.snap index bc4be61..6c54e05 100644 --- a/src/ui/lidarr_ui/history/snapshots/managarr__ui__lidarr_ui__history__history_ui_tests__tests__snapshot_tests__history_tab_HistoryItemDetails.snap +++ b/src/ui/lidarr_ui/history/snapshots/managarr__ui__lidarr_ui__history__history_ui_tests__tests__snapshot_tests__history_tab_HistoryItemDetails.snap @@ -17,11 +17,6 @@ expression: output - - - - - ╭─────────────────────────────────── Details ───────────────────────────────────╮ │Source Title: Test source title │ │Event Type: grabbed │ @@ -31,4 +26,14 @@ expression: output │NZB Info URL: │ │Release Group: │ │Age: 0 days │ + │Published Date: 1970-01-01 00:00:00 UTC │ + │Download Client: │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ ╰─────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/lidarr_ui/history/snapshots/managarr__ui__lidarr_ui__history__history_ui_tests__tests__snapshot_tests__loading_history_tab_HistoryItemDetails.snap b/src/ui/lidarr_ui/history/snapshots/managarr__ui__lidarr_ui__history__history_ui_tests__tests__snapshot_tests__loading_history_tab_HistoryItemDetails.snap index 3887486..f56652e 100644 --- a/src/ui/lidarr_ui/history/snapshots/managarr__ui__lidarr_ui__history__history_ui_tests__tests__snapshot_tests__loading_history_tab_HistoryItemDetails.snap +++ b/src/ui/lidarr_ui/history/snapshots/managarr__ui__lidarr_ui__history__history_ui_tests__tests__snapshot_tests__loading_history_tab_HistoryItemDetails.snap @@ -17,11 +17,6 @@ expression: output - - - - - ╭─────────────────────────────────── Details ───────────────────────────────────╮ │Source Title: │ │Event Type: unknown │ @@ -31,4 +26,14 @@ expression: output │ │ │ │ │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ ╰─────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/sonarr_ui/history/mod.rs b/src/ui/sonarr_ui/history/mod.rs index 58e385e..725d8d3 100644 --- a/src/ui/sonarr_ui/history/mod.rs +++ b/src/ui/sonarr_ui/history/mod.rs @@ -153,5 +153,5 @@ fn draw_history_item_details_popup(f: &mut Frame<'_>, app: &mut App<'_>) { .style(secondary_style()) .alignment(Alignment::Left); - f.render_widget(Popup::new(message).size(Size::NarrowMessage), f.area()); + f.render_widget(Popup::new(message).size(Size::NarrowLongMessage), f.area()); } diff --git a/src/ui/sonarr_ui/history/snapshots/managarr__ui__sonarr_ui__history__history_ui_tests__tests__snapshot_tests__history_tab_HistoryItemDetails.snap b/src/ui/sonarr_ui/history/snapshots/managarr__ui__sonarr_ui__history__history_ui_tests__tests__snapshot_tests__history_tab_HistoryItemDetails.snap index 77e2c98..5a5652d 100644 --- a/src/ui/sonarr_ui/history/snapshots/managarr__ui__sonarr_ui__history__history_ui_tests__tests__snapshot_tests__history_tab_HistoryItemDetails.snap +++ b/src/ui/sonarr_ui/history/snapshots/managarr__ui__sonarr_ui__history__history_ui_tests__tests__snapshot_tests__history_tab_HistoryItemDetails.snap @@ -17,11 +17,6 @@ expression: output - - - - - ╭─────────────────────────────────── Details ───────────────────────────────────╮ │Source Title: Test source │ │Indexer: │ @@ -31,4 +26,14 @@ expression: output │Download Client Name: │ │Age: 0 days │ │Published Date: 1970-01-01 00:00:00 UTC │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ ╰─────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/sonarr_ui/history/snapshots/managarr__ui__sonarr_ui__history__history_ui_tests__tests__snapshot_tests__loading_history_tab_HistoryItemDetails.snap b/src/ui/sonarr_ui/history/snapshots/managarr__ui__sonarr_ui__history__history_ui_tests__tests__snapshot_tests__loading_history_tab_HistoryItemDetails.snap index 71155ea..835f0ac 100644 --- a/src/ui/sonarr_ui/history/snapshots/managarr__ui__sonarr_ui__history__history_ui_tests__tests__snapshot_tests__loading_history_tab_HistoryItemDetails.snap +++ b/src/ui/sonarr_ui/history/snapshots/managarr__ui__sonarr_ui__history__history_ui_tests__tests__snapshot_tests__loading_history_tab_HistoryItemDetails.snap @@ -17,11 +17,6 @@ expression: output - - - - - ╭─────────────────────────────────── Details ───────────────────────────────────╮ │Source Title: │ │ │ @@ -31,4 +26,14 @@ expression: output │ │ │ │ │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ ╰─────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/sonarr_ui/library/episode_details_ui.rs b/src/ui/sonarr_ui/library/episode_details_ui.rs index 5b24319..2161117 100644 --- a/src/ui/sonarr_ui/library/episode_details_ui.rs +++ b/src/ui/sonarr_ui/library/episode_details_ui.rs @@ -395,7 +395,7 @@ fn draw_history_item_details_popup(f: &mut Frame<'_>, app: &mut App<'_>, area: R .style(secondary_style()) .alignment(Alignment::Left); - f.render_widget(Popup::new(message).size(Size::NarrowMessage), area); + f.render_widget(Popup::new(message).size(Size::NarrowLongMessage), area); } fn draw_episode_releases(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) { diff --git a/src/ui/sonarr_ui/library/season_details_ui.rs b/src/ui/sonarr_ui/library/season_details_ui.rs index d7557d4..05596ec 100644 --- a/src/ui/sonarr_ui/library/season_details_ui.rs +++ b/src/ui/sonarr_ui/library/season_details_ui.rs @@ -571,7 +571,7 @@ fn draw_history_item_details_popup(f: &mut Frame<'_>, app: &mut App<'_>, area: R .style(secondary_style()) .alignment(Alignment::Left); - f.render_widget(Popup::new(message).size(Size::NarrowMessage), area); + f.render_widget(Popup::new(message).size(Size::NarrowLongMessage), area); } fn decorate_with_row_style<'a>( diff --git a/src/ui/sonarr_ui/library/series_details_ui.rs b/src/ui/sonarr_ui/library/series_details_ui.rs index 42794ca..2938f6a 100644 --- a/src/ui/sonarr_ui/library/series_details_ui.rs +++ b/src/ui/sonarr_ui/library/series_details_ui.rs @@ -431,5 +431,5 @@ fn draw_history_item_details_popup(f: &mut Frame<'_>, app: &mut App<'_>, area: R .style(secondary_style()) .alignment(Alignment::Left); - f.render_widget(Popup::new(message).size(Size::NarrowMessage), area); + f.render_widget(Popup::new(message).size(Size::NarrowLongMessage), area); } diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__episode_details_ui__episode_details_ui_tests__tests__snapshot_tests__empty_episode_details_EpisodeHistoryDetails_1.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__episode_details_ui__episode_details_ui_tests__tests__snapshot_tests__empty_episode_details_EpisodeHistoryDetails_1.snap index e8150f4..355d496 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__episode_details_ui__episode_details_ui_tests__tests__snapshot_tests__empty_episode_details_EpisodeHistoryDetails_1.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__episode_details_ui__episode_details_ui_tests__tests__snapshot_tests__empty_episode_details_EpisodeHistoryDetails_1.snap @@ -19,10 +19,6 @@ expression: output │ │ │ │ │ │ - │ │ - │ │ - │ │ - │ │ │ ╭──────────────────────── Details ─────────────────────────╮ │ │ │Source Title: │ │ │ │ │ │ @@ -30,6 +26,14 @@ expression: output │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ ╰────────────────────────────────────────────────────────────╯ │ │ │ │ │ @@ -41,8 +45,4 @@ expression: output │ │ │ │ │ │ - │ │ - │ │ - │ │ - │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__episode_details_ui__episode_details_ui_tests__tests__snapshot_tests__episode_details_EpisodeHistoryDetails_1.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__episode_details_ui__episode_details_ui_tests__tests__snapshot_tests__episode_details_EpisodeHistoryDetails_1.snap index 0ae4533..3250fae 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__episode_details_ui__episode_details_ui_tests__tests__snapshot_tests__episode_details_EpisodeHistoryDetails_1.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__episode_details_ui__episode_details_ui_tests__tests__snapshot_tests__episode_details_EpisodeHistoryDetails_1.snap @@ -19,10 +19,6 @@ expression: output │ │ │ │ │ │ - │ │ - │ │ - │ │ - │ │ │ ╭──────────────────────── Details ─────────────────────────╮ │ │ │Source Title: Test source │ │ │ │Indexer: │ │ @@ -30,6 +26,14 @@ expression: output │ │Series Match Type: │ │ │ │NZB Info URL: │ │ │ │Download Client Name: │ │ + │ │Age: 0 days │ │ + │ │Published Date: 1970-01-01 00:00:00 UTC │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ ╰────────────────────────────────────────────────────────────╯ │ │ │ │ │ @@ -41,8 +45,4 @@ expression: output │ │ │ │ │ │ - │ │ - │ │ - │ │ - │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__season_details_ui__season_details_ui_tests__tests__snapshot_tests__empty_season_details_SeasonHistoryDetails_1.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__season_details_ui__season_details_ui_tests__tests__snapshot_tests__empty_season_details_SeasonHistoryDetails_1.snap index b0bd2ac..d39ec29 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__season_details_ui__season_details_ui_tests__tests__snapshot_tests__empty_season_details_SeasonHistoryDetails_1.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__season_details_ui__season_details_ui_tests__tests__snapshot_tests__empty_season_details_SeasonHistoryDetails_1.snap @@ -19,10 +19,6 @@ expression: output │ │ │ │ │ │ - │ │ - │ │ - │ │ - │ │ │ ╭──────────────────────────── Details ────────────────────────────╮ │ │ │Source Title: │ │ │ │ │ │ @@ -30,6 +26,14 @@ expression: output │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ ╰───────────────────────────────────────────────────────────────────╯ │ │ │ │ │ @@ -43,8 +47,4 @@ expression: output │ │ │ │ │ │ - │ │ - │ │ - │ │ - │ │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__season_details_ui__season_details_ui_tests__tests__snapshot_tests__loading_season_details_SeasonHistoryDetails_1.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__season_details_ui__season_details_ui_tests__tests__snapshot_tests__loading_season_details_SeasonHistoryDetails_1.snap index 7c519e8..a5ec336 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__season_details_ui__season_details_ui_tests__tests__snapshot_tests__loading_season_details_SeasonHistoryDetails_1.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__season_details_ui__season_details_ui_tests__tests__snapshot_tests__loading_season_details_SeasonHistoryDetails_1.snap @@ -19,10 +19,6 @@ expression: output │ │ │ │ │ │ - │ │ - │ │ - │ │ - │ │ │ ╭──────────────────────────── Details ────────────────────────────╮ │ │ │Source Title: │ │ │ │ │ │ @@ -30,6 +26,14 @@ expression: output │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ ╰───────────────────────────────────────────────────────────────────╯ │ │ │ │ │ @@ -43,8 +47,4 @@ expression: output │ │ │ │ │ │ - │ │ - │ │ - │ │ - │ │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__season_details_ui__season_details_ui_tests__tests__snapshot_tests__season_details_renders_SeasonHistoryDetails_1.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__season_details_ui__season_details_ui_tests__tests__snapshot_tests__season_details_renders_SeasonHistoryDetails_1.snap index 6fe8412..f36735d 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__season_details_ui__season_details_ui_tests__tests__snapshot_tests__season_details_renders_SeasonHistoryDetails_1.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__season_details_ui__season_details_ui_tests__tests__snapshot_tests__season_details_renders_SeasonHistoryDetails_1.snap @@ -19,10 +19,6 @@ expression: output │ │ │ │ │ │ - │ │ - │ │ - │ │ - │ │ │ ╭──────────────────────────── Details ────────────────────────────╮ │ │ │Source Title: Test source │ │ │ │Indexer: │ │ @@ -30,6 +26,14 @@ expression: output │ │Series Match Type: │ │ │ │NZB Info URL: │ │ │ │Download Client Name: │ │ + │ │Age: 0 days │ │ + │ │Published Date: 1970-01-01 00:00:00 UTC │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ ╰───────────────────────────────────────────────────────────────────╯ │ │ │ │ │ @@ -43,8 +47,4 @@ expression: output │ │ │ │ │ │ - │ │ - │ │ - │ │ - │ │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__empty_series_details_SeriesHistoryDetails.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__empty_series_details_SeriesHistoryDetails.snap index f70e2fe..a8e05d2 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__empty_series_details_SeriesHistoryDetails.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__empty_series_details_SeriesHistoryDetails.snap @@ -19,14 +19,19 @@ expression: output │Language Profile: English │ │Monitored: Yes │ │Size on Disk: 59.51 GB │ - │ │ - │ │ - │ │ - │╭ Series Details ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│ - ││ Seasons │ History ╭─────────────────────────────── Details ───────────────────────────────╮ ││ - ││───────────────────────────────────│Source Title: │───────────────────────────────────││ + │ ╭─────────────────────────────── Details ───────────────────────────────╮ │ + │ │Source Title: │ │ + │ │ │ │ + │╭ Series Details ─────────────────│No additional data available │───────────────────────────────────╮│ + ││ Seasons │ History │ │ ││ + ││───────────────────────────────────│ │───────────────────────────────────││ + ││ │ │ ││ + ││ │ │ ││ + ││ │ │ ││ + ││ │ │ ││ + ││ │ │ ││ + ││ │ │ ││ ││ │ │ ││ - ││ │No additional data available │ ││ ││ │ │ ││ ││ │ │ ││ ││ │ │ ││ @@ -43,10 +48,5 @@ expression: output ││ ││ ││ ││ ││ ││ - ││ ││ - ││ ││ - ││ ││ - ││ ││ - ││ ││ │╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SeriesHistoryDetails_1.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SeriesHistoryDetails_1.snap index 756cf8f..8a6ebe3 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SeriesHistoryDetails_1.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SeriesHistoryDetails_1.snap @@ -19,18 +19,23 @@ expression: output │Language Profile: English │ │Monitored: Yes │ │Size on Disk: 59.51 GB │ - │ │ - │ │ - │ │ - │╭ Series Details ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│ - ││ Seasons │ History ╭─────────────────────────────── Details ───────────────────────────────╮ ││ - ││───────────────────────────────────│Source Title: Test source │───────────────────────────────────││ - ││ Source Title ▼ │Indexer: │ Date ││ - ││=> Test source │Release Group: │ 2024-02-10 07:28:45 UTC ││ - ││ │Series Match Type: │ ││ - ││ │NZB Info URL: │ ││ - ││ │Download Client Name: │ ││ - ││ │Age: 0 days │ ││ + │ ╭─────────────────────────────── Details ───────────────────────────────╮ │ + │ │Source Title: Test source │ │ + │ │Indexer: │ │ + │╭ Series Details ─────────────────│Release Group: │───────────────────────────────────╮│ + ││ Seasons │ History │Series Match Type: │ ││ + ││───────────────────────────────────│NZB Info URL: │───────────────────────────────────││ + ││ Source Title ▼ │Download Client Name: │ Date ││ + ││=> Test source │Age: 0 days │ 2024-02-10 07:28:45 UTC ││ + ││ │Published Date: 1970-01-01 00:00:00 UTC │ ││ + ││ │ │ ││ + ││ │ │ ││ + ││ │ │ ││ + ││ │ │ ││ + ││ │ │ ││ + ││ │ │ ││ + ││ │ │ ││ + ││ │ │ ││ ││ ╰─────────────────────────────────────────────────────────────────────────╯ ││ ││ ││ ││ ││ @@ -43,10 +48,5 @@ expression: output ││ ││ ││ ││ ││ ││ - ││ ││ - ││ ││ - ││ ││ - ││ ││ - ││ ││ │╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/widgets/popup.rs b/src/ui/widgets/popup.rs index b08fe60..7cc66a0 100644 --- a/src/ui/widgets/popup.rs +++ b/src/ui/widgets/popup.rs @@ -14,6 +14,7 @@ pub enum Size { WideLargePrompt, Message, NarrowMessage, + NarrowLongMessage, LargeMessage, InputBox, Dropdown, @@ -35,6 +36,7 @@ impl Size { Size::WideLargePrompt => (70, 50), Size::Message => (25, 8), Size::NarrowMessage => (50, 20), + Size::NarrowLongMessage => (50, 40), Size::LargeMessage => (25, 25), Size::InputBox => (30, 13), Size::Dropdown => (20, 30), diff --git a/src/ui/widgets/popup_tests.rs b/src/ui/widgets/popup_tests.rs index b285a78..f19be22 100644 --- a/src/ui/widgets/popup_tests.rs +++ b/src/ui/widgets/popup_tests.rs @@ -12,6 +12,7 @@ mod tests { assert_eq!(Size::WideLargePrompt.to_percent(), (70, 50)); assert_eq!(Size::Message.to_percent(), (25, 8)); assert_eq!(Size::NarrowMessage.to_percent(), (50, 20)); + assert_eq!(Size::NarrowLongMessage.to_percent(), (50, 40)); assert_eq!(Size::LargeMessage.to_percent(), (25, 25)); assert_eq!(Size::InputBox.to_percent(), (30, 13)); assert_eq!(Size::Dropdown.to_percent(), (20, 30));