Skip to content

Commit

Permalink
[dagit] Do not display the partition_set, step_selection tags on asse…
Browse files Browse the repository at this point in the history
…t group runs (#7953)
  • Loading branch information
bengotow committed May 23, 2022
1 parent cbd7da9 commit 5ae7d32
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const AssetNodeList: React.FC<{
};

const Container = styled(Box)`
height: 112px;
height: 124px;
overflow-x: auto;
width: 100%;
white-space: nowrap;
Expand Down
12 changes: 9 additions & 3 deletions js_modules/dagit/packages/core/src/runs/RunTags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as React from 'react';

import {SharedToaster} from '../app/DomUtils';
import {useCopyToClipboard} from '../app/browser';
import {__ASSET_GROUP_PREFIX} from '../asset-graph/Utils';

import {DagsterTag, RunTag, TagType} from './RunTag';
import {RunFilterToken} from './RunsFilterInput';
Expand Down Expand Up @@ -44,11 +45,16 @@ export const RunTags: React.FC<{
return list;
}, [copy, onSetFilter]);

const sortedTags = React.useMemo(() => {
const displayedTags = React.useMemo(() => {
const priority = [];
const others = [];
for (const tag of tags) {
if (priorityTagSet.has(tag.key)) {
if (
tag.value.startsWith(__ASSET_GROUP_PREFIX) &&
(tag.key === DagsterTag.PartitionSet || tag.key === DagsterTag.StepSelection)
) {
continue;
} else if (priorityTagSet.has(tag.key)) {
priority.push(tag);
} else {
others.push(tag);
Expand All @@ -64,7 +70,7 @@ export const RunTags: React.FC<{
return (
<Box flex={{direction: 'row', wrap: 'wrap', gap: 4}}>
{mode ? <RunTag tag={{key: 'mode', value: mode}} /> : null}
{sortedTags.map((tag, idx) => (
{displayedTags.map((tag, idx) => (
<RunTag tag={tag} key={idx} actions={actions} />
))}
</Box>
Expand Down

0 comments on commit 5ae7d32

Please sign in to comment.