Skip to content

Commit 024656d

Browse files
committed
refactor(tui): simplify help overlay
- Remove separate sections (List View, Detail View, Pickers) - Keep only special functionality shortcuts - Remove navigation/scrolling shortcuts - Make modal narrower and more compact
1 parent 810e90e commit 024656d

File tree

1 file changed

+7
-43
lines changed

1 file changed

+7
-43
lines changed

internal/tui/help.go

Lines changed: 7 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ func (m helpOverlayModel) View() string {
5454
return "Loading..."
5555
}
5656

57-
// Calculate modal dimensions - make it wider than pickers
58-
modalWidth := max(70, min(90, m.width*70/100))
57+
// Calculate modal dimensions
58+
modalWidth := max(50, min(60, m.width*60/100))
5959

6060
// Title
6161
title := lipgloss.NewStyle().
@@ -68,65 +68,29 @@ func (m helpOverlayModel) View() string {
6868
keyStyle := lipgloss.NewStyle().
6969
Foreground(ui.ColorPrimary).
7070
Bold(true).
71-
Width(20).
71+
Width(12).
7272
Render(key)
7373
descStyle := lipgloss.NewStyle().
7474
Foreground(lipgloss.Color("#fff")).
7575
Render(desc)
7676
return keyStyle + descStyle
7777
}
7878

79-
// Helper to create a section header
80-
sectionHeader := func(name string) string {
81-
return lipgloss.NewStyle().
82-
Bold(true).
83-
Foreground(ui.ColorBlue).
84-
Render(name)
85-
}
86-
8779
var content strings.Builder
8880
content.WriteString(title + "\n\n")
8981

90-
// List view section
91-
content.WriteString(sectionHeader("List View") + "\n")
92-
content.WriteString(shortcut("j/k, ↓/↑", "Navigate up/down") + "\n")
93-
content.WriteString(shortcut("enter", "View bean details") + "\n")
9482
content.WriteString(shortcut("c", "Create new bean") + "\n")
95-
content.WriteString(shortcut("e", "Edit bean in $EDITOR") + "\n")
96-
content.WriteString(shortcut("s", "Change status") + "\n")
97-
content.WriteString(shortcut("t", "Change type") + "\n")
98-
content.WriteString(shortcut("P", "Change priority") + "\n")
99-
content.WriteString(shortcut("p", "Set parent") + "\n")
100-
content.WriteString(shortcut("b", "Manage blocking relationships") + "\n")
101-
content.WriteString(shortcut("/", "Filter list") + "\n")
102-
content.WriteString(shortcut("g t", "Go to tags (filter by tag)") + "\n")
103-
content.WriteString(shortcut("esc", "Clear filter") + "\n")
104-
content.WriteString(shortcut("q", "Quit") + "\n")
105-
content.WriteString("\n")
106-
107-
// Detail view section
108-
content.WriteString(sectionHeader("Detail View") + "\n")
109-
content.WriteString(shortcut("j/k, ↓/↑", "Scroll up/down") + "\n")
110-
content.WriteString(shortcut("tab", "Switch focus (links/body)") + "\n")
111-
content.WriteString(shortcut("enter", "Navigate to linked bean") + "\n")
112-
content.WriteString(shortcut("e", "Edit bean in $EDITOR") + "\n")
83+
content.WriteString(shortcut("e", "Edit in $EDITOR") + "\n")
11384
content.WriteString(shortcut("s", "Change status") + "\n")
11485
content.WriteString(shortcut("t", "Change type") + "\n")
11586
content.WriteString(shortcut("P", "Change priority") + "\n")
11687
content.WriteString(shortcut("p", "Set parent") + "\n")
117-
content.WriteString(shortcut("b", "Manage blocking relationships") + "\n")
118-
content.WriteString(shortcut("esc/backspace", "Back to list/previous bean") + "\n")
88+
content.WriteString(shortcut("b", "Manage blocking") + "\n")
89+
content.WriteString(shortcut("/", "Filter") + "\n")
90+
content.WriteString(shortcut("g t", "Filter by tag") + "\n")
11991
content.WriteString(shortcut("q", "Quit") + "\n")
12092
content.WriteString("\n")
12193

122-
// Picker/Dialog section
123-
content.WriteString(sectionHeader("Pickers & Dialogs") + "\n")
124-
content.WriteString(shortcut("j/k, ↓/↑", "Navigate up/down") + "\n")
125-
content.WriteString(shortcut("enter", "Select/confirm") + "\n")
126-
content.WriteString(shortcut("/", "Filter items") + "\n")
127-
content.WriteString(shortcut("esc", "Cancel") + "\n")
128-
content.WriteString("\n")
129-
13094
// Footer
13195
footer := helpKeyStyle.Render("?/esc") + " " + helpStyle.Render("close")
13296

0 commit comments

Comments
 (0)