rusackas opened a new pull request, #43023:
URL: https://github.com/apache/superset/pull/43023
## SUMMARY
Investigated #43008 (metrics/columns not showing in the Explore Datasource
Panel, bisected to the react-window v1->v2 bump in #42528).
Dosu's automated diagnosis on that issue claims `DatasourceItems.tsx` and
`DatasourcePanelItem.tsx` are still using the old v1 `VariableSizeList` API.
That's not accurate against current `master` -- both files were correctly
migrated to react-window v2's `List`/`rowHeight`/`rowCount`/`rowProps`/
`rowComponent` API in the same commit the bisect flagged, and haven't
changed since.
I couldn't reproduce the blank-panel bug in code:
- An isolated real-browser (Playwright/Chromium) repro of the exact
`List` + `AutoSizer` wiring pattern, using the pinned `[email protected]`
and `[email protected]` versions, renders rows
correctly.
- The existing unit test suite for this component passes on `master`, but
it mocks `react-virtualized-auto-sizer` to a fixed height, which bypasses
react-window's own sizing path entirely and wouldn't catch a regression
here.
This PR adds a test that exercises the real (unmocked) `AutoSizer` + real
`List` + real `DatasourcePanelItem` end to end, driving an actual
`ResizeObserver` callback the way the browser does. It renders metrics and
columns correctly against the current code. I verified the test actually
catches breakage by temporarily zeroing out `rowCount` in
`DatasourceItems.tsx` and confirming the test fails.
No code fix is included since I couldn't find a bug to fix -- this adds
permanent regression coverage for the one gap in this area's existing test
suite either way.
## BEFORE/AFTER
N/A -- test-only change, no behavior change.
## TESTING INSTRUCTIONS
```
npm run test --
src/explore/components/DatasourcePanel/DatasourcePanel.real-autosizer.test.tsx
```
## ADDITIONAL INFORMATION
- [x] Has associated issue: #43008
- [ ] Required feature flags
- [ ] Changes UI
- [ ] Includes DB migration
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Introduces new feature or API
- [ ] Removes existing feature
--
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]