Sfoglia il codice sorgente

Added some stylized comments to visually break up tui code

arianagiroux 3 settimane fa
parent
commit
dcc84133c7
1 ha cambiato i file con 12 aggiunte e 0 eliminazioni
  1. 12 0
      tui.go

+ 12 - 0
tui.go

@@ -16,6 +16,9 @@ import (
 	"github.com/charmbracelet/lipgloss"
 )
 
+// Type and Style definitions -------------------------------------------------
+// ----------------------------------------------------------------------------
+
 // [lipgloss] style definitions, stores the currently displayed "widget"
 var (
 	titleStyle = lipgloss.NewStyle().
@@ -62,6 +65,9 @@ type Model struct {
 	// viewport viewport.Model
 }
 
+// Main model definitions -----------------------------------------------------
+// ----------------------------------------------------------------------------
+
 // The bubbletea init function
 func (m Model) Init() tea.Cmd { return m.load }
 
@@ -150,6 +156,9 @@ func (m Model) View() string {
 	return output
 }
 
+// Create widget definitions --------------------------------------------------
+// ----------------------------------------------------------------------------
+
 type issueCreate struct {
 	focusedField int
 	inputs       []textinput.Model
@@ -195,6 +204,9 @@ func (c issueCreate) update(msg tea.Msg) (issueCreate, tea.Cmd) {
 
 func (c issueCreate) view() tea.Msg { return "testing" }
 
+// tea.Cmd definitions --------------------------------------------------------
+// ----------------------------------------------------------------------------
+
 // Handles load logic
 func (m Model) load() tea.Msg {
 	if IsIssue(m.Path) {