tui

package
v0.0.0-...-01e3f2b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderCard

func RenderCard(iss *issue.Issue, width int, selected bool) string

RenderCard renders an issue as a card for the board.

Types

type Column

type Column struct {
	Status string
	Issues []*issue.Issue
	Cursor int
	Offset int // scroll offset for windowing
}

Column represents a status column on the board.

func NewColumn

func NewColumn(status string) *Column

NewColumn creates a column for the given status.

func (*Column) Add

func (c *Column) Add(iss *issue.Issue)

Add adds an issue to the column in sorted position.

func (*Column) CursorDown

func (c *Column) CursorDown()

CursorDown moves the cursor down.

func (*Column) CursorUp

func (c *Column) CursorUp()

CursorUp moves the cursor up.

func (*Column) Remove

func (c *Column) Remove(id int) *issue.Issue

Remove removes an issue by ID and returns it. Returns nil if not found.

func (*Column) Render

func (c *Column) Render(width, height int, active bool) string

Render renders the column with the given dimensions.

func (*Column) Selected

func (c *Column) Selected() *issue.Issue

Selected returns the currently selected issue, or nil if empty.

type FilterFunc

type FilterFunc func(*issue.Issue) bool

FilterFunc is a predicate for filtering issues in the board.

type KeyMap

type KeyMap struct {
	Left      key.Binding
	Right     key.Binding
	Up        key.Binding
	Down      key.Binding
	MoveLeft  key.Binding
	MoveRight key.Binding
	Enter     key.Binding
	Escape    key.Binding
	Quit      key.Binding
}

KeyMap defines the key bindings for the board.

func DefaultKeyMap

func DefaultKeyMap() KeyMap

DefaultKeyMap returns the default key bindings.

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model is the main bubbletea model for the board.

func NewModel

func NewModel(issues []*issue.Issue, issuesDir string, cfg *config.Config, filters ...FilterFunc) Model

NewModel creates a board model from the given issues.

func (Model) Init

func (m Model) Init() tea.Cmd

Init implements tea.Model.

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (Model) View

func (m Model) View() string

View implements tea.Model.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL