Skip to content

Split theming into color themes and UI themes #194

Description

@oobagi

Summary

Split the current unified Theme struct into two independent layers:

  1. Color Theme — palette only (primary, accent, muted, border, status colors, background type)
  2. UI Theme — structural/layout choices that change how the program looks and feels

Currently everything lives in one Theme struct in internal/theme/theme.go. This bundles colors with structural decisions (list markers, divider chars, quote bars, checklist glyphs, code label alignment, heading styles). The split would let users mix and match — e.g. "ocean" colors with a "minimal" UI, or "dracula" colors with a "retro" UI.

Color Theme (palette)

What it controls — same as today's core color fields:

  • Primary, Success, Error, Warning, Muted, Border, Accent
  • StatusBg, StatusFg
  • Background ("dark" / "light")

UI Theme (structure & layout)

What it controls — things that change the program's shape, not its colors:

  • Footer design — different footer layouts/styles
  • Help menu — card overlay vs. bottom popup from footer vs. other layouts
  • Background color / fill — whether the app fills the terminal or floats content
  • Icons / ASCII art — glyph sets, decorative elements
  • Editor/viewer chrome — left sidebar presence, element picker style
  • Block styles — list markers, checklist glyphs, divider chars, quote bars, heading decoration, code label alignment (currently BlockStyles)
  • General layout — spacing, padding, chrome density

Config

color_theme = "ocean"
ui_theme = "minimal"

Task list

  • Define ColorTheme and UITheme structs
  • Refactor Theme to compose both (or replace entirely)
  • Update FromName / preset loading to resolve color + UI independently
  • Add CLI commands (notebook color-theme, notebook ui-theme or extend existing notebook theme)
  • Migrate existing presets — each current preset maps to one color theme + one UI theme
  • Ship a few distinct UI themes (e.g. default, minimal, retro)
  • Update config loading/saving for the two fields

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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