Commit 901ace8
committed
refactor(tables): TableView is a canonical resource view
Step 7. The table implementation moves out of the route tree and into
`components/resources/table-view/`, joining the layout the unit already had:
`table-view.tsx`, `index.ts`, `components/<child>/`, `hooks/`, `utils/`,
`types.ts`. What stays behind is four route files — `page.tsx`, `loading.tsx`,
`error.tsx`, and the ~50-line client shell that resolves the axes.
`Table` becomes `TableView` and takes `source: ResourceSource<'table'>` instead
of `workspaceId` + `tableId`. Both are banned prop names, and registering the
view in `CANONICAL_UNITS` turns R4a/R4b on to say so — the gate found them
immediately. The subtree below still takes plain ids, so the source is narrowed
once at the top through `tableWorkspaceId`/`tableResourceId`, which is the
helper deleted earlier for having no caller, restored now that it has one.
The four preceding steps are what made this a move rather than a rewrite: with
the router, the params and the permission context already severed, R6 was
already 0 before a single file changed directory. 61 files, ~160 lines of
non-import churn.
One edge stays and is annotated: the workflow-column sidebar renders the
editor's read-only canvas, which reads `useParams` and pulls in the editor's
node and edge components. Safe for the same reason the log view's frozen canvas
is — `ResourceSeedMap['table']` is `never`, so no anonymous surface can mount
this unit — and `CROSS_TREE_ALLOWLIST` now names two files pointing at one
component, which is the signal that `Preview` itself wants to move to
`components/`. That is a separate change.
Every rule back at baseline with the view registered: R2 0, R3c 0, R4a 0, R4b 0,
R6 0.1 parent c7ad09d commit 901ace8
61 files changed
Lines changed: 161 additions & 121 deletions
File tree
- apps/sim
- app/workspace/[workspaceId]
- home/components/mothership-view/components/resource-content
- tables/[tableId]
- components/resources/table-view
- components
- column-config-sidebar
- enrichment-details
- enrichments-sidebar
- execution-slideout
- lock-settings-modal
- new-column-dropdown
- row-modal
- run-status-control
- save-view-modal
- select-field
- sidebar-fields
- table-action-bar
- table-filter
- table-grid
- cells
- workflow-sidebar
- hooks
- utils
- resources
- scripts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
62 | | - | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
273 | 278 | | |
274 | 279 | | |
275 | 280 | | |
| |||
311 | 316 | | |
312 | 317 | | |
313 | 318 | | |
314 | | - | |
| 319 | + | |
315 | 320 | | |
316 | 321 | | |
317 | 322 | | |
318 | 323 | | |
319 | 324 | | |
320 | | - | |
321 | | - | |
| 325 | + | |
322 | 326 | | |
323 | 327 | | |
324 | 328 | | |
| |||
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | | - | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
40 | | - | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
45 | | - | |
46 | | - | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| |||
Lines changed: 0 additions & 21 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
7 | 11 | | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
0 commit comments