rusackas commented on PR #37996:
URL: https://github.com/apache/superset/pull/37996#issuecomment-4437162307

   Closing this PR - `react-window` v1 → v2 is a complete API redesign that 
cannot be applied as a straight bump.
   
   **Breaking changes affecting Superset (7 files)**:
   
   - `VariableSizeGrid`, `VariableSizeList`, `FixedSizeList`, `FixedSizeGrid` 
are all removed. v2 exports only `Grid` and `List`.
   - The children-as-render-function pattern is gone. v2 uses 
`rowComponent`/`cellComponent` props + `rowProps`/`cellProps` for passing data.
   - `itemData`, `itemSize`, `itemCount`, `itemKey` props are all removed; 
replaced with `rowProps`, `rowHeight`, `rowCount`.
   - `ListChildComponentProps` type is removed; v2 ships its own bundled types 
with no equivalent.
   - The imperative `ref` prop is replaced by `listRef`/`gridRef` props, and 
the imperative API changed: `resetAfterIndex()`/`resetAfterIndices()` no longer 
exist (only `scrollToRow()`/`scrollToColumn()`/`scrollToCell()`).
   - `Grid`'s `onScroll` callback (used in `VirtualTable.tsx` to sync AntD 
table horizontal scrolling) has no equivalent in v2.
   - Internal `_outerRef` access used in `useAutoScroll.ts` will break; v2 
components use native browser scroll via their `element` getter on the 
imperative API.
   
   **Affected files requiring non-trivial rewrites**:
   
   1. 
`superset-frontend/packages/superset-ui-core/src/components/Table/VirtualTable.tsx`
 - Uses `VariableSizeGrid`, children render function, `resetAfterIndices()`, 
`onScroll({scrollLeft})`, and accesses `gridRef.current.state.scrollLeft` 
(internal v1 state). The horizontal scroll sync with AntD table headers has no 
direct equivalent in v2.
   2. 
`superset-frontend/src/explore/components/DatasourcePanel/DatasourceItems.tsx` 
- Uses `VariableSizeList`, `resetAfterIndex()`, `itemData`, `itemSize`, 
`itemCount`, children render function.
   3. 
`superset-frontend/src/components/Datasource/FoldersEditor/VirtualizedTreeList.tsx`
 - Uses `VariableSizeList`, `resetAfterIndex()`, `itemData`, `itemSize`, 
`itemCount`, children render function.
   4. 
`superset-frontend/src/components/Datasource/FoldersEditor/VirtualizedTreeItem.tsx`
 - Uses `ListChildComponentProps` type.
   5. 
`superset-frontend/src/components/Datasource/FoldersEditor/hooks/useAutoScroll.ts`
 - Uses `VariableSizeList` type and accesses `_outerRef` internal.
   6. `superset-frontend/src/dashboard/components/SliceAdder.tsx` - Uses 
`FixedSizeList`, `itemKey`, children render function.
   7. `superset-frontend/src/components/Chart/DrillBy/DrillBySubmenu.tsx` - 
Uses `FixedSizeList`, `itemData`, children render function.
   
   This migration should be done as a dedicated PR with proper testing. The 
`VirtualTable.tsx` horizontal-scroll-sync case in particular needs careful 
design since the v2 API removes `onScroll` from `Grid` entirely.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to