Merge pull request #73 from LazyBachelor/LPM-138

LPM-138 Refactor Tui with composable modals and use canvas

Refactors the TUI (dashboard + kanban) to use a shared, composable modal system with canvas-based overlay rendering, while consolidating styling into internal/style and expanding issue interactions (e.g., comments).

Changes:

Introduces a new pkg/tui/modal system (manager/stack + multiple modal types) and overlays modals using Lipgloss compositor layers.
Refactors dashboard/kanban views and input handling to use the modal manager + focus manager instead of per-modal boolean state.
Consolidates TUI styling by moving from pkg/tui/styles to internal/style and updates components to use the new style package; adds a shared footer renderer.
This commit is contained in:
Robin Olsen
2026-03-20 08:28:10 -07:00
committed by GitHub
parent 9a47acc49a
commit 7facfb6afe
27 changed files with 2469 additions and 1752 deletions

View File

@@ -4,7 +4,7 @@ import (
"strings"
"charm.land/lipgloss/v2"
"github.com/LazyBachelor/LazyPM/pkg/tui/styles"
"github.com/LazyBachelor/LazyPM/internal/style"
)
type ViewKind int
@@ -66,7 +66,7 @@ func (h HelpBar) shortHelp() string {
for _, item := range h.config.ShortItems {
items = append(
items,
styles.HighlightKey(item.Key)+item.Desc+" ",
style.HighlightKey(item.Key)+item.Desc+" ",
)
}
@@ -74,7 +74,7 @@ func (h HelpBar) shortHelp() string {
return lipgloss.NewStyle().
Border(lipgloss.Border{Top: "─"}, true, false, false, false).
BorderForeground(styles.SecondaryBorder).
BorderForeground(style.SecondaryBorder).
Padding(0, 1).
Width(h.width).
Render(content)
@@ -91,7 +91,7 @@ func (h HelpBar) fullHelp() string {
renderItem := func(item HelpItem) string {
return cellStyle.Render(
keyStyle.Render(styles.HighlightKey(item.Key)) + " " + descStyle.Render(item.Desc),
keyStyle.Render(style.HighlightKey(item.Key)) + " " + descStyle.Render(item.Desc),
)
}
@@ -115,7 +115,7 @@ func (h HelpBar) fullHelp() string {
content := lipgloss.JoinVertical(lipgloss.Left, result...)
return lipgloss.NewStyle().
Border(lipgloss.Border{Top: "─"}, true, false, false, false).
BorderForeground(styles.SecondaryBorder).
BorderForeground(style.SecondaryBorder).
Padding(0, 1).
Width(h.width).
Render(content)