build_tools.syllable_walk_tui.modules.renderer.screen

Render Screen for Syllable Walker TUI.

Modal screen for viewing selected names with proper rendering. Displays Patch A and Patch B selections side-by-side with styling.

This screen consumes the name_renderer module to transform raw lowercase names into properly styled, human-readable formats.

Design Philosophy:
  • Presentation only - does not modify underlying data

  • Shows names in context for human evaluation

  • “orma” in a list is data; “Orma” in context is a name

Classes

RenderScreen

Modal screen for rendered name display.

Module Contents

class build_tools.syllable_walk_tui.modules.renderer.screen.RenderScreen(names_a, names_b, name_class_a, name_class_b, selections_dir_a=None, selections_dir_b=None)[source]

Bases: textual.screen.Screen

Modal screen for rendered name display.

Shows selected names from both patches with: - Title case rendering (default) - Full name combination (A first + B last) - Style toggle (title/upper/lower)

Keybindings:

Esc/q: Close screen and return to main view s: Cycle through rendering styles c: Toggle combined name view

Initialize with selected names from both patches.

Parameters:
  • names_a (list[str]) – Selected names from Patch A (SelectorState.outputs)

  • names_b (list[str]) – Selected names from Patch B (SelectorState.outputs)

  • name_class_a (str) – Name class used for Patch A selection

  • name_class_b (str) – Name class used for Patch B selection

  • selections_dir_a (pathlib.Path | None) – Selections directory for Patch A (for exports)

  • selections_dir_b (pathlib.Path | None) – Selections directory for Patch B (for exports)

BINDINGS = [('escape', 'close_screen', 'Close'), ('q', 'close_screen', 'Close'), ('s', 'cycle_style',...

A list of key bindings.

DEFAULT_CSS = Multiline-String
Show Value
"""
    RenderScreen {
        background: $surface;
        padding: 1;
    }

    /* Header styling */
    .render-title {
        text-style: bold;
        color: $accent;
        text-align: center;
        padding: 1;
        border-bottom: solid $primary;
    }

    .render-subtitle {
        color: $text-muted;
        text-align: center;
        padding-bottom: 1;
    }

    /* Main layout - side by side columns */
    .render-columns {
        width: 100%;
        height: 1fr;
    }

    .render-column {
        width: 1fr;
        height: 100%;
        padding: 1;
        border: solid $primary;
        margin: 0 1;
    }

    .column-header {
        text-style: bold;
        color: $secondary;
        padding-bottom: 1;
        border-bottom: dashed $primary;
    }

    .name-class-label {
        color: $text-muted;
        padding-bottom: 1;
    }

    /* Name list styling */
    .names-scroll {
        height: 1fr;
    }

    .rendered-name {
        padding: 0 1;
    }

    .no-names {
        color: $text-muted;
        text-style: italic;
    }

    /* Combined names panel */
    .combined-panel {
        width: 100%;
        height: auto;
        max-height: 30%;
        padding: 1;
        border: solid $accent;
        margin-top: 1;
    }

    .combined-header {
        text-style: bold;
        color: $accent;
        padding-bottom: 1;
    }

    .combined-scroll {
        height: 1fr;
        max-height: 20;
    }

    .combined-name {
        padding: 0 1;
        color: $success;
    }

    /* Footer */
    .render-footer {
        text-align: center;
        color: $text-muted;
        padding-top: 1;
        border-top: solid $primary;
    }
    """

Default TCSS.

names_a
names_b
name_class_a
name_class_b
selections_dir_a = None
selections_dir_b = None
available_styles = ['title', 'upper', 'lower']
current_style_index = 0
show_combined = False
property current_style: str

Get the current rendering style.

compose()[source]

Create the render screen layout.

on_mount()[source]

Handle screen mount - hide combined panel initially.

action_close_screen()[source]

Close this screen and return to main view.

action_cycle_style()[source]

Cycle through available rendering styles.

action_toggle_combine()[source]

Toggle the combined names panel visibility.

on_export_sample_a()[source]

Export a sample JSON for Patch A.

on_export_sample_b()[source]

Export a sample JSON for Patch B.