Skip to content

feat: add SetBorderPadding for Box-like primitives #11

Description

@cassdeckard

Summary

Add borderPadding (top, right, bottom, left) configuration for Box-like primitives (TextView, Table, etc.) so padding inside the border can be set via YAML. tview provides SetBorderPadding.

Background

Discovered while planning a tview presentation demo implementation via tviewyaml. The Table and Code TextView slides use SetBorderPadding(1, 1, 2, 0) and similar for layout.

Demo Usage

Table and Code TextView use SetBorderPadding; not in Primitive config.

Proposed Approach

  • Add borderPadding: [top, right, bottom, left] to Primitive (or shorthand for uniform padding)
  • Apply in ApplyProperties for any primitive that implements SetBorderPadding (Box interface)
  • Support both 4-element list and single-value uniform padding

Relevant Files

  • config/types.go – add borderPadding
  • builder/properties.go – apply to Box-like primitives
  • docs/tview-coverage.md – document once implemented

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions