From 915f0a319721e54e73ba41d9c8b67fecc7ae6d43 Mon Sep 17 00:00:00 2001 From: Ruben Rosario Date: Sun, 21 Jun 2026 16:57:53 +0100 Subject: [PATCH] Feature 2: Notes field in EditTask with wrap and 5-line minimum - Increased popup height from 12 to 14 lines - Notes constraint increased from Length(3) to Length(5) - Notes Paragraph uses multi-line Text from notes.lines() - Added Wrap { trim: false } to Notes Paragraph --- src/ui/components.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ui/components.rs b/src/ui/components.rs index 0518480..038efb0 100644 --- a/src/ui/components.rs +++ b/src/ui/components.rs @@ -328,7 +328,7 @@ pub fn render_edit_task_popup( notes_cursor: usize, active_field: usize, ) { - let popup_area = centered_rect(75, 12, area); + let popup_area = centered_rect(75, 14, area); frame.render_widget(Clear, popup_area); @@ -346,7 +346,7 @@ pub fn render_edit_task_popup( .constraints([ Constraint::Length(3), Constraint::Length(1), - Constraint::Length(3), + Constraint::Length(5), Constraint::Length(1), Constraint::Length(1), Constraint::Length(1), @@ -379,8 +379,10 @@ pub fn render_edit_task_popup( .border_style(notes_style) .title(" Notes ") .title_alignment(Alignment::Left); - let notes_para = Paragraph::new(Text::from(Line::from(Span::raw(notes)))) - .block(notes_block); + let notes_lines: Vec = notes.lines().map(|l| Line::from(Span::raw(l.to_string()))).collect(); + let notes_para = Paragraph::new(Text::from(notes_lines)) + .block(notes_block) + .wrap(Wrap { trim: false }); frame.render_widget(notes_para, rows[2]); // ── Date buttons row ──