recon_gen.common.tree.formatting

Typed conditional-format wrappers for Table cells.

QuickSight’s ConditionalFormatting is a free-form dict in the model layer; the tree wraps the two patterns the apps actually use:

  • CellAccentText — accent-colored text. Cues a left-click (DATA_POINT_CLICK) drill on that field.

  • CellAccentMenu — accent-colored text on a tint background. Cues a right-click (DATA_POINT_MENU) drill on that field. Use this when the cell already carries a left-click action and a second right-click action also lives on the visual — the visual cue tells the analyst there’s more than one drill.

Both wrap a typed Dim ref so the cell’s field_id + column name resolve together at emit time. Catches the bug class where the two strings drift out of sync (the imperative link_text_format(field_id, column_name, color) shape took both as separate strings, with no enforcement they describe the same column).

Classes

CellAccentMenu(on, text_color, background_color)

Render a cell's text in text_color on a background_color tint to cue a right-click (DATA_POINT_MENU) drill on that field.

CellAccentText(on, color)

Render a cell's text in color to cue a left-click drill on that field.

class recon_gen.common.tree.formatting.CellAccentMenu(on, text_color, background_color)[source]

Bases: object

Render a cell’s text in text_color on a background_color tint to cue a right-click (DATA_POINT_MENU) drill on that field. Distinguishes from CellAccentText’s plain-accent left-click style, so the analyst can tell the two click idioms apart at a glance.

Parameters:
  • on (Dim)

  • text_color (str)

  • background_color (str)

background_color: str
emit()[source]
Return type:

dict[str, Any]

on: Dim
text_color: str
class recon_gen.common.tree.formatting.CellAccentText(on, color)[source]

Bases: object

Render a cell’s text in color to cue a left-click drill on that field. The on: Dim ref carries both the field_id and the column name through to the emitted format options.

Parameters:
  • on (Dim)

  • color (str)

color: str
emit()[source]
Return type:

dict[str, Any]

on: Dim