@pythia-software/query-table-ui 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -10,6 +10,20 @@ and selection toolbar.
10
10
  npm install @pythia-software/query-table-core @pythia-software/query-table-react @pythia-software/query-table-ui react react-dom
11
11
  ```
12
12
 
13
+ ## Column widths
14
+
15
+ Drag a header edge to resize one column (arrow keys nudge, Enter auto-fits).
16
+ Click a header and open **Column Widths** to resize in one step:
17
+
18
+ - **Fit This Column** sizes the clicked column to its widest rendered value.
19
+ - **Fit All to Content** does the same for every column.
20
+ - **Fit All to Screen** fills the viewport; when content overflows, narrow
21
+ columns keep their content width and only the widest ones are trimmed.
22
+ - **Equal Widths** splits the viewport evenly.
23
+ - **Reset Widths** drops explicit widths back to schema defaults.
24
+
25
+ Widths live in `query.select`, so presets are shareable and undoable.
26
+
13
27
  ## Tag/set filters
14
28
 
15
29
  Set `filter.editor: "set"` on a `textarray` field to use the native WHERE
@@ -149,9 +163,7 @@ touch-based landscape viewports use a mobile interaction model:
149
163
  sticky bulk actions, a horizontal table scroll cue, and the device's native
150
164
  share sheet when available (clipboard fallback otherwise).
151
165
 
152
- Edits continue to update the query immediately, as on desktop; **Done** dismisses
153
- the sheet. The column workbench retains its explicit **Apply columns** draft
154
- workflow. Desktop chips, popovers, and drag-and-drop remain available.
166
+ Filter and sort edits update the query immediately; **Done** dismisses the sheet. The column and metric workbenches retain explicit **Apply** draft workflows. Desktop chips, popovers, and drag-and-drop remain available.
155
167
 
156
168
  Keep the standard viewport meta tag in the host page:
157
169
 
@@ -173,7 +185,7 @@ for customization and backend integration details.
173
185
 
174
186
  ## SELECT editor
175
187
 
176
- `QueryBuilder` includes a split **Add** button and **Reset** action for Columns: Add opens the field picker, while its caret opens the column customizer. Actions follow the selected chips on desktop and sit in the section header on small screens. The exported `SelectColumnEditor` also accepts `{ api, onClose }` for standalone use. It supports draft column ordering, a searchable catalogue, sampled value frequencies, and a lazy-loaded CodeMirror formula editor with grouped live previews and regex inspection. Shared-definition saves and query-layout application are separate actions.
188
+ `QueryBuilder` includes a split **Add** button and **Reset** action for Columns: Add opens the field picker, while its caret opens the column customizer. Actions follow the selected chips on desktop and sit in the section header on small screens. The exported `SelectColumnEditor` also accepts `{ api, onClose }` for standalone use. It supports draft column ordering, a searchable catalogue, sampled value frequencies, and a lazy-loaded, dependency-free textarea formula editor with field/function suggestions, signature help, and compiler diagnostics with grouped live previews and regex inspection. A Function library beside the editor supports search by name or intent, browsing by concept and return type, and insertion at the cursor or around selected text; it stacks below the editor on narrow screens. Shared-definition saves and query-layout application are separate actions.
177
189
 
178
190
  ### Filter value presentation
179
191
 
@@ -196,3 +208,19 @@ The searchable static picker matches both labels and keys. Selection emits the
196
208
  canonical `value` only; presentation is never serialized into queries. A resolver
197
209
  can present a current value even when it is absent from the options. Strings without
198
210
  a presentation provider retain the existing select control.
211
+
212
+ ## Metric workbench and dashboards
213
+
214
+ QueryBuilder's **Edit metrics** opens the resizable four-pane `MetricsEditor`. Apply commits drafts together; Cancel discards them. Dashboard layout provides draggable canvas widths, whole-rem card sizing through corner handles or inputs, canvas presets, pointer/keyboard reordering, and inline names. Metrics use their own workbench on desktop and compact viewports; their changes commit on Apply.
215
+
216
+ Use the icon buttons beside **Panels** to show or hide the metric list, definition, references, and preview. At least one panel stays visible; the metric picker and Previous/Next controls remain available when the list is hidden. **See in dashboard** reveals the selected card in the same draft; **Back to metric**, the card’s pencil action, or a double-click returns to editing. Open settings and panel preferences survive these transitions.
217
+
218
+ Drag the dashboard canvas’s right edge to test responsive wrapping. Card corner handles adjust preferred width and height in whole rems; arrow keys resize and Shift increases the step. Escape or a cancelled pointer gesture restores the dimensions at drag start. Canvas and panel geometry are temporary preferences; card geometry commits on Apply. Removal offers **Undo remove**, and **Review issues** opens the metric needing attention while valid metrics continue to preview.
219
+
220
+ Use **Dialog size** for keyboard-editable pixel width/height controls; the native resize corner remains available. **Reset layout** restores the modal and all pane widths without changing metric drafts. Card minimum widths apply equally in the layout canvas and saved dashboard; narrower containers scroll horizontally.
221
+
222
+ **Value** requires no grouping. Incompatible drafts show an actionable diagnostic and block Apply; standalone `MetricCard` also rejects grouped or multiple scalar buckets. Lists suppress magnitude bars for signed results. Charts visibly disclose missing/error points and drawing limits while keeping ordinary captions compact. Malformed remote box/histogram summaries produce a card-local diagnostic instead of throwing during rendering.
223
+
224
+ `MetricsPanel` renders values, lists, pivots/flat tables, bars, lines, pie/ring, scatter, box, and histogram cards through native SVG and accessible data tables/tooltips. Pass a `MetricTheme` as `metricTheme` to QueryBuilder and `theme` to MetricsPanel for consistent typed-category palette assignments. Labels, temporal units/patterns, legends, list styling, axis labels, and card dimensions are query-local. `MetricCard` and `MetricsEditor` are also exported for standalone integration.
225
+
226
+ See [the production metrics guide](../../docs/metrics.md). Run `npm run test:metrics` against the demo for authoring/layout/persistence and chart interactions.