doc: Remove ideas for full tabular data plans.

This commit is contained in:
2026-03-14 14:52:23 -04:00
parent a2e469456a
commit eab872d2ed
2 changed files with 59 additions and 17 deletions

View File

@@ -60,9 +60,23 @@ selection. Useful for live preview pipelines.
### CSV / TSV ### CSV / TSV
`--input-format csv` or `--input-format tsv` parses columnar `--input-format csv` or `--input-format tsv` parses delimited
input. First row is headers, which become field names. Maps input. First row is always headers, which become field names.
naturally to table/column display mode.
Each row becomes a JSON object. Known fields (`label`,
`sublabel`, `icon`, `group`) are promoted to the top level.
Everything else goes into a `meta` object. If no column
matches the label key, the first column is used as `label`.
```sh
# CSV rows become normal Items, so filtering, hooks, and
# multi-select all work unchanged.
echo "name,age,city\nalice,30,toronto" | pikl --input-format csv
```
When `--input-format csv` or `tsv` is used without
`--columns`, column config is auto-generated from the CSV
headers.
## Event Hooks ## Event Hooks
@@ -441,11 +455,26 @@ pikl --format '{icon} {label} <dim>{sublabel}</dim>'
### Table / Column Mode ### Table / Column Mode
```sh ```sh
pikl --columns label,meta.res,meta.size --column-separator ' │ ' pikl --columns label,meta.res:Resolution,meta.size
``` ```
Auto-aligns columns. Sortable per-column with keybinds. `--columns` takes a comma-separated list of field paths.
CSV/TSV input maps naturally here. Each column can have a display alias after a colon
(`meta.res:Resolution`). Auto-aligns columns by computing
widths from header names and cell values (capped at 60
chars). Column widths are computed in core and included in
`ViewState`, so the GUI frontend gets them for free.
The header row renders bold/underlined with `│` separators.
Item rows pad cells to column widths within the same `List`
widget, so cursor/selection/visual-mode highlighting stays
identical to the non-table path.
When `--input-format csv` is used without `--columns`,
columns are auto-generated from the CSV headers.
**Future:** column sorting keybinds, cell/column selection,
horizontal scrolling for wide tables.
### Preview Pane ### Preview Pane
@@ -757,8 +786,14 @@ find-walls --json | pikl \
--on-cancel 'restore-wallpaper' \ --on-cancel 'restore-wallpaper' \
--on-hover-debounce 100 --on-hover-debounce 100
# Process killer with table view # CSV table view
ps aux --no-headers | pikl --input-format tsv --columns 1,10,2 --multi echo "name,age,city\nalice,30,toronto\nbob,25,vancouver" | pikl --input-format csv
# CSV with column subset and aliases
cat data.csv | pikl --input-format csv --columns "name,meta.age:Age"
# TSV table view
ps aux --no-headers | pikl --input-format tsv --multi
# Drill-down file browser # Drill-down file browser
pikl --manifest ~/.config/pikl/filebrowser.toml --session filebrowser pikl --manifest ~/.config/pikl/filebrowser.toml --session filebrowser

View File

@@ -191,19 +191,26 @@ changes covers the register use case.
**Done when:** `seq 1 20 | pikl --multi`, toggle a few items **Done when:** `seq 1 20 | pikl --multi`, toggle a few items
with Space, confirm, and all selected items appear on stdout. with Space, confirm, and all selected items appear on stdout.
## Phase 5: Table Mode & CSV ## Phase 5: Table Mode & CSV
Columnar data display. CSV/TSV input parsing and columnar table rendering.
**Deliverables:** **Deliverables:**
- `--columns` flag for table layout - `--input-format csv` and `--input-format tsv` for delimited input
- Auto-alignment - `--columns` flag for table layout with optional aliases
- Column sorting keybinds - Auto-generated column config from CSV headers
- `--input-format csv` and `--input-format tsv` - Column widths computed in core (GUI gets them for free)
- Column-specific filtering - Table header row with bold/underline styling
- CSV rows become normal Items (JSON objects), so filtering,
field filters, hooks, multi-select, and output all work unchanged
**Done when:** `ps aux | pikl --input-format tsv --columns 1,10,2` **Deferred to future:**
renders a clean table. - Cell/column selection in table mode
- Column sorting keybinds
- Horizontal scrolling for wide tables
**Done when:** `echo "name,age\nalice,30\nbob,25" | pikl --input-format csv`
renders a navigable table with headers.
## Phase 6: Sessions & IPC ## Phase 6: Sessions & IPC