From aa9de18c9977111ea9b2b5749f7c82e6a7232f3c Mon Sep 17 00:00:00 2001 From: Robin Olsen Date: Fri, 20 Mar 2026 10:49:44 +0100 Subject: [PATCH] comment out closed issues list, will find a better way to show closed issues --- pkg/tui/views/dashboard/view.go | 35 ++++++++++++++++----------------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/pkg/tui/views/dashboard/view.go b/pkg/tui/views/dashboard/view.go index 569cff7..539b91e 100644 --- a/pkg/tui/views/dashboard/view.go +++ b/pkg/tui/views/dashboard/view.go @@ -1,7 +1,7 @@ package dashboard import ( - "charm.land/bubbletea/v2" + tea "charm.land/bubbletea/v2" "charm.land/lipgloss/v2" "github.com/LazyBachelor/LazyPM/pkg/tui/components" "github.com/LazyBachelor/LazyPM/pkg/tui/styles" @@ -24,21 +24,18 @@ func (m *Model) View() tea.View { // To avoid layer overflow or clipping, the label heights are calculated and subtracted from the available height before calculating the list heights to avoid layout overflow or clipping. contentHeight := m.height - headerHeight - footerHeight - mainLabel := styles.LabelStyle.Render("Display issues") - closedLabel := styles.LabelStyle.Render("Closed issues") - labelHeight := lipgloss.Height(mainLabel) + lipgloss.Height(closedLabel) - availableForLists := contentHeight - labelHeight - halfHeight := availableForLists / 2 - if halfHeight < 1 { - halfHeight = 1 - } + //mainLabel := styles.LabelStyle.Render("Display issues") + //closedLabel := styles.LabelStyle.Render("Closed issues") + //labelHeight := lipgloss.Height(mainLabel) + lipgloss.Height(closedLabel) + availableForLists := contentHeight + halfHeight := max(availableForLists / 2, 1) totalContentWidth := m.width - 1 listWidth := totalContentWidth * styles.ListViewRatio / 100 detailWidth := totalContentWidth - listWidth m.issueList.SetSize(listWidth, halfHeight) - m.closedIssueList.SetSize(listWidth, halfHeight) + //m.closedIssueList.SetSize(listWidth, halfHeight) m.issueDetail.SetSize(detailWidth, contentHeight) // Only highlight the focused list; unfocused list should not show selection highlight. @@ -46,17 +43,19 @@ func (m *Model) View() tea.View { m.closedIssueList.SetHighlightSelected(m.focusedWindow == 1 && m.focusedPaneClosed == 0) listView := m.issueList.View() - closedListView := m.closedIssueList.View() + //closedListView := m.closedIssueList.View() detailView := m.issueDetail.View() - if m.focusedWindow == 0 { - mainLabel = lipgloss.NewStyle().Foreground(styles.Primary).Bold(true).Render("Display issues ▶") - } else { - closedLabel = lipgloss.NewStyle().Foreground(styles.Primary).Bold(true).Render("Closed issues ▶") - } + //if m.focusedWindow == 0 { + // mainLabel = lipgloss.NewStyle().Foreground(styles.Primary).Bold(true).Render("Display issues ▶") + //} else { + // closedLabel = lipgloss.NewStyle().Foreground(styles.Primary).Bold(true).Render("Closed issues ▶") + //} + leftColumn := lipgloss.JoinVertical(lipgloss.Left, - mainLabel, listView, - closedLabel, closedListView, + //mainLabel, + listView, + //closedLabel, closedListView, ) content := lipgloss.JoinHorizontal(lipgloss.Left, leftColumn, detailView)