From c67c893d7eb90e9a20901a5b79e2106dd976e05d Mon Sep 17 00:00:00 2001 From: Thiago Dallacqua Date: Thu, 24 Oct 2024 16:22:39 -0300 Subject: [PATCH] refactor(webui): Update ColumnPickerMenu to use runColumns from FlatRuns (#1234) --- webui/react/src/components/ColumnPickerMenu.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/webui/react/src/components/ColumnPickerMenu.tsx b/webui/react/src/components/ColumnPickerMenu.tsx index ec0735cf07f..b560e1ba8d1 100644 --- a/webui/react/src/components/ColumnPickerMenu.tsx +++ b/webui/react/src/components/ColumnPickerMenu.tsx @@ -11,6 +11,7 @@ import { Loadable } from 'hew/utils/loadable'; import React, { ChangeEvent, useCallback, useMemo, useState } from 'react'; import { FixedSizeList as List } from 'react-window'; +import { runColumns } from 'pages/FlatRuns/columns'; import { V1ColumnType, V1LocationType } from 'services/api-ts-sdk'; import { ProjectColumn } from 'types'; import { ensureArray } from 'utils/data'; @@ -65,8 +66,6 @@ interface ColumnTabProps { onHeatmapSelectionRemove?: (id: string) => void; } -const KNOWN_BOOLEAN_COLUMNS = ['archived', 'isExpMultitrial', 'parentArchived']; - const ColumnPickerTab: React.FC = ({ columnState, compare, @@ -175,7 +174,7 @@ const ColumnPickerTab: React.FC = ({ ({ index, style }: { index: number; style: React.CSSProperties }) => { const col = filteredColumns[index]; const colType = - KNOWN_BOOLEAN_COLUMNS.includes(col.column) && col.type === V1ColumnType.UNSPECIFIED + (runColumns as readonly string[]).includes(col.column) && col.type === V1ColumnType.UNSPECIFIED ? 'BOOLEAN' : removeColumnTypePrefix(col.type); const getColDisplayName = (col: ProjectColumn) => {