Files
fn_registry/dev/issues/0079-tables-drill-ext.md
T
egutierrez e3c8979e8d chore: auto-commit (95 archivos)
- cmd/fn/doctor.go
- cmd/fn/main.go
- cpp/apps/primitives_gallery/playground/tables/CMakeLists.txt
- cpp/apps/primitives_gallery/playground/tables/data_table.cpp
- cpp/apps/primitives_gallery/playground/tables/data_table_logic.cpp
- cpp/apps/primitives_gallery/playground/tables/data_table_logic.h
- cpp/apps/primitives_gallery/playground/tables/self_test.cpp
- cpp/apps/primitives_gallery/playground/tables/tql.cpp
- cpp/apps/primitives_gallery/playground/tables/viz.cpp
- cpp/apps/primitives_gallery/playground/tables/viz.h
- ...

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 00:50:34 +02:00

2.7 KiB

id, title, status, priority, created, closed, related_components
id title status priority created closed related_components
0079 tables playground — drill-through extendido (fase 10) done medium 2026-05-12 2026-05-12
cpp/apps/primitives_gallery/playground/tables

Contexto

Fase 10 del roadmap del tables playground. Drill-down basico ya implementado (make_drill_filter + chip de filtro en stage previo). Falta granularidad de zoom, presets rapidos, click sobre elementos del chart, historial de drill y row inspector.

Cambios

1. Zoom granularity sobre cols Date

  • Detectar col tipo Date en breakout.
  • Combo en chip de breakout: "year / month / week / day / hour".
  • Pure fn truncate_date_cpp_core(date_str, granularity) -> string.
  • Stage 1 con breakout <col>:month agrega valores formateados al granular.
  • TQL: breakout = {"col:month"} (sufijo despues de :).
  • Auto-detect granularity inicial: si rango > 2 anios -> year; > 60 dias -> month; > 14 dias -> week; resto -> day.

2. Quick filter presets

  • Boton "Presets" en chip row de filtros.
  • Menu con:
    • "Top 10 by " (auto-sugiere col numerica)
    • "Last 7 / 30 / 90 dias" (si hay col Date)
    • "Exclude nulls in "
    • "Non-zero only"
  • Aplica como filtros al stage activo.

3. Click-to-drill sobre chart elements

  • Bar/Column/Pie/Funnel: click en elemento -> make_drill_filter(col_idx, value) -> push filter en stage previo, active_stage--.
  • Scatter/Bubble: click en punto -> filter por X y Y rangos cercanos (snap to nearest data point) o muestra row inspector.
  • Heatmap: click en celda -> filtro por par (row, col).
  • ImPlot api: ImPlot::IsPlotHovered() + GetPlotMousePos(). Hit-test propio para barras.

4. Drill history (back/forward)

  • Pila de DrillStep { stage_idx, filter_added } en UiState.drill_history.
  • Botones < > en breadcrumb para back/forward.
  • TQL preserva el stage agrupado pero no la history (es UI state efimero).

5. Row inspector

  • Click derecho sobre row de tabla o punto de chart -> popup modal con todas las cols + valores de la fila.
  • Incluye cols ocultas.
  • Solo lectura. Boton "Copy as TSV" + "Filter by this row".

6. Drill-up: vuelve un stage atras sin perder filtros nuevos

  • Boton < en breadcrumb del stage previo: pushdown del filter actual al stage anterior + active--.
  • Inverso de drill-down. Usuario navega la jerarquia sin perder camino.

Tests

  • truncate_date_cpp_core para granularities (round-trip por fecha conocida).
  • Pure fn de quick filter presets (build vector<Filter> desde preset id).
  • Round-trip TQL con breakout sufijo :month.

No-objetivos

  • Map drill (lat/lng -> region) — fuera de scope.
  • Cross-filter entre paneles (click en panel A filtra panel B) — fase futura.