summaryrefslogtreecommitdiff
path: root/internal/ui/taskdetail.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-06-28 11:32:30 +0300
committerPaul Buetow <paul@buetow.org>2025-06-28 11:32:30 +0300
commitd06b179332e82635f6a7c8366e51fb5b421a7c2c (patch)
treec571672a146d07de8d3969dc7e2c272331abef6a /internal/ui/taskdetail.go
parentb659b8cf87c86280f62cef0f499a60b999e6ce6b (diff)
feat: add external editor support for description editing in detail viewv0.9.1
- Enable editing task description using external editor ($EDITOR) - Create temporary file for editing and handle TUI editor properly - Show editing indicator while external editor is active - Add blinking feedback after successful description update - Increment version from 0.9.0 to 0.9.1 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'internal/ui/taskdetail.go')
-rw-r--r--internal/ui/taskdetail.go19
1 files changed, 15 insertions, 4 deletions
diff --git a/internal/ui/taskdetail.go b/internal/ui/taskdetail.go
index 9d68e4f..70c06a0 100644
--- a/internal/ui/taskdetail.go
+++ b/internal/ui/taskdetail.go
@@ -141,12 +141,23 @@ func (m *Model) renderTaskDetail() string {
lines = append(lines, "")
descLabelStyle := labelStyle.Copy()
descValueStyle := descStyle.Copy()
- if m.detailFieldIndex == currentField {
+ // Apply blinking if this field is blinking
+ if m.detailBlinkField == currentField && m.detailBlinkOn {
+ blinkBG := lipgloss.Color("226") // Bright yellow
+ descLabelStyle = descLabelStyle.Background(blinkBG).Foreground(lipgloss.Color("0"))
+ descValueStyle = descValueStyle.Background(blinkBG).Foreground(lipgloss.Color("0"))
+ } else if m.detailFieldIndex == currentField {
descLabelStyle = descLabelStyle.Background(lipgloss.Color(m.theme.SelectedBG))
descValueStyle = descValueStyle.Background(lipgloss.Color(m.theme.SelectedBG))
}
lines = append(lines, descLabelStyle.Render("Description:"))
- if t.Description != "" {
+ if m.detailDescEditing {
+ // Show editing indicator
+ editingStyle := lipgloss.NewStyle().
+ Foreground(lipgloss.Color("226")).
+ Italic(true)
+ lines = append(lines, editingStyle.Render(" [Editing in external editor...]"))
+ } else if t.Description != "" {
// Highlight search matches if searching
desc := t.Description
if m.detailSearchRegex != nil && m.detailSearchRegex.MatchString(desc) {
@@ -185,12 +196,12 @@ func (m *Model) renderTaskDetail() string {
Foreground(lipgloss.Color("245")).
Italic(true)
// Check if we're in any editing mode
- if m.prioritySelecting || m.tagsEditing || m.dueEditing || m.recurEditing {
+ if m.prioritySelecting || m.tagsEditing || m.dueEditing || m.recurEditing || m.detailDescEditing {
lines = append(lines, instructionStyle.Render("Editing mode - Follow on-screen prompts"))
} else {
lines = append(lines, instructionStyle.Render("Press ESC or q to return to table view"))
lines = append(lines, instructionStyle.Render("Use ↑/k and ↓/j to navigate fields"))
- lines = append(lines, instructionStyle.Render("Press i or Enter to edit (Priority, Tags, Due, Recurrence)"))
+ lines = append(lines, instructionStyle.Render("Press i or Enter to edit (Priority, Tags, Due, Recurrence, Description)"))
if m.detailSearching {
lines = append(lines, instructionStyle.Render("Type to search, Enter to confirm"))
} else {