Commit bc1ec54
react-resizable-panels v4 renamed `PanelGroup`'s `direction` prop to
`orientation`. Two call sites were still passing the v3 name, so v4
ignored it and React forwarded the unknown prop to the DOM as a stray
`direction="horizontal"` attribute on the group div.
Both groups are horizontal-only and `horizontal` is v4's default, so
nothing rendered wrong — this is dead-prop cleanup, the tail of the
migration whose visible half was #3024.
Each site also carried `const PanelGroup = ResizablePanelGroup as
React.FC<any>`, and those casts are why the dead prop survived the v4
bump: they erased the props to `any`, so `direction` type-checked
against nothing. Both comments blamed the toolchain — vite-plugin-dts
"not resolving the direction prop type correctly", and a prop that
"does not always narrow cleanly in our TS config" — but neither was a
narrowing problem. `GroupProps` simply has no `direction` key in v4.
Dropping the casts makes the rename self-enforcing: restoring
`direction` on the un-cast `ResizablePanelGroup` now fails with
TS2322 rather than silently reaching the DOM.
ResourceEditPage's `ResizablePanel` props are unaffected — `panelRef`,
`collapsible`, `collapsedSize` and `onResize` are all valid v4
`PanelProps` and were never covered by the cast (it only ever wrapped
the group), so no narrowly-typed workaround is needed.
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent bf66b70 commit bc1ec54
2 files changed
Lines changed: 5 additions & 14 deletions
Lines changed: 3 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | 120 | | |
126 | 121 | | |
127 | 122 | | |
| |||
2060 | 2055 | | |
2061 | 2056 | | |
2062 | 2057 | | |
2063 | | - | |
2064 | | - | |
| 2058 | + | |
| 2059 | + | |
2065 | 2060 | | |
2066 | 2061 | | |
2067 | 2062 | | |
| |||
2336 | 2331 | | |
2337 | 2332 | | |
2338 | 2333 | | |
2339 | | - | |
| 2334 | + | |
2340 | 2335 | | |
2341 | 2336 | | |
2342 | 2337 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
460 | 460 | | |
461 | 461 | | |
462 | 462 | | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | 463 | | |
468 | | - | |
| 464 | + | |
469 | 465 | | |
470 | 466 | | |
471 | 467 | | |
| |||
501 | 497 | | |
502 | 498 | | |
503 | 499 | | |
504 | | - | |
| 500 | + | |
505 | 501 | | |
506 | 502 | | |
507 | 503 | | |
| |||
0 commit comments