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
This commit is contained in:
Ruben Rosario
2026-06-21 16:57:53 +01:00
parent 1ff594e9b7
commit 915f0a3197
+6 -4
View File
@@ -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<Line> = 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 ──