msyavuz commented on code in PR #43454:
URL: https://github.com/apache/superset/pull/43454#discussion_r3861228482
##########
superset-frontend/src/explore/components/DataTablesPane/components/ResultsPaneOnDashboard.tsx:
##########
@@ -86,9 +79,25 @@ export const ResultsPaneOnDashboard = ({
};
});
+ const resultsTabFallback = getStaleResultsTabFallback(
Review Comment:
Can the results-tab count actually shrink here? `useResultsPane` slices to
`queryCount` and no plugin in the repo sets `dynamicQueryObjectCount: true`, so
the only shrink path looks like a response carrying fewer results than
metadata's `queryObjectCount`.
##########
superset-frontend/src/explore/components/DataTablesPane/test/ResultsPaneOnDashboard.test.tsx:
##########
@@ -106,6 +126,10 @@ describe('ResultsPaneOnDashboard', () => {
expect(
await findByText('No results were returned for this query'),
).toBeVisible();
+ expect(Tabs).toHaveBeenCalledWith(
+ expect.objectContaining({ fullHeight: true }),
+ expect.anything(),
Review Comment:
`expect.anything()` only matches because React 18 still passes the
legacy-context `{}` as the second arg to function components — React 19 passes
`undefined` and this breaks. Drop the second matcher?
##########
superset-frontend/src/explore/components/DataTablesPane/components/ResultsPaneOnDashboard.tsx:
##########
@@ -86,9 +79,25 @@ export const ResultsPaneOnDashboard = ({
};
});
+ const resultsTabFallback = getStaleResultsTabFallback(
+ activeTabKey,
+ items.map(({ key }) => key),
+ );
+
+ useEffect(() => {
Review Comment:
This reconciliation is independent of the height fix and duplicates the
block at `DataTablesPane.tsx:218-227` — split it out so the one-liner can land
on its own?
--
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]