### Environment Setup Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Commands to set up the Go environment and install Bubble Tea and a bubble. ```bash # Install Go brew install go # macOS apt install golang-go # Linux # Create project mkdir my-tui-app cd my-tui-app go mod init github.com/user/my-tui-app # Add Bubble Tea go get github.com/charmbracelet/bubbletea # Add a bubble go get github.com/author/bubble-name # Run go run main.go ``` -------------------------------- ### Install the Bubble Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Install a bubble component using go get. ```bash go get github.com/author/bubble-name ``` -------------------------------- ### Subscription Example Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/bubble-tea-framework.md Example of a command that returns infinite message streams. ```go func tickEvery(d time.Duration) tea.Cmd { return tea.Tick(d, func(t time.Time) tea.Msg { return TickMsg{Time: t} }) } ``` -------------------------------- ### Test Init Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Example of testing the Init function of a model. ```go m := NewModel() cmd := m.Init() // Ensure cmd is not nil or handle properly ``` -------------------------------- ### Lipgloss Installation Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/ecosystem-and-dependencies.md Installs the Lipgloss library using go get. ```bash go get github.com/charmbracelet/lipgloss ``` -------------------------------- ### Bubble Tea Installation Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/ecosystem-and-dependencies.md Installs the Bubble Tea framework using go get. ```bash go get github.com/charmbracelet/bubbletea ``` -------------------------------- ### Debug Logging Setup Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/troubleshooting-and-best-practices.md Example of setting up a debug logger to log bubble operations to a file. ```go import "log" var debugLog *log.Logger func init() { f, _ := os.OpenFile("debug.log", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) debugLog = log.New(f, "", log.LstdFlags) } func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { debugLog.Printf("Update: %T, Model: %+v\n", msg, m) m.bubble, cmd := m.bubble.Update(msg) debugLog.Printf("After update: %+v\n", m) return m, cmd } ``` -------------------------------- ### Import Aliases Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Example of using import aliases for long import paths and their usage. ```go import ( tea "github.com/charmbracelet/bubbletea" lip "github.com/charmbracelet/lipgloss" pkt "github.com/erikgeiser/promptkit/textinput" ) // Usage: m := pkt.New() p := tea.NewProgram(m) style := lip.NewStyle() ``` -------------------------------- ### Log Messages Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Examples of logging messages and model state. ```go debugLog.Printf("Message type: %T\n", msg) debugLog.Printf("Model state: %+v\n", m) ``` -------------------------------- ### Go Module Example Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/configuration.md An example of a go.mod file for a bubble module. ```go module github.com/author/bubble-name go 1.21 require github.com/charmbracelet/bubbletea v0.24.0 ``` -------------------------------- ### Go Module Example Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/ecosystem-and-dependencies.md A basic example of a go.mod file. ```go module github.com/yourname/your-app go 1.21 require ( github.com/charmbracelet/bubbletea v0.24.0 github.com/author/bubble-name v1.0.0 ) ``` -------------------------------- ### Start Godoc Server Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/ecosystem-and-dependencies.md Command to start a local godoc server for viewing documentation. ```bash godoc -http=:6060 ``` -------------------------------- ### Unit Testing Example Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/ecosystem-and-dependencies.md A simple Go unit test example using the standard library. ```go import "testing" func TestBubble(t *testing.T) { m := New() if m == nil { t.Fatal("expected non-nil model") } } ``` -------------------------------- ### Official Bubbles Installation Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/ecosystem-and-dependencies.md Installs the official Bubbles components using go get. ```bash go get github.com/charmbracelet/bubbles ``` -------------------------------- ### Test Update Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Example of testing the Update function of a model. ```go m := NewModel() _, cmd := m.Update(tea.KeyMsg{Type: tea.KeyEnter}) // Check cmd result ``` -------------------------------- ### Test Message Handling Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Example of testing message handling in the Update function. ```go m := NewModel() m, _ = m.Update(CustomMsg{Data: "test"}) // Verify model changed correctly ``` -------------------------------- ### Command Execution Example Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/bubble-tea-framework.md Example of a command that executes side effects asynchronously. ```go func delayedCommand(delay time.Duration, msg tea.Msg) tea.Cmd { return func() tea.Msg { time.Sleep(delay) return msg } } // In Update: return m, delayedCommand(1*time.Second, MyEvent{Data: "done"}) ``` -------------------------------- ### Module Graph Example Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/ecosystem-and-dependencies.md An example illustrating Go's module graph and automatic deduplication of common dependencies. ```text your-app ├── github.com/charmbracelet/bubbletea │ ├── golang.org/x/text │ ├── golang.org/x/sys │ └── github.com/mattn/go-isatty ├── your-bubble-1 │ ├── github.com/charmbracelet/bubbletea (shared) │ ├── github.com/charmbracelet/lipgloss │ └── other dependencies └── your-bubble-2 ├── github.com/charmbracelet/bubbletea (shared) └── github.com/charmbracelet/lipgloss (shared) ``` -------------------------------- ### Example godoc Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/configuration.md An example of a godoc comment for a Go function. ```go // New creates a new bubble with default configuration. // It returns a Model ready for use in a Bubble Tea application. func New(initialValue string) Model { return &model{value: initialValue} } ``` -------------------------------- ### Comprehensive Test Suite Example Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/troubleshooting-and-best-practices.md An example of a comprehensive test suite for a model, demonstrating unit tests for initialization, update, and view functions. ```go // Comprehensive test suite func TestModel_NewModel(t *testing.T) { m := NewModel() if m == nil { t.Fatal("expected non-nil model") } } func TestModel_Init(t *testing.T) { m := NewModel() cmd := m.Init() // cmd may be nil, that's fine } func TestModel_Update(t *testing.T) { m := NewModel() _, cmd := m.Update(nil) if cmd == nil { t.Error("expected command") } } func TestModel_View(t *testing.T) { m := NewModel() view := m.View() if len(view) == 0 { t.Error("expected non-empty view") } } ``` -------------------------------- ### Colors Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Examples of using ANSI, named, and RGB colors with lipgloss. ```go // ANSI colors (0-255) lipgloss.Color("205") // Magenta lipgloss.Color("196") // Red lipgloss.Color("46") // Green // Named colors lipgloss.Color("red") lipgloss.Color("blue") // RGB (modern terminals) lipgloss.Color("#FF0000") // Red ``` -------------------------------- ### Test View Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Example of testing the View function of a model. ```go m := NewModel() view := m.View() // Assert view contains expected text ``` -------------------------------- ### Add to Your Application Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Add a bubble component to your application by importing and initializing it. ```go import "github.com/author/bubble-name" type Model struct { myBubble bubble.Model } func (m Model) Init() tea.Cmd { return m.myBubble.Init() } func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { var cmd tea.Cmd m.myBubble, cmd = m.myBubble.Update(msg) return m, cmd } func (m Model) View() string { return m.myBubble.View() } ``` -------------------------------- ### Cross-Compilation Examples Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/ecosystem-and-dependencies.md Commands for cross-compiling Go applications for different operating systems and architectures. ```bash # macOS GOOS=darwin GOARCH=amd64 go build # Linux GOOS=linux GOARCH=amd64 go build # Windows GOOS=windows GOARCH=amd64 go build # Raspberry Pi GOOS=linux GOARCH=arm64 go build ``` -------------------------------- ### Spacing Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Apply padding (inside) and margin (outside) to styles. ```go style.Padding(vertical, horizontal) // Inside style.Margin(vertical, horizontal) // Outside ``` -------------------------------- ### Alphabetical Ordering Example Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/registry-structure.md An example of how entries are alphabetically ordered by author GitHub handle. ```markdown * [76creates/stickers] * [calyptia/go-bubble-table] * [daltonsw/bubbleup] * [ethanefung/bubble-datepicker] * [erikgeiser/promptkit] * [evertras/bubble-table] * [genekkion/bubblegum] * [kevm/bubbleo] * [knipferrc/teacup] * [marcelblijleven/bubbles-hlist] * [mritd/bubbles] * [rmhubbert/bubbletea-overlay] * [treilik/bubbleboxer] * [treilik/bubblelister] ``` -------------------------------- ### VHS Recording Example Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/configuration.md Commands to create a terminal recording using VHS. ```bash # Create a .tape file describing the recording # Record the terminal session vhs < recording.tape > demo.gif ``` -------------------------------- ### Batch Commands Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/bubble-tea-framework.md Combine multiple commands. ```go import "github.com/charmbracelet/bubbletea" func (m Model) Init() bubbletea.Cmd { return tea.Batch( m.bubble1.Init(), m.bubble2.Init(), ) } ``` -------------------------------- ### Example Deprecation Entry Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/configuration.md An example of how a deprecated bubble might be listed in the registry. ```markdown * [author/bubble-old](https://github.com/author/bubble-old) [ARCHIVED]: Historic bubble component, no longer maintained. ``` -------------------------------- ### Create a Style Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Create a custom lipgloss style with bold text, specific color, and padding. ```go style := lipgloss.NewStyle(). Bold(true). Foreground(lipgloss.Color("205")). Padding(1, 2) text := style.Render("Hello") ``` -------------------------------- ### Extracting State from Bubbles (Query Methods) Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/bubble-tea-framework.md Provides examples of query methods to retrieve the current state from a bubble component. ```go func (m *Model) Value() string { return m.value } func (m *Model) Selected() int { return m.selectedIndex } func (m *Model) Err() error { return m.err } ``` -------------------------------- ### Example Program for Discovery Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/discovering-bubble-apis.md A basic Go program demonstrating how to instantiate, run, and inspect the state of a bubble. ```go package main import ( "fmt" "log" "github.com/charmbracelet/bubbletea" "github.com/author/bubble-name" ) func main() { m := bubble.New() p := tea.NewProgram(m) model, err := p.Run() if err != nil { log.Fatal(err) } // After exit, inspect state if finalModel, ok := model.(bubble.Model); ok { fmt.Println("Final value:", finalModel.Value()) } } ``` -------------------------------- ### Initialize Bubble Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Initializes a new bubble model, with and without options. ```go m := bubble.New() // or with options m := bubble.New( bubble.WithOption1(value1), bubble.WithOption2(value2), ) ``` -------------------------------- ### Batch Commands Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Execute multiple commands concurrently. ```go return m, tea.Batch(cmd1, cmd2, cmd3) ``` -------------------------------- ### Styling with Lipgloss Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/bubble-tea-framework.md Demonstrates how to use the Lipgloss library to style text within a bubble component. ```go import "github.com/charmbracelet/lipgloss" func (m Model) View() string { style := lipgloss.NewStyle(). Bold(true). Foreground(lipgloss.Color("205")) return style.Render("Styled text") } ``` -------------------------------- ### Freeze Screenshot Example Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/configuration.md Command to capture a static screenshot using Freeze. ```bash freeze --output screenshot.png ``` -------------------------------- ### Configuration Struct Pattern Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/discovering-bubble-apis.md Example of using a configuration struct for bubble initialization. ```go // In your code: config := bubble.Config{ InitialValue: "text", MaxLength: 100, } m := bubble.NewWithConfig(config) ``` -------------------------------- ### Update() Message Handling Example Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/discovering-bubble-apis.md Example of inspecting message types within the Update() method. ```go // If Update accepts a particular message type m.Update(tea.KeyMsg{...}) // Handles keyboard m.Update(tea.MouseMsg{...}) // Handles mouse m.Update(CustomMsg{...}) // Handles custom events // Check README to see which messages are expected ``` -------------------------------- ### Vim/Neovim LSP Configuration Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/ecosystem-and-dependencies.md Vim/Neovim configuration using vim-plug to install LSP support and the Go extension. ```vim " gopls for language server Plug 'neovim/nvim-lspconfig' Plug 'golang/vscode-go' ``` -------------------------------- ### Exit Application Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Quit the application when Ctrl+C is pressed. ```go case tea.KeyMsg: if msg.String() == "ctrl+c" { return m, tea.Quit } ``` -------------------------------- ### Check Go Version Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/ecosystem-and-dependencies.md Command to check the currently installed Go version. ```bash go version ``` -------------------------------- ### Send Command Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Send a custom command from the Update function. ```go return m, func() tea.Msg { return MyMsg{Data: "value"} } ``` -------------------------------- ### Borders Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Add borders to styles with different types and colors. ```go style.Border(lipgloss.RoundBorder()) style.Border(lipgloss.ThickBorder()) style.Border(lipgloss.DoubleBorder()) style.BorderForeground(lipgloss.Color("63")) ``` -------------------------------- ### Message Filtering Example Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/discovering-bubble-apis.md Example demonstrating how to check if a bubble is focused and handles input, or if the message should be passed to other handlers. ```go // If bubble is focused, it handles keys if m.bubble.Focused() { m.bubble, cmd = m.bubble.Update(msg) } else { // Bubble ignored this, pass to other handlers } ``` -------------------------------- ### Handle Resize Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Update bubble dimensions when the terminal window is resized. ```go case tea.WindowSizeMsg: m.width = msg.Width m.height = msg.Height if setter, ok := m.bubble.(interface{ SetSize(int, int) }); ok { setter.SetSize(m.width, m.height) } ``` -------------------------------- ### Focus Management Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/bubble-tea-framework.md Shows how to implement focus and blur states for interactive bubble components. ```go type Model struct { focused bool // ... } func (m *Model) Focus() tea.Cmd { m.focused = true return nil } func (m *Model) Blur() { m.focused = false } func (m Model) View() string { if m.focused { return m.focusedStyle.Render(m.content) } return m.blurredStyle.Render(m.content) } ``` -------------------------------- ### Nil Pointer Access Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/troubleshooting-and-best-practices.md Shows an example of incorrect nil pointer access and the correct way to initialize or check for nil. ```go // Wrong: don't check for nil func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { m.data.Value = "something" // Crashes if m.data is nil } // Correct: initialize or check func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { if m.data == nil { m.data = &Data{} } m.data.Value = "something" } ``` -------------------------------- ### Passing State to Bubbles (Options Pattern) Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/bubble-tea-framework.md Demonstrates the recommended options pattern for initializing bubble components with specific states. ```go func New(opts ...Option) *Model { m := &Model{defaultValue: true} for _, opt := range opts { opt(m) } return m } type Option func(*Model) func WithInitialValue(v string) Option { return func(m *Model) { m.initialValue = v } } ``` -------------------------------- ### tea.KeyMsg Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/bubble-tea-framework.md Represents keyboard input. ```go type KeyMsg struct { Type KeyType // key.Runes, key.Up, key.Down, etc. Rune rune // The actual character (if Type == Runes) Alt bool // Alt modifier pressed } ``` -------------------------------- ### Create Custom Message Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Define and use custom messages for application-specific events. ```go type MyMsg struct { Data string } // In Update: case MyMsg: m.data = msg.Data ``` -------------------------------- ### Semantic Versioning Example Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/discovering-bubble-apis.md Explanation of semantic versioning (Major.Minor.Patch) for bubbles. ```text v1.2.3 │ │ └─ Patch (bug fixes, safe to update) │ └─── Minor (new features, backwards compatible) └───── Major (breaking changes) ``` -------------------------------- ### Update Multiple Bubbles Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Updates multiple bubbles and batches their commands. ```go var cmds []tea.Cmd m.bubble1, cmd = m.bubble1.Update(msg) cmds = append(cmds, cmd) m.bubble2, cmd = m.bubble2.Update(msg) cmds = append(cmds, cmd) return m, tea.Batch(cmds...) ``` -------------------------------- ### Print Model State Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Prints the model state to stderr. ```go fmt.Fprintf(os.Stderr, "State: %#v\n", m) ``` -------------------------------- ### Button/Menu Styling Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/styling-and-theming.md Example of styling focused and unfocused options for buttons and menus. ```go focusedOption := lipgloss.NewStyle(). Foreground(lipgloss.Color("205")), Background(lipgloss.Color("235")), Padding(0, 2), Margin(0, 1) unfocusedOption := lipgloss.NewStyle(). Foreground(lipgloss.Color("240")), Padding(0, 2), Margin(0, 1) // Apply styling in View() method: func (m Model) View() string { var options []string for i, opt := range m.options { if i == m.selected { options = append(options, focusedOption.Render(opt)) } else { options = append(options, unfocusedOption.Render(opt)) } } return lipgloss.JoinVertical(lipgloss.Left, options...) } ``` -------------------------------- ### List/Table Styling Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/styling-and-theming.md Example of how to style selected rows and headers for lists and tables. ```go // Selected row style selectedRowStyle := lipgloss.NewStyle(). Foreground(lipgloss.Color("255")), Background(lipgloss.Color("63")), Bold(true) // Header style headerStyle := lipgloss.NewStyle(). Foreground(lipgloss.Color("205")), Bold(true). Underline(true) // Apply to bubble (check documentation for exact property names) m.SelectedRowStyle = selectedRowStyle m.HeaderStyle = headerStyle ``` -------------------------------- ### Common Styles Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Predefined styles for focused, blurred, error, and success states. ```go // Focused (bright, bold) focusedStyle := lipgloss.NewStyle(). Bold(true). Foreground(lipgloss.Color("205")) // Blurred (dim) blurredStyle := lipgloss.NewStyle(). Foreground(lipgloss.Color("240")) // Error (red) errorStyle := lipgloss.NewStyle(). Foreground(lipgloss.Color("196")) // Success (green) successStyle := lipgloss.NewStyle(). Foreground(lipgloss.Color("46")) ``` -------------------------------- ### Input Bubble Styling Example Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/styling-and-theming.md Shows how to customize the appearance of an input bubble, including focused, blurred, and prompt styles, and input validation. ```go // Check bubble documentation for styling options // Common patterns: m := textinput.New() m.FocusedStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color("205")), Bold(true) m.BlurredStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color("240")) m.PromptStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color("63")) // Validate input with styling m.ValidateFunc = func(s string) error { if len(s) < 3 { // Return error with styled message return fmt.Errorf("minimum 3 characters") } return nil } ``` -------------------------------- ### tea.WindowSizeMsg Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/bubble-tea-framework.md Represents terminal resize events. ```go type WindowSizeMsg struct { Width int Height int } ``` -------------------------------- ### Highlighting Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/styling-and-theming.md Example of a utility function to highlight a keyword within text using a specified style. ```go import "strings" func highlightText(text, keyword string, highlightStyle lipgloss.Style) string { return strings.ReplaceAll( text, keyword, highlightStyle.Render(keyword), ) } // Usage highlighted := highlightText( m.bubble.View(), "important", lipgloss.NewStyle().Background(lipgloss.Color("226")), ) ``` -------------------------------- ### Width-Aware Styling Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/styling-and-theming.md Example of adjusting padding based on terminal width to create responsive styles. ```go func (m Model) View() string { width := m.width var padding int if width > 120 { padding = 4 } else if width > 80 { padding = 2 } else { padding = 1 } style := lipgloss.NewStyle().Padding(0, padding) return style.Render(m.bubble.View()) } ``` -------------------------------- ### Verbose Mode Logging Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/troubleshooting-and-best-practices.md Example of implementing a verbose mode flag to print detailed update and state information to stderr. ```go type Model struct { verbose bool } func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { if m.verbose { fmt.Fprintf(os.Stderr, "[UPDATE] %T\n", msg) } m.bubble, _ = m.bubble.Update(msg) if m.verbose { fmt.Fprintf(os.Stderr, "[STATE] %+v\n", m) } return m, nil } ``` -------------------------------- ### Handle All Message Types Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/troubleshooting-and-best-practices.md Example of a complete Update function that handles various message types including custom messages and provides a default case for unknown messages. ```go // Complete handler func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg := msg.(type) { case tea.KeyMsg: return m.handleKeyPress(msg) case tea.MouseMsg: return m.handleMouse(msg) case tea.WindowSizeMsg: return m.handleResize(msg) case CustomMsg: return m.handleCustom(msg) default: // Unknown message - don't crash return m, nil } } ``` -------------------------------- ### Using Global Theme in Bubbles Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/styling-and-theming.md Example of how to use the globally defined theme styles within a bubble's View method. ```go func (m Model) View() string { if m.focused { return theme.FocusedButton.Render("Select") } return theme.BlurredButton.Render("Select") } ``` -------------------------------- ### Responsive Borders Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/styling-and-theming.md Example of conditionally applying borders and padding based on terminal width for responsive design. ```go func (m Model) View() string { style := lipgloss.NewStyle() if m.width > 100 { style = style.Border(lipgloss.RoundBorder()) style = style.Padding(1) } return style.Render(m.bubble.View()) } ``` -------------------------------- ### Visual Debug Overlay Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/troubleshooting-and-best-practices.md Example of rendering debug information directly in the UI when a debug mode is enabled. ```go func (m Model) View() string { view := m.bubble.View() if m.debugMode { debugInfo := lipgloss.NewStyle(). Foreground(lipgloss.Color("242")), Render(fmt.Sprintf( "DEBUG: %T | Focused: %v | Size: %dx%d", m.bubble, m.focused, m.width, m.height, )) return lipgloss.JoinVertical( lipgloss.Top, view, debugInfo, ) } return view } ``` -------------------------------- ### Get Input Value Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Retrieve the current value from an input bubble. ```go value := m.inputBubble.Value() ``` -------------------------------- ### Message Type Logging Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/troubleshooting-and-best-practices.md Example of logging different message types (KeyMsg, MouseMsg, WindowSizeMsg, etc.) for debugging purposes. ```go type DebugMsg struct { Type string Data interface{} } func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { // Log to debug file switch msg := msg.(type) { case tea.KeyMsg: debugLog.Printf("Key: %v\n", msg.String()) case tea.MouseMsg: debugLog.Printf("Mouse: %d,%d\n", msg.X, msg.Y) case tea.WindowSizeMsg: debugLog.Printf("Size: %dx%d\n", msg.Width, msg.Height) default: debugLog.Printf("Other: %T\n", msg) } m.bubble, _ = m.bubble.Update(msg) return m, nil } ``` -------------------------------- ### Style Components Consistently Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/README.md Example of defining styles for components using lipgloss. ```go var FocusedStyle = lipgloss.NewStyle().Bold(true) var BlurredStyle = lipgloss.NewStyle().Foreground(color) ``` -------------------------------- ### Testing Pattern Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/integration-patterns.md Provides basic examples for testing bubble integration, covering initialization, update, and view methods. ```go import "testing" func TestAppInit(t *testing.T) { app := NewApp() cmd := app.Init() if cmd == nil { t.Error("expected Init to return command") } } func TestAppUpdate(t *testing.T) { app := NewApp() msg := tea.KeyMsg{Type: tea.KeyEnter} newApp, cmd := app.Update(msg) if newApp == nil { t.Error("expected Update to return model") } } func TestAppView(t *testing.T) { app := NewApp() view := app.View() if view == "" { t.Error("expected non-empty view") } } ``` -------------------------------- ### Basic Structure Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/bubble-tea-framework.md Basic structure for integrating a bubble into an application. ```go package main import ( "github.com/charmbracelet/bubbletea" "github.com/author/bubble-name" ) type Model struct { myBubble bubble.Model // other application state } func (m Model) Init() bubbletea.Cmd { return m.myBubble.Init() } func (m Model) Update(msg bubbletea.Msg) (bubbletea.Model, bubbletea.Cmd) { var cmd bubbletea.Cmd m.myBubble, cmd = m.myBubble.Update(msg) return m, cmd } func (m Model) View() string { return m.myBubble.View() } ``` -------------------------------- ### Profile Your Application Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/troubleshooting-and-best-practices.md Use Go's built-in profiling tools to identify performance bottlenecks in your application. ```bash # Run with profiling go run -cpuprofile=cpu.prof main.go # Analyze go tool pprof cpu.prof ``` -------------------------------- ### Functional Options Pattern Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/discovering-bubble-apis.md Example of using the functional options pattern for bubble configuration. ```go // In your code: m := bubble.New( bubble.WithInitialValue("text"), bubble.WithMaxLength(100), bubble.WithStyle(myStyle), ) ``` -------------------------------- ### Get Selected Item from List Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Retrieve the selected value and its index from a list bubble. ```go selected := m.listBubble.SelectedValue() index := m.listBubble.SelectedIndex() ``` -------------------------------- ### Status Indicators Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/styling-and-theming.md Example of showing bubble state with different status indicators and styles. ```go func (m Model) View() string { var status string var statusStyle lipgloss.Style switch m.state { case StateLoading: status = "⏳ Loading..." statusStyle = theme.WarningStyle case StateSuccess: status = "✓ Complete" statusStyle = theme.SuccessStyle case StateError: status = "✗ Error" statusStyle = theme.ErrorStyle } return statusStyle.Render(status) } ``` -------------------------------- ### Check Terminal Dimensions Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/troubleshooting-and-best-practices.md Example of checking terminal dimensions in the Update function and quitting if too small. ```go // Check dimensions func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { if resize, ok := msg.(tea.WindowSizeMsg); ok { if resize.Width < 40 { return m, tea.Quit } m.width = resize.Width m.height = resize.Height } return m, nil } ``` -------------------------------- ### Add Debugging for Message Flow Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/troubleshooting-and-best-practices.md Example of adding debugging to print incoming messages to stderr. ```go // Add debugging func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { fmt.Fprintf(os.Stderr, "Message: %T\n", msg) m.bubble, _ = m.bubble.Update(msg) return m, nil } ``` -------------------------------- ### Bubble Composition Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/bubble-tea-framework.md Illustrates how to compose multiple bubble components into a single container, managing their updates and views. ```go type Container struct { header header.Model content content.Model footer footer.Model } func (m Container) Update(msg tea.Msg) (tea.Model, tea.Cmd) { var cmd tea.Cmd var cmds []tea.Cmd m.header, cmd = m.header.Update(msg) cmds = append(cmds, cmd) m.content, cmd = m.content.Update(msg) cmds = append(cmds, cmd) m.footer, cmd = m.footer.Update(msg) cmds = append(cmds, cmd) return m, tea.Batch(cmds...) } func (m Container) View() string { return lipgloss.JoinVertical( lipgloss.Top, m.header.View(), m.content.View(), m.footer.View(), ) } ``` -------------------------------- ### Ensure Bubble is Focused Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/troubleshooting-and-best-practices.md Example of how to ensure a bubble component is focused and visually indicate focus. ```go // Ensure bubble is focused if !m.bubble.Focused() { m.bubble.Focus() } // In View, show visual indicator of focus if m.bubble.Focused() { return focusedStyle.Render(m.bubble.View()) } ``` -------------------------------- ### Return Commands Properly Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/troubleshooting-and-best-practices.md Shows the correct way to handle and return a command generated by a bubble's Update method. ```go // Wrong: ignoring returned command m.bubble, _ = m.bubble.Update(msg) // Correct: use returned command var cmd tea.Cmd m.bubble, cmd = m.bubble.Update(msg) return m, cmd ``` -------------------------------- ### Example Parsed Entry Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/registry-structure.md An example of a bubble entry and how it parses. ```text [76creates/stickers](https://github.com/76creates/stickers): Responsive flexbox and table components. Parses as: - Author: `76creates` - Project: `stickers` - URL: `https://github.com/76creates/stickers` - Description: `Responsive flexbox and table components.` ``` -------------------------------- ### Set Up a New Project Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/README.md Commands to initialize a new Bubble Tea project. ```bash mkdir my-tui-app cd my-tui-app go mod init github.com/user/my-tui-app go get github.com/charmbracelet/bubbletea go get github.com/author/bubble-name ``` -------------------------------- ### Derived Metadata Example Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/registry-structure.md Example of deriving metadata from a repository URL. ```markdown | Metadata | Derivation | Example | |----------|-----------|---------| | Go Module Path | Remove `https://` prefix | `github.com/76creates/stickers` | | Import Path | Go module path | `github.com/76creates/stickers` | | Web URL | Add `/blob/main/README.md` | `.../blob/main/README.md` | ``` -------------------------------- ### Per-Bubble Metadata Extraction Example Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/registry-structure.md Example of extracting metadata from a markdown entry. ```markdown | Metadata | Source | Example | |----------|--------|---------| | Author | Before `/` in `[...]` | `76creates` | | Project | After `/` in `[...]` | `stickers` | | Repository URL | In `(...)` | `https://github.com/76creates/stickers` | | Description | After `): ` | `Responsive flexbox and table components.` | ``` -------------------------------- ### Testing Bubble Components Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/bubble-tea-framework.md Shows a typical testing pattern for bubble components, including updating state and verifying the view. ```go func TestUpdate(t *testing.T) { m := New() // Simulate input m, _ = m.Update(tea.KeyMsg{Type: tea.KeyEnter}) // Check state assert.Equal(t, "expected", m.Value()) } func TestView(t *testing.T) { m := New() view := m.View() // Verify output contains expected text assert.Contains(t, view, "expected text") } ``` -------------------------------- ### Use Batch for Multiple Commands Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/troubleshooting-and-best-practices.md Illustrates how to use `tea.Batch` to execute multiple commands simultaneously, as opposed to only the first one executing. ```go // Wrong: only first command executes return m, cmd1 return m, cmd2 // Correct: batch them return m, tea.Batch(cmd1, cmd2, cmd3) ``` -------------------------------- ### Configuration Constructor Pattern Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/configuration.md A recommended pattern for providing a flexible constructor function for bubble initialization. ```go func New(opts ...Option) Model { // Implementation } type Option func(*model) ``` -------------------------------- ### Custom Messages Example Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/discovering-bubble-apis.md Example of handling custom messages like SubmitMsg and CancelMsg in an Update function. ```go // In your Update function case bubbles.SubmitMsg: value := msg.Value // Handle submission case bubbles.CancelMsg: // Handle cancellation ``` -------------------------------- ### Handle Resize Properly Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/troubleshooting-and-best-practices.md Always respond to WindowSizeMsg to update the model's dimensions and inform child components that support sizing. ```go // Always respond to WindowSizeMsg func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { if resize, ok := msg.(tea.WindowSizeMsg); ok { m.width = resize.Width m.height = resize.Height // Update bubble if it has sizing support if setter, ok := m.bubble.(Sizer); ok { setter.SetSize(m.width, m.height) } } return m, nil } ``` -------------------------------- ### Correct Sizing in Join Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/troubleshooting-and-best-practices.md Demonstrates the incorrect and correct way to use lipgloss.JoinHorizontal with fixed widths. ```go // Wrong: lipgloss.JoinHorizontal( lipgloss.Top, m.sidebar.View(), m.main.View(), ) // Correct: lipgloss.JoinHorizontal( lipgloss.Top, lipgloss.NewStyle().Width(20).Render(m.sidebar.View()), lipgloss.NewStyle().Width(m.width - 20).Render(m.main.View()), ) ``` -------------------------------- ### Optional Testing Tools Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/ecosystem-and-dependencies.md Commands for running advanced Go tests like coverage, benchmarks, and race detection. ```bash # Code coverage go test -cover ./... # Benchmark go test -bench=. # Race detection go test -race ./... ``` -------------------------------- ### tea.MouseMsg Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/bubble-tea-framework.md Represents mouse input. ```go type MouseMsg struct { X int // Column position Y int // Row position Type MouseEventType // mouse.ButtonLeft, mouse.Motion, etc. } ``` -------------------------------- ### Conditional Update Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Conditionally updates the bubble based on a flag. ```go if m.enabled { m.bubble, cmd = m.bubble.Update(msg) } ``` -------------------------------- ### Hide Bubble Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md A view function that conditionally hides the bubble. ```go func (m Model) View() string { if m.hidden { return "" } return m.bubble.View() } ``` -------------------------------- ### Typical Project Structure Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/configuration.md A common project structure for bubble components. ```tree project-root/ ├── README.md # Required: include GIF/screenshots ├── LICENSE # Recommended: MIT or compatible ├── go.mod # Go module definition ├── go.sum # Dependency lock file ├── *.go # Implementation files ├── examples/ # Example applications │ └── main.go # Runnable example └── tests/ # Test files (optional) └── *_test.go ``` -------------------------------- ### Check Bubble Type Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Prints the type of the bubble to stderr. ```go fmt.Fprintf(os.Stderr, "Bubble: %T\n", m.bubble) ``` -------------------------------- ### Schedule with Delay Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Schedule a command to be executed after a specified delay. ```go return m, tea.Tick(1*time.Second, func(t time.Time) tea.Msg { return MyMsg{Data: "delayed"} }) ``` -------------------------------- ### Clean Up Resources Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/troubleshooting-and-best-practices.md Implement a cleanup mechanism to release resources like subscriptions or timers when the application exits. ```go // If bubbles use subscriptions or timers func (m Model) Cleanup() { if closer, ok := m.bubble.(interface{ Close() error }); ok { closer.Close() } } // Call before exit func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { if msg, ok := msg.(tea.QuitMsg); ok { m.Cleanup() return m, tea.Quit } return m, nil } ``` -------------------------------- ### Set Focus on Bubble Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Set focus on a bubble component. ```go if focusable, ok := m.bubble.(interface{ Focus() tea.Cmd }); ok { return m, focusable.Focus() } ``` -------------------------------- ### Custom Messages Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/bubble-tea-framework.md Define application-specific messages. ```go type MyEvent struct { Data string } type ErrorMsg struct { Err error } ``` -------------------------------- ### Validate Input Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Check if the input in an input bubble is valid. ```go if m.inputBubble.Validated() { // Process value value := m.inputBubble.Value() } ``` -------------------------------- ### Lipgloss Import Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/ecosystem-and-dependencies.md Shows how to import the Lipgloss package and a common alias. ```go import "github.com/charmbracelet/lipgloss" // Alias for shorter code import lip "github.com/charmbracelet/lipgloss" ``` -------------------------------- ### Vendoring Dependencies Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/ecosystem-and-dependencies.md Commands for vendoring dependencies locally. ```bash go mod vendor # Create vendor/ directory go build -mod=vendor # Build using vendored deps ``` -------------------------------- ### Fork the Additional Bubbles repository Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/configuration.md Cloning the repository and checking out a new branch for contribution. ```bash git clone https://github.com/charmbracelet/additional-bubbles cd additional-bubbles git checkout -b add-your-bubble ``` -------------------------------- ### Basic Style Creation Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/styling-and-theming.md Demonstrates how to create a basic Lipgloss style and apply it to text. ```go import "github.com/charmbracelet/lipgloss" // Create a style style := lipgloss.NewStyle(). Bold(true). Foreground(lipgloss.Color("205")), Background(lipgloss.Color("235")), Padding(1, 2). Margin(1) // Apply to text styledText := style.Render("Hello") ``` -------------------------------- ### Check Focus State Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Check if a bubble component is currently focused. ```go if focusable, ok := m.bubble.(interface{ Focused() bool }); ok { if focusable.Focused() { // Handle input } } ``` -------------------------------- ### Commit and push changes Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/configuration.md Staging, committing, and pushing the changes to the repository. ```bash git add README.md git commit -m "Add yourname/your-bubble bubble" git push origin add-your-bubble ``` -------------------------------- ### Delegate Messages to Bubble Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Delegate incoming messages to a bubble component. ```go m.bubble, cmd = m.bubble.Update(msg) return m, cmd ``` -------------------------------- ### Show Error State Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Render an error message if an error occurred. ```go if m.error != nil { return errorStyle.Render("Error: " + m.error.Error()) } ``` -------------------------------- ### Lipgloss Common Styles Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/ecosystem-and-dependencies.md Demonstrates creating custom styles and using built-in styles with Lipgloss. ```go // Create custom styles style := lipgloss.NewStyle(). Bold(true). Foreground(lipgloss.Color("205")) // Built-in styles lipgloss.NewStyle().Border(lipgloss.RoundBorder()) ``` -------------------------------- ### Add your entry to README.md Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/configuration.md Standard format for adding a bubble entry to the README.md file. ```markdown * [yourname/your-bubble](https://github.com/yourname/your-bubble): A brief description of what your bubble does. ``` -------------------------------- ### Respect Component Boundaries Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/troubleshooting-and-best-practices.md Demonstrates the correct approach of using public methods to interact with a bubble's state, rather than accessing its internal fields directly. ```go // Wrong: access bubble internals selectedIndex := m.bubble.(*InternalModel).index // Correct: use public methods selectedIndex := m.bubble.SelectedIndex() ``` -------------------------------- ### Official Bubbles Import Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/ecosystem-and-dependencies.md Shows how to import various components from the official Bubbles package. ```go import ( "github.com/charmbracelet/bubbles/paginator" "github.com/charmbracelet/bubbles/spinner" "github.com/charmbracelet/bubbles/textinput" ) ``` -------------------------------- ### Delegate to Focused Bubble Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Delegates the update message to the currently focused bubble. ```go if m.focusedBubble >= 0 { m.bubbles[m.focusedBubble], cmd = m.bubbles[m.focusedBubble].Update(msg) } ``` -------------------------------- ### Always Initialize Bubbles Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/troubleshooting-and-best-practices.md Demonstrates the correct way to initialize a bubble variable versus an incorrect way that might result in a nil value. ```go // Wrong: might be nil var m MyBubble // Correct: always initialize m := NewMyBubble() ``` -------------------------------- ### Combine Multiple Bubbles Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Arrange multiple bubbles vertically using lipgloss. ```go lipgloss.JoinVertical( lipgloss.Top, m.header.View(), m.content.View(), m.footer.View(), ) ``` -------------------------------- ### Show Focused/Blurred States Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/quick-reference.md Conditionally render a bubble based on its focused state. ```go func (m Model) View() string { if m.focused { return focusedStyle.Render(m.bubble.View()) } return blurredStyle.Render(m.bubble.View()) } ``` -------------------------------- ### Reduce Allocations Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/troubleshooting-and-best-practices.md Optimize string concatenation by using `strings.Builder` to reduce memory allocations. ```go // Use string builder for concatenation var buf strings.Builder buf.WriteString(part1) buf.WriteString(part2) return buf.String() // Rather than return part1 + part2 ``` -------------------------------- ### Message Delegation Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/bubble-tea-framework.md For multiple bubbles, delegate messages by type. ```go func (m Model) Update(msg bubbletea.Msg) (bubbletea.Model, bubbletea.Cmd) { switch msg := msg.(type) { case tea.KeyMsg: // Handle keyboard input m.myBubble, cmd = m.myBubble.Update(msg) case customEvent: // Handle custom events // May update multiple bubbles } return m, cmd } ``` -------------------------------- ### Bubble Component Interface Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/bubble-tea-framework.md Every bubble implements this interface. ```go type Model interface { Init() Cmd Update(msg Msg) (Model, Cmd) View() string } ``` -------------------------------- ### Listing Format Standards - Bad Descriptions Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/registry-structure.md Examples of bad, vague descriptions for bubbles. ```markdown This is a bubble that does date picking. A table thing for data. Various useful components. ``` -------------------------------- ### Listing Format Standards - Good Descriptions Source: https://github.com/charm-and-friends/additional-bubbles/blob/main/_autodocs/registry-structure.md Examples of good, concise descriptions for bubbles. ```markdown A jQuery-inspired datepicker component. Interactive, customizable, paginated tables. A collection of common prompts for selection, text input, and confirmation. ```