From 47f670da286aa9fcdfe1413406de04d1f11d7e50 Mon Sep 17 00:00:00 2001 From: Robin Olsen Date: Fri, 20 Mar 2026 12:22:21 +0100 Subject: [PATCH] refine helpbar --- pkg/tui/components/helpbar.go | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/pkg/tui/components/helpbar.go b/pkg/tui/components/helpbar.go index 873a88c..54fe6f6 100644 --- a/pkg/tui/components/helpbar.go +++ b/pkg/tui/components/helpbar.go @@ -106,10 +106,7 @@ func (h HelpBar) fullHelp() string { ) } - innerWidth := h.width - 2 - if innerWidth < 1 { - innerWidth = 1 - } + innerWidth := max(h.width - 2, 1) cellWidth := fullHelpKeyWidth + 1 + fullHelpDescWidth cols := fitHelpColumns( @@ -196,32 +193,23 @@ func helpBarConfig(view ViewKind) HelpBarConfig { case ViewIssues: return HelpBarConfig{ ShortItems: []HelpItem{ - {Key: "tab", Desc: "switch"}, {Key: "v", Desc: "kanban"}, {Key: "↑/k", Desc: "up"}, {Key: "↓/j", Desc: "down"}, - {Key: "pgup/pgdn", Desc: "page"}, {Key: "a", Desc: "add"}, {Key: "c", Desc: "comment"}, {Key: "e/d/s/p/t/A", Desc: "edit"}, {Key: "x", Desc: "delete"}, - {Key: "S", Desc: "submit"}, {Key: "q", Desc: "quit"}, {Key: "?", Desc: "help"}, }, FullItems: []HelpItem{ - {Key: "tab", Desc: "switch window"}, - {Key: "enter", Desc: "view issue"}, - {Key: "b", Desc: "back to list"}, {Key: "v", Desc: "kanban"}, {Key: "↑/k", Desc: "up"}, {Key: "↓/j", Desc: "down"}, - {Key: "pgup", Desc: "page up"}, - {Key: "pgdn", Desc: "page down"}, {Key: "a", Desc: "add issue"}, {Key: "c", Desc: "add comment"}, {Key: "x", Desc: "delete issue"}, - {Key: "S", Desc: "submit"}, {Key: "e", Desc: "edit title"}, {Key: "d", Desc: "edit description"}, {Key: "s", Desc: "change status"}, @@ -246,13 +234,10 @@ func helpBarConfig(view ViewKind) HelpBarConfig { {Key: "e/d/s/p/t/A", Desc: "edit"}, {Key: "x", Desc: "delete"}, {Key: "q", Desc: "quit"}, - {Key: "S", Desc: "submit"}, {Key: "?", Desc: "help"}, }, FullItems: []HelpItem{ {Key: "v", Desc: "list view"}, - {Key: "enter", Desc: "view issue"}, - {Key: "b", Desc: "back to list"}, {Key: "h/l", Desc: "switch column"}, {Key: "←/→", Desc: "move issue"}, {Key: "↑/k", Desc: "up"}, @@ -261,7 +246,6 @@ func helpBarConfig(view ViewKind) HelpBarConfig { {Key: "pgdn", Desc: "page down"}, {Key: "a", Desc: "add issue"}, {Key: "x", Desc: "delete issue"}, - {Key: "S", Desc: "submit"}, {Key: "e", Desc: "edit title"}, {Key: "d", Desc: "edit description"}, {Key: "s", Desc: "change status"},