Skip to content

[menu draw] restyle menus with shared drawBox and block borders - #3153

Draft
saulbert wants to merge 1 commit into
developfrom
menu-box-restyle
Draft

[menu draw] restyle menus with shared drawBox and block borders#3153
saulbert wants to merge 1 commit into
developfrom
menu-box-restyle

Conversation

@saulbert

Copy link
Copy Markdown
Collaborator

Status: proposal / WIP — not happy with the look yet. Opening to preserve the work for discussion; the visual design needs more iteration before this would merge.

What this does

Unifies box drawing across VisiData and restyles the menu to match the status-box look.

  • Shared primitive: drawBox() and the disp_boxchars option move from sidebar.py into cliptext.py (alongside clipdraw). Adds top= and shadow= params. drawBox is intentionally not re-exported as a global — call vd.drawBox.
  • Symmetric block borders: the default disp_boxchars is now symmetric (▐▌▄▀▗▖▝▘) instead of the old heavy-bottom set.
  • Menu restyle: submenus and the command helpbox draw via drawBox. The level-1 dropdown uses the menubar color and drops its top line to connect to the menubar; nested submenus are a darker shade. Edges cast a shadow one shade darker than the fill. The helpbox keystroke is a right-aligned chip.
  • Status sidebar drops its bottom line to connect to the status bar.
  • Submenu box widened by one cell so an ambiguous-width note glyph () doesn't overrun the right edge.

New theme options

color_submenu, color_menu_shadow, color_menu_help_key (with ascii8/asciimono/adwaita overrides). Retires disp_menu_boxchars. Also fixes menudraw() to forward keyword args.

Open questions / not-yet-resolved

  • Overall menu appearance — the color/shadow scheme still doesn't look right.
  • Whether non-menu boxes (help, command palette, status) should also get the shadow-shade treatment (left as fade-to-terminal for now).

Testing

make test → 12/12 groups pass. Menu/sidebar rendering verified manually in a terminal (golden tests don't cover interactive menu draw).

🤖 Generated with Claude Code

Move drawBox() and the disp_boxchars option from sidebar.py into
cliptext.py so every box shares one primitive; add top= and shadow=
params. Use a symmetric block charset (down from a heavy-bottomed one).

Apply the box styling to the menu:
- submenus and the command helpbox now draw via drawBox
- level-1 dropdown takes the menubar color and omits its top line so it
  connects to the menubar; nested submenus are a darker shade
- box edges cast a shadow one shade darker than the fill
- helpbox keystroke moved to a right-aligned chip
- widen the submenu box by one cell so an ambiguous-width note glyph
  does not overrun the right edge

The status sidebar omits its bottom line to connect to the status bar.

New theme options: color_submenu, color_menu_shadow, color_menu_help_key
(with ascii8/asciimono/adwaita overrides). Retire disp_menu_boxchars.
Fix menudraw() to forward keyword args.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant