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
|
Render a cell's text in |
|
Render a cell's text in |
- class recon_gen.common.tree.formatting.CellAccentMenu(on, text_color, background_color)[source]
Bases:
objectRender a cell’s text in
text_coloron abackground_colortint to cue a right-click (DATA_POINT_MENU) drill on that field. Distinguishes fromCellAccentText’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
- text_color: str
- class recon_gen.common.tree.formatting.CellAccentText(on, color)[source]
Bases:
objectRender a cell’s text in
colorto cue a left-click drill on that field. Theon: Dimref carries both the field_id and the column name through to the emitted format options.- Parameters:
on (Dim)
color (str)
- color: str