Commit 4c5d31e
committed
refactor: drop two more dead prop chains in the sub-block editor
`GroupedCheckboxList` declares `title` (required) and `maxHeight` and reads
neither. It renders its own hardcoded copy instead — `Select PII Types to Detect`
for the header and `PII types` for the field label — so a block author who sets
`title` on a `grouped-checkbox-list` subBlock gets silence, and the
`maxHeight = 400` default implies a scroll ceiling that is never applied. Both
props go, along with the two values `sub-block.tsx` was passing.
`flatTagList` was threaded through the recursive tag renderers to a dead end:
declared on `NestedTagRendererProps`, inherited by `FolderContentsProps`,
destructured in both, forwarded once more, and read by neither. Its real consumer
is `flatTagIndexMap`, built from it at the top level and documented "Map from tag
string to index for O(1) lookups" — so the array was being carried alongside its
own index through arbitrary nesting depth. The top-level memo and its length
checks stay; only the descent goes.
Note the component's copy is PII-specific while its name and props present as
generic. Renaming it is a separate call, not made here.
Both removals were caught mid-flight by `tsc`: my line patterns also matched a
live `flatTagList` on `KeyboardNavigationHandler` and a live `title` on `Switch`,
which is exactly why the type-check runs before the commit and not after.
(cherry picked from commit 5db44f3)1 parent e14c80e commit 4c5d31e
3 files changed
Lines changed: 1 addition & 12 deletions
File tree
- apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block
- components
- grouped-checkbox-list
- tag-dropdown
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
43 | | - | |
44 | 42 | | |
45 | 43 | | |
46 | 44 | | |
47 | 45 | | |
48 | 46 | | |
49 | | - | |
50 | 47 | | |
51 | 48 | | |
52 | 49 | | |
53 | 50 | | |
54 | | - | |
55 | 51 | | |
56 | 52 | | |
57 | 53 | | |
| |||
Lines changed: 1 addition & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
379 | | - | |
380 | 379 | | |
381 | 380 | | |
382 | 381 | | |
| |||
403 | 402 | | |
404 | 403 | | |
405 | 404 | | |
406 | | - | |
407 | 405 | | |
408 | 406 | | |
409 | 407 | | |
| |||
565 | 563 | | |
566 | 564 | | |
567 | 565 | | |
568 | | - | |
569 | 566 | | |
570 | 567 | | |
571 | 568 | | |
| |||
612 | 609 | | |
613 | 610 | | |
614 | 611 | | |
615 | | - | |
616 | 612 | | |
617 | 613 | | |
618 | 614 | | |
| |||
1633 | 1629 | | |
1634 | 1630 | | |
1635 | 1631 | | |
| 1632 | + | |
1636 | 1633 | | |
1637 | 1634 | | |
1638 | | - | |
1639 | 1635 | | |
1640 | 1636 | | |
1641 | 1637 | | |
| |||
1720 | 1716 | | |
1721 | 1717 | | |
1722 | 1718 | | |
1723 | | - | |
1724 | 1719 | | |
1725 | 1720 | | |
1726 | 1721 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
844 | 844 | | |
845 | 845 | | |
846 | 846 | | |
847 | | - | |
848 | 847 | | |
849 | 848 | | |
850 | 849 | | |
851 | 850 | | |
852 | | - | |
853 | 851 | | |
854 | 852 | | |
855 | 853 | | |
| |||
0 commit comments