Skip to content

Commit bbfd291

Browse files
authored
Merge pull request #82 from 0xjuanma/refactor/ui
refactor[ui]: consolidate rendering design in views
2 parents 27493af + dfa08c8 commit bbfd291

File tree

6 files changed

+623
-1196
lines changed

6 files changed

+623
-1196
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Changed
1313
- **Smart Update Detection** - The `--update` command now automatically detects whether golazo was installed via Homebrew or install script and uses the appropriate update method
14+
- **Unified Match Details Rendering** - Consolidated live and finished match views into a single rendering system with consistent styling
1415

1516
### Fixed
17+
- **Finished Matches Hints** - Fixed missing keyboard hints in finished matches view and added tab focus indicator
1618

1719
## [0.16.0] - 2026-01-22
1820

internal/app/model.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
"github.com/0xjuanma/golazo/internal/notify"
1515
"github.com/0xjuanma/golazo/internal/reddit"
1616
"github.com/0xjuanma/golazo/internal/ui"
17+
"github.com/charmbracelet/bubbles/key"
1718
"github.com/charmbracelet/bubbles/list"
1819
"github.com/charmbracelet/bubbles/spinner"
1920
"github.com/charmbracelet/bubbles/viewport"
@@ -153,6 +154,11 @@ func New(useMockData bool, debugMode bool, isDevBuild bool, newVersionAvailable
153154
statsList.Styles.FilterCursor = filterCursorStyle
154155
statsList.FilterInput.PromptStyle = filterPromptStyle
155156
statsList.FilterInput.Cursor.Style = filterCursorStyle
157+
statsList.AdditionalShortHelpKeys = func() []key.Binding {
158+
return []key.Binding{
159+
key.NewBinding(key.WithKeys("tab"), key.WithHelp("tab", "focus")),
160+
}
161+
}
156162

157163
// Initialize viewport for scrollable match details in stats view
158164
statsDetailsViewport := viewport.New(80, 20) // Will be resized dynamically

internal/app/view.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,18 +95,19 @@ func (m *model) ensureStatsListSize() {
9595
}
9696

9797
const (
98-
frameH = 2
99-
frameV = 2
100-
titleHeight = 3
101-
spinnerHeight = 3
98+
frameH = 2
99+
frameV = 2
100+
titleHeight = 3
101+
spinnerHeight = 3
102+
headerHeight = 2 // "Match List" header + spacing
103+
selectorHeight = 2 // Date selector + spacing
102104
)
103105

104106
leftWidth := max(m.width*40/100, 30)
105107
availableWidth := leftWidth - frameH*2
106-
availableHeight := m.height - frameV*2 - titleHeight - spinnerHeight
108+
availableHeight := m.height - frameV*2 - titleHeight - spinnerHeight - headerHeight - selectorHeight
107109

108110
if availableWidth > 0 && availableHeight > 0 {
109-
// Upcoming matches are now shown in Live view, so give full height to finished list
110111
m.statsMatchesList.SetSize(availableWidth, availableHeight)
111112
}
112113
}

0 commit comments

Comments
 (0)