Commit 5e0cc7b
feat(wasm-viewer): restore Load Parquet upload affordance (#923)
The static-site WASM viewer's landing page exposed only Demos and Load
URL — the dropzone wasn't wired (no `onFile` handler) and the topnav
"Load Parquet" button never showed up after a capture loaded
(initDashboard was called without `onUploadParquet`). Both surfaces
work in the server viewer; the WASM bootstrap was just missing the
glue.
Add a single `loadFile(file)` helper in `site/viewer/lib/script.js`
that reads the File's bytes and runs the existing `loadParquet`
flow. Pass it as `onFile` on the FileUpload landing component AND as
`onUploadParquet` into `initDashboard`, so the same handler powers
the dropzone, the landing's Choose-File button, and the topnav button
once a capture is loaded. Drops `?demo` / `?capture` URL params on
upload so a refresh doesn't fight the just-uploaded file.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 5a028df commit 5e0cc7b
3 files changed
Lines changed: 41 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
127 | 132 | | |
128 | 133 | | |
129 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
130 | 168 | | |
131 | 169 | | |
132 | 170 | | |
| |||
383 | 421 | | |
384 | 422 | | |
385 | 423 | | |
| 424 | + | |
386 | 425 | | |
387 | 426 | | |
388 | 427 | | |
| |||
0 commit comments