Compare commits

...
Author SHA1 Message Date
Enzo Martellucci 1bac9807aa Merge branch 'master' into enxdev/fix/explore-chart-data 2026-08-28 18:49:26 +02:00
Enzo Martellucci 5f79743799 Merge branch 'master' into enxdev/fix/explore-chart-data 2026-08-28 18:44:22 +02:00
Enzo MartellucciandClaude Sonnet 5 2516bf0166 fix(explore): drop redundant .ant-tabs height rules from ResultsPaneOnDashboard
Tabs already emits height: 100% on .ant-tabs-body and .ant-tabs-content
when fullHeight is set, so the Wrapper's own .ant-tabs/.ant-tabs-body
overrides were dead weight.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-28 18:40:54 +02:00
Enzo Martellucci 3f61dd8bdc Merge branch 'master' into enxdev/fix/explore-chart-data 2026-08-28 18:39:22 +02:00
Enzo Martellucci 36f6c22660 Merge branch 'master' into enxdev/fix/explore-chart-data 2026-08-28 15:44:38 +02:00
Enzo Martellucci c9eebc0744 test(explore): cover fullHeight prop passed to ResultsPaneOnDashboard's Tabs
Splitting the stale-tab work into its own PR (#43648) took the only
test asserting fullHeight with it. Add coverage back here, reading
only Tabs' first call argument so the assertion doesn't depend on
React 18's legacy-context second argument, which React 19 drops.
2026-08-28 15:39:45 +02:00
Enzo Martellucci 304b9c10e0 Revert "fix(dashboard): reconcile stale results tab in Chart Data modal"
This reverts commit 50f4802bbf.
2026-08-28 15:00:52 +02:00
Enzo Martellucci b0528f0bf2 Revert "refactor(explore): dedupe stale results-tab fallback into a shared hook"
This reverts commit 7870fda6ab.
2026-08-28 15:00:52 +02:00
Enzo Martellucci b913ee27a0 Revert "test(explore): reset useResultsPane mock between ResultsPaneOnDashboard tests"
This reverts commit 13dd39abb1.
2026-08-28 15:00:52 +02:00
Enzo Martellucci 7de38c2af1 Revert "test(explore): stop asserting Tabs' legacy-context second argument"
This reverts commit 9ebbbc87f3.
2026-08-28 15:00:52 +02:00
Enzo MartellucciandClaude Sonnet 5 9ebbbc87f3 test(explore): stop asserting Tabs' legacy-context second argument
toHaveBeenCalledWith(matcher, expect.anything()) only passed because React
18 still calls function components with a legacy-context {} second
argument; React 19 drops it, which would break this assertion's arg-count
check for reasons unrelated to Tabs' actual props. Inspect the first call
argument directly instead, which is agnostic to whether a second one
exists.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-28 12:16:54 +02:00
Enzo MartellucciandClaude Sonnet 5 13dd39abb1 test(explore): reset useResultsPane mock between ResultsPaneOnDashboard tests
The last test's mockReturnValue overrides for useResultsPane persisted
after the test finished, since nothing restored the mock's implementation.
Restore it in afterEach so later tests keep getting the real hook.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-28 12:13:30 +02:00
Enzo MartellucciandClaude Sonnet 5 7870fda6ab refactor(explore): dedupe stale results-tab fallback into a shared hook
DataTablesPane and ResultsPaneOnDashboard each reconciled activeTabKey
against the current tab keys with an identical getStaleResultsTabFallback
+ useEffect pair. Extract useStaleResultsTabFallback so both call sites
share one implementation.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-28 12:13:01 +02:00
Enzo Martellucci 4011845d92 Merge branch 'master' into enxdev/fix/explore-chart-data 2026-08-28 11:44:47 +02:00
Enzo MartellucciandClaude Sonnet 5 50f4802bbf fix(dashboard): reconcile stale results tab in Chart Data modal
Address PR #43454 review feedback: reuse DataTablesPane's stale-tab
fallback so ResultsPaneOnDashboard doesn't render blank when a mixed
chart's active results tab disappears, and drop CSS rules now
redundant with the fullHeight prop.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-25 12:16:21 +02:00
Enzo Martellucci fd07663dc1 fix(dashboard): stretch Chart Data modal results grid to fill available height 2026-08-24 13:32:15 +02:00
2 changed files with 14 additions and 9 deletions
@@ -28,14 +28,6 @@ const Wrapper = styled.div`
flex-direction: column;
height: 100%;
.ant-tabs {
height: 100%;
}
.ant-tabs-body {
height: 100%;
}
.ant-tabs-content {
display: flex;
flex-direction: column;
@@ -88,7 +80,12 @@ export const ResultsPaneOnDashboard = ({
return (
<Wrapper>
<Tabs activeKey={activeTabKey} onChange={setActiveTabKey} items={items} />
<Tabs
fullHeight
activeKey={activeTabKey}
onChange={setActiveTabKey}
items={items}
/>
</Wrapper>
);
};
@@ -25,9 +25,15 @@ import {
} from 'spec/helpers/testing-library';
import { ChartMetadata, ChartPlugin, VizType } from '@superset-ui/core';
import { setupAGGridModules } from '@superset-ui/core/components/ThemedAgGridReact';
import Tabs from '@superset-ui/core/components/Tabs';
import { ResultsPaneOnDashboard } from '../components';
import { createResultsPaneOnDashboardProps } from './fixture';
jest.mock('@superset-ui/core/components/Tabs', () => {
const actual = jest.requireActual('@superset-ui/core/components/Tabs');
return { __esModule: true, ...actual, default: jest.fn(actual.default) };
});
beforeAll(() => {
setupAGGridModules();
});
@@ -106,6 +112,8 @@ describe('ResultsPaneOnDashboard', () => {
expect(
await findByText('No results were returned for this query'),
).toBeVisible();
const [tabsProps] = (Tabs as unknown as jest.Mock).mock.calls[0];
expect(tabsProps).toEqual(expect.objectContaining({ fullHeight: true }));
});
test('render errorMessage', async () => {