From 2ede7785509a95457d4848f348826d148275089a Mon Sep 17 00:00:00 2001 From: bengotow Date: Fri, 3 Jan 2025 20:26:04 -0600 Subject: [PATCH] =?UTF-8?q?Josh=20feedback:=20Move=20the=20=E2=80=9Cpartit?= =?UTF-8?q?ion=E2=80=9D=20tag=20to=20the=20target=20area?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [INTERNAL_BRANCH=bengotow-2024-12/FE-715] --- .../packages/ui-core/src/runs/AssetTagCollections.tsx | 4 +++- .../packages/ui-core/src/runs/RunRowTags.tsx | 7 ++++++- .../packages/ui-core/src/runs/RunTargetLink.tsx | 3 +++ .../packages/ui-core/src/runs/RunsFeedRow.tsx | 10 ++++++++++ 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/AssetTagCollections.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/AssetTagCollections.tsx index 803ee593749e0..4e60019225b93 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/AssetTagCollections.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/AssetTagCollections.tsx @@ -81,6 +81,7 @@ interface AssetKeyTagCollectionProps { assetKeys: AssetKey[] | null; dialogTitle?: string; useTags?: boolean; + extraTags?: React.ReactNode[]; maxRows?: number; } @@ -156,7 +157,7 @@ export function useAdjustChildVisibilityToFill(moreLabelFn: (count: number) => s } export const AssetKeyTagCollection = React.memo((props: AssetKeyTagCollectionProps) => { - const {assetKeys, useTags, maxRows, dialogTitle = 'Assets in run'} = props; + const {assetKeys, useTags, extraTags, maxRows, dialogTitle = 'Assets in run'} = props; const count = assetKeys?.length ?? 0; const rendered = maxRows ? 10 : count === 1 ? 1 : 0; @@ -198,6 +199,7 @@ export const AssetKeyTagCollection = React.memo((props: AssetKeyTagCollectionPro overflow: 'hidden', }} > + {extraTags} {slicedSortedAssetKeys.map((assetKey) => ( // Outer span ensures the popover target is in the right place if the // parent is a flexbox. diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/RunRowTags.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/RunRowTags.tsx index 79f0f97d4effe..9353fdd482468 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/RunRowTags.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/RunRowTags.tsx @@ -25,12 +25,14 @@ export const RunRowTags = ({ isHovered, isJob, hideTags, + hidePartition, }: { run: Pick; onAddTag?: (token: RunFilterToken) => void; isHovered: boolean; isJob: boolean; hideTags?: string[]; + hidePartition?: boolean; }) => { const {isTagPinned, onToggleTagPin} = useTagPinning(); const [showRunTags, setShowRunTags] = React.useState(false); @@ -66,12 +68,15 @@ export const RunRowTags = ({ if (hideTags?.includes(tag.key)) { return; } + if (hidePartition && tag.key === DagsterTag.Partition) { + return; + } if (tag.pinned) { tags.push(tag); } }); return tags; - }, [allTagsWithPinned, hideTags, run.assetSelection?.length]); + }, [allTagsWithPinned, hideTags, hidePartition, run.assetSelection?.length]); return ( <> diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/RunTargetLink.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/RunTargetLink.tsx index 537f3a46efa6f..30934c3ec46a1 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/RunTargetLink.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/RunTargetLink.tsx @@ -13,6 +13,7 @@ export const RunTargetLink = ({ isJob, repoAddress, useTags, + extraTags, }: { isJob: boolean; run: Pick< @@ -21,6 +22,7 @@ export const RunTargetLink = ({ >; repoAddress: RepoAddress | null; useTags: boolean; + extraTags?: React.ReactNode[]; }) => { const assetKeys = React.useMemo(() => { return isHiddenAssetGroupJob(run.pipelineName) ? assetKeysForRun(run) : null; @@ -32,6 +34,7 @@ export const RunTargetLink = ({ t.key === DagsterTag.Partition) : null; + return ( {entry.runStatus === RunStatus.QUEUED ? ( @@ -148,6 +153,11 @@ export const RunsFeedRow = ({ run={{...entry, pipelineName: entry.jobName!, stepKeysToExecute: []}} repoAddress={repoAddress} useTags={true} + extraTags={ + partitionTag + ? [] + : [] + } /> ) : (