build_tools.syllable_walk_tui.modules.renderer.screen ===================================================== .. py:module:: build_tools.syllable_walk_tui.modules.renderer.screen .. autoapi-nested-parse:: 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 ------- .. autoapisummary:: build_tools.syllable_walk_tui.modules.renderer.screen.RenderScreen Module Contents --------------- .. py:class:: RenderScreen(names_a, names_b, name_class_a, name_class_b, selections_dir_a = None, selections_dir_b = None) Bases: :py:obj:`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. :param names_a: Selected names from Patch A (SelectorState.outputs) :param names_b: Selected names from Patch B (SelectorState.outputs) :param name_class_a: Name class used for Patch A selection :param name_class_b: Name class used for Patch B selection :param selections_dir_a: Selections directory for Patch A (for exports) :param selections_dir_b: Selections directory for Patch B (for exports) .. py:attribute:: BINDINGS :value: [('escape', 'close_screen', 'Close'), ('q', 'close_screen', 'Close'), ('s', 'cycle_style',... A list of key bindings. .. py:attribute:: DEFAULT_CSS :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """ 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; } """ .. raw:: html
Default TCSS. .. py:attribute:: names_a .. py:attribute:: names_b .. py:attribute:: name_class_a .. py:attribute:: name_class_b .. py:attribute:: selections_dir_a :value: None .. py:attribute:: selections_dir_b :value: None .. py:attribute:: available_styles :value: ['title', 'upper', 'lower'] .. py:attribute:: current_style_index :value: 0 .. py:attribute:: show_combined :value: False .. py:property:: current_style :type: str Get the current rendering style. .. py:method:: compose() Create the render screen layout. .. py:method:: on_mount() Handle screen mount - hide combined panel initially. .. py:method:: action_close_screen() Close this screen and return to main view. .. py:method:: action_cycle_style() Cycle through available rendering styles. .. py:method:: action_toggle_combine() Toggle the combined names panel visibility. .. py:method:: on_export_sample_a() Export a sample JSON for Patch A. .. py:method:: on_export_sample_b() Export a sample JSON for Patch B.