recon_gen.common.tree.text_boxes

Tree-side wrapper for models.SheetTextBox — the rich-text box nodes used on landing-page sheets (Getting Started).

QuickSight splits a sheet’s contents into Visuals and TextBoxes in the underlying model, but at the layout level both occupy GridLayoutElement slots — only the ElementType differs ("VISUAL" vs "TEXT_BOX"). The LayoutNode Protocol in structure.py abstracts over that split so callers see a single Sheet.place(node, ...) API regardless of which underlying field the node will eventually emit into.

Classes

TextBox(text_box_id, content)

Tree-side rich-text box.

class recon_gen.common.tree.text_boxes.TextBox(text_box_id, content)[source]

Bases: object

Tree-side rich-text box.

Mirrors the KPI / Table / BarChart / Sankey typed wrapper pattern: callers construct typed nodes; the tree owns layout / id resolution / emission. Compose content via the common.rich_text helpers (rt.text_box(...)) and pass the string in.

text_box_id is required (no auto-ID for text boxes — they don’t carry a _AUTO_KIND). The ID surfaces in the layout’s ElementId and the sheet’s TextBoxes list.

Parameters:
  • text_box_id (str)

  • content (str)

content: str
property element_id: str
property element_type: Literal['VISUAL', 'FILTER_CONTROL', 'PARAMETER_CONTROL', 'TEXT_BOX', 'IMAGE']
emit()[source]
Return type:

SheetTextBox

text_box_id: str