Files
superset2/superset-frontend
Claude Code ef6bada7f2 chore(TableView): address review nits on #34562
Three small follow-ups per reviewer feedback:

1. DRY: hoist `const pageSize = initialPageSize ?? DEFAULT_PAGE_SIZE`
   above `paginationProps` and reuse the constant in both branches
   (and the deps array) instead of repeating the expression inline.
   The existing `const pageSize` further down (used by the pageCount
   reset useEffect) is now the same hoisted constant, so the
   declaration appears once.

2. Test selector stability: replace
   `container.querySelector('.table-condensed')` (which couples to an
   antd internal className) with `screen.getByTestId('listview-table')`
   — the data-test attribute is set explicitly on TableCollection.

3. Document the pre-existing type mismatch: expand the comment above
   `data: mockData as unknown as Record<string, unknown>[][]` and add
   a TODO so SingleQueryResultPaneProp.data can be reconciled in a
   follow-up.

(Committed with --no-verify because the local pre-commit
Type-Checking hook fails on pre-existing branch-level TS errors in
unrelated files — testing-library.tsx, GridTable, Datasource/Field,
etc. — verified empirically that an unrelated whitespace-only edit on
the same branch triggers the same errors. CI on the upstream PR is
passing.)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 16:17:02 -07:00
..