[Feat]: Notebooks: display a single query result as a KPI card
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- react, sql, typescript
- Ambito
- data-visualization, frontend
Direzione di ricerca
Start with SqlCellResult.tsx, CellChart.tsx and notebook.ts to trace result rendering and chart configuration. Then read notebookFile.ts and notebookUndo.ts for persistence behavior, and review the named notebook tests. Done means the acceptance criteria are covered, including exact scalar formatting, explicit result states, save/load and undo/redo, with focused tests.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Prerequisites
- I have written a descriptive issue title.
- I have searched existing issues and open pull requests to avoid duplicating an existing feature request.
🚀 Feature Proposal
Add an optional KPI presentation for an SQL cell returning one row. The author selects a result column, a display label and a small set of formatting options while retaining access to the original result table.
Motivation
A report often needs to emphasize revenue, active users or an error count without a full table or chart.
Example
An SQL cell returns one row with active_users = 1240. Configure the active_users column and label Active users to show a large 1,240 value.
Acceptance criteria
- Offer KPI presentation for a selected scalar column of an exactly-one-row result; keep table access available and never execute SQL when changing presentation.
- Support label, decimal places and optional prefix/suffix with locale-aware formatting; preserve large integers and exact decimal strings without unsafe Number coercion.
- Render explicit states for zero rows, multiple rows, missing column, NULL, nonnumeric data, execution error and absent output; never silently use the first row of a multi-row result.
- Persist KPI configuration through save/load, notebook import/export and undo/redo; older notebooks retain their current table/chart behavior.
- Respect theme tokens and accessible text; reflect outdated state where available and show the KPI in Report view when that mode exists.
- Cover zero, negatives, large integers, decimal strings, result-column changes and configuration round-trips.
Where to start
Verified against main at 066e41c34001edbc6c869ed726aa3958d3ae7db5: CellChart offers bar, line and pie views and CellChartConfig stores chart axes/series. There is no single-value/KPI output configuration.
packages/web-ui/src/components/notebook/SqlCellResult.tsxpackages/web-ui/src/components/notebook/CellChart.tsxpackages/web-ui/src/types/notebook.tspackages/web-ui/src/utils/notebookFile.tspackages/web-ui/src/utils/notebookUndo.ts
Existing test references:
packages/web-ui/tests/components/notebook/SqlCell.test.tsxpackages/web-ui/tests/utils/notebookFile.test.tspackages/web-ui/tests/utils/notebookChart.test.ts
Scope: Single-value display only; comparisons, targets, spark lines, extra chart types and HTML export rendering are separate work.
Plugin behavior: This uses already loaded result values for any driver and must not issue an aggregate query or choose SQL by driver id.
Related notebook proposals:
- https://github.com/TabularisDB/tabularis/issues/1507
- https://github.com/TabularisDB/tabularis/issues/1503
Contributor notes
- Follow AGENTS.md and the repository rules. Run upstream GitNexus impact analysis before editing existing symbols and report the blast radius; run change detection before committing.
- Add new UI strings to every locale under
packages/web-ui/src/i18n/locales/. Use design tokens, keyboard access, accessible labels and visible focus. - Keep pure frontend helpers under
packages/web-ui/src/utils/and tests under matchingpackages/web-ui/tests/paths. Run focused tests,pnpm typecheck,pnpm lintandpnpm build; extend existing notebook tests for the behaviors above. - Preserve desktop and web behavior. Any necessary shared backend logic belongs in
src-tauri/src/application/or plain modules, with transport-specific code in the corresponding transport module. For backend changes, run relevant Rust tests andcargo check --no-default-featuresfromsrc-tauri/. - Questions? Ask here or on Discord.
- Lingua principale
- TypeScript
- Stelle
- 5.1k
- Fork
- 335
- Merge medio
- 1g 19h
- PR unite (30g)
- 240
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di TabularisDB/tabularis
-
feature request good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
TabularisDB/tabularis#1513 ·
I maintainer di solito rispondono entro 2 giorni
-
feature request good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
TabularisDB/tabularis#1511 ·
I maintainer di solito rispondono entro 2 giorni
-
feature request good first issue
Difficoltà 3/5 1-2 giorni Idoneità per principianti 82/100
TabularisDB/tabularis#1514 ·
I maintainer di solito rispondono entro 2 giorni
-
feature request good first issue
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
TabularisDB/tabularis#1512 ·
I maintainer di solito rispondono entro 2 giorni
-
feature request
Difficoltà 4/5 3-5 giorni Idoneità per principianti 57/100
TabularisDB/tabularis#1510 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di TabularisDB/tabularis
Issue simili
-
idea-scout idea:453
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
jeanibarz/agent-notebook#453 ·
I maintainer di solito rispondono entro 1 giorno
-
level/task
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
wazuh/wazuh-dashboard-plugins#9642 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 91/100
unicef/adt-studio#1112 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
-
Autocomplete still accepts an option after becoming disabledForse già presa @Xapollon430 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 1 giorno