WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 35d579a

Browse files
author
bengotow
committed
[ui] Improvements to AI Summary UI
- The split panel no longer has an unused 2px divider space on the right hand side if the second panel is unmounted. - The AI summary menu item appears on the run details page in the top right menu. - The types for RunAssetTags and RunAssetCheckTags have been scoped down so they’re easier to re-use. [INTERNAL_BRANCH=begotow/ai-summary-feedback]
1 parent a49e397 commit 35d579a

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

js_modules/dagster-ui/packages/ui-components/src/components/SplitPanelContainer.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ export const SplitPanelContainer = forwardRef<SplitPanelContainerHandle, SplitPa
7070

7171
const firstPaneStyles: React.CSSProperties = {flexShrink: 0};
7272

73+
const dividerReservedSpace = first && second ? DIVIDER_THICKNESS : 0;
74+
7375
// Note: The divider appears after the first panel, so making the first panel 100% wide
7476
// hides the divider offscreen. To prevent this, we subtract the divider depth.
7577
if (axis === 'horizontal') {
@@ -79,7 +81,7 @@ export const SplitPanelContainer = forwardRef<SplitPanelContainerHandle, SplitPa
7981
} else {
8082
firstPaneStyles.minWidth = firstMinSize;
8183
firstPaneStyles.width = `calc(${firstSize / 100} * (100% - ${
82-
DIVIDER_THICKNESS + (second ? secondMinSize : 0)
84+
dividerReservedSpace + (second ? secondMinSize : 0)
8385
}px))`;
8486
}
8587
} else {
@@ -89,7 +91,7 @@ export const SplitPanelContainer = forwardRef<SplitPanelContainerHandle, SplitPa
8991
} else {
9092
firstPaneStyles.minHeight = firstMinSize;
9193
firstPaneStyles.height = `calc(${firstSize / 100} * (100% - ${
92-
DIVIDER_THICKNESS + (second ? secondMinSize : 0)
94+
dividerReservedSpace + (second ? secondMinSize : 0)
9395
}px))`;
9496
}
9597
}

js_modules/dagster-ui/packages/ui-core/src/runs/RunAssetCheckTags.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import {RunAssetChecksQuery, RunAssetChecksQueryVariables} from './types/RunAsse
44
import {RunFragment} from './types/RunFragments.types';
55
import {isHiddenAssetGroupJob} from '../asset-graph/Utils';
66

7-
export const RunAssetCheckTags = (props: {run: RunFragment}) => {
7+
export const RunAssetCheckTags = (props: {
8+
run: Pick<RunFragment, 'id' | 'pipelineName' | 'assetCheckSelection'>;
9+
}) => {
810
const {run} = props;
911
const skip = isHiddenAssetGroupJob(run.pipelineName);
1012
const queryResult = useQuery<RunAssetChecksQuery, RunAssetChecksQueryVariables>(

js_modules/dagster-ui/packages/ui-core/src/runs/RunAssetTags.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ import {RunAssetsQuery, RunAssetsQueryVariables} from './types/RunAssetTags.type
77
import {RunFragment} from './types/RunFragments.types';
88
import {isHiddenAssetGroupJob} from '../asset-graph/Utils';
99

10-
export const RunAssetTags = (props: {run: RunFragment}) => {
10+
export const RunAssetTags = (props: {
11+
run: Pick<RunFragment, 'id' | 'stepKeysToExecute' | 'pipelineName' | 'assetSelection'>;
12+
}) => {
1113
const {run} = props;
1214
const skip = isHiddenAssetGroupJob(run.pipelineName);
1315
const queryResult = useQuery<RunAssetsQuery, RunAssetsQueryVariables>(RUN_ASSETS_QUERY, {

js_modules/dagster-ui/packages/ui-core/src/runs/RunHeaderActions.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {Button, Group, Icon, Menu, MenuItem, Popover, Tooltip} from '@dagster-io/ui-components';
22
import {useContext, useState} from 'react';
33
import {useHistory} from 'react-router-dom';
4+
import {AISummaryForRunMenuItem} from 'shared/runs/AISummaryForRunMenuItem.oss';
45
import {RunAlertNotifications} from 'shared/runs/RunAlertNotifications.oss';
56
import {RunMetricsDialog} from 'shared/runs/RunMetricsDialog.oss';
67

@@ -98,6 +99,7 @@ export const RunHeaderActions = ({run, isJob}: {run: RunFragment; isJob: boolean
9899
<Menu>
99100
{!isExternalRun(run) ? (
100101
<>
102+
<AISummaryForRunMenuItem run={run} />
101103
<Tooltip
102104
content="Loadable in dagster-webserver-debug"
103105
position="left"

0 commit comments

Comments
 (0)