From a50737f8e125c560258946bcabecae2c8509a370 Mon Sep 17 00:00:00 2001 From: Thiago Dallacqua Date: Thu, 31 Oct 2024 17:03:31 -0300 Subject: [PATCH] chore ran lint --- .../react/src/components/ColumnPickerMenu.tsx | 2 +- webui/react/src/pages/FlatRuns/FlatRuns.tsx | 80 +++++++++---------- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/webui/react/src/components/ColumnPickerMenu.tsx b/webui/react/src/components/ColumnPickerMenu.tsx index 6838723479b..ec0735cf07f 100644 --- a/webui/react/src/components/ColumnPickerMenu.tsx +++ b/webui/react/src/components/ColumnPickerMenu.tsx @@ -116,7 +116,7 @@ const ColumnPickerTab: React.FC = ({ : [...new Set([...columnState, ...filteredColumns.map((col) => formatColumnKey(col))])]; const pinnedCount = allFilteredColumnsChecked ? // If uncheck something pinned, reduce the pinnedColumnsCount - newColumns.filter((col) => columnState.indexOf(col) < pinnedColumnsCount).length + newColumns.filter((col) => columnState.indexOf(col) < pinnedColumnsCount).length : pinnedColumnsCount; onVisibleColumnChange?.(newColumns, pinnedCount); diff --git a/webui/react/src/pages/FlatRuns/FlatRuns.tsx b/webui/react/src/pages/FlatRuns/FlatRuns.tsx index 81210441468..6e6d3d5fb90 100644 --- a/webui/react/src/pages/FlatRuns/FlatRuns.tsx +++ b/webui/react/src/pages/FlatRuns/FlatRuns.tsx @@ -379,8 +379,8 @@ const FlatRuns: React.FC = ({ projectId, workspaceId, searchId }) => { columnDefKey, currentColumn.displayName || currentColumn.column, settings.columnWidths[columnDefKey] ?? - defaultColumnWidths[columnDefKey as RunColumn] ?? - MIN_COLUMN_WIDTH, + defaultColumnWidths[columnDefKey as RunColumn] ?? + MIN_COLUMN_WIDTH, dataPath, { max: heatmap.max, @@ -392,8 +392,8 @@ const FlatRuns: React.FC = ({ projectId, workspaceId, searchId }) => { columnDefKey, currentColumn.displayName || currentColumn.column, settings.columnWidths[columnDefKey] ?? - defaultColumnWidths[columnDefKey as RunColumn] ?? - MIN_COLUMN_WIDTH, + defaultColumnWidths[columnDefKey as RunColumn] ?? + MIN_COLUMN_WIDTH, dataPath, undefined, ); @@ -405,8 +405,8 @@ const FlatRuns: React.FC = ({ projectId, workspaceId, searchId }) => { columnDefKey, currentColumn.displayName || currentColumn.column, settings.columnWidths[columnDefKey] ?? - defaultColumnWidths[columnDefKey as RunColumn] ?? - MIN_COLUMN_WIDTH, + defaultColumnWidths[columnDefKey as RunColumn] ?? + MIN_COLUMN_WIDTH, dataPath, ); break; @@ -415,8 +415,8 @@ const FlatRuns: React.FC = ({ projectId, workspaceId, searchId }) => { columnDefKey, currentColumn.displayName || currentColumn.column, settings.columnWidths[columnDefKey] ?? - defaultColumnWidths[columnDefKey as RunColumn] ?? - MIN_COLUMN_WIDTH, + defaultColumnWidths[columnDefKey as RunColumn] ?? + MIN_COLUMN_WIDTH, dataPath, ); break; @@ -427,8 +427,8 @@ const FlatRuns: React.FC = ({ projectId, workspaceId, searchId }) => { columnDefKey, currentColumn.displayName || currentColumn.column, settings.columnWidths[columnDefKey] ?? - defaultColumnWidths[columnDefKey as RunColumn] ?? - MIN_COLUMN_WIDTH, + defaultColumnWidths[columnDefKey as RunColumn] ?? + MIN_COLUMN_WIDTH, dataPath, ); } @@ -441,9 +441,9 @@ const FlatRuns: React.FC = ({ projectId, workspaceId, searchId }) => { settings.columnWidths[currentColumn.column], heatmap && settings.heatmapOn && !settings.heatmapSkipped.includes(currentColumn.column) ? { - max: heatmap.max, - min: heatmap.min, - } + max: heatmap.max, + min: heatmap.min, + } : undefined, ); } @@ -817,32 +817,32 @@ const FlatRuns: React.FC = ({ projectId, workspaceId, searchId }) => { ? null : !isPinned ? { - icon: , - key: 'pin', - label: 'Pin column', - onClick: () => { - const newColumnsOrder = columnsIfLoaded.filter((c) => c !== columnId); - newColumnsOrder.splice(settings.pinnedColumnsCount, 0, columnId); - handleColumnsOrderChange( - newColumnsOrder, - Math.min(settings.pinnedColumnsCount + 1, columnsIfLoaded.length), - ); - }, - } + icon: , + key: 'pin', + label: 'Pin column', + onClick: () => { + const newColumnsOrder = columnsIfLoaded.filter((c) => c !== columnId); + newColumnsOrder.splice(settings.pinnedColumnsCount, 0, columnId); + handleColumnsOrderChange( + newColumnsOrder, + Math.min(settings.pinnedColumnsCount + 1, columnsIfLoaded.length), + ); + }, + } : { - disabled: settings.pinnedColumnsCount <= 1, - icon: , - key: 'unpin', - label: 'Unpin column', - onClick: () => { - const newColumnsOrder = columnsIfLoaded.filter((c) => c !== columnId); - newColumnsOrder.splice(settings.pinnedColumnsCount - 1, 0, columnId); - handleColumnsOrderChange( - newColumnsOrder, - Math.max(settings.pinnedColumnsCount - 1, 0), - ); + disabled: settings.pinnedColumnsCount <= 1, + icon: , + key: 'unpin', + label: 'Unpin column', + onClick: () => { + const newColumnsOrder = columnsIfLoaded.filter((c) => c !== columnId); + newColumnsOrder.splice(settings.pinnedColumnsCount - 1, 0, columnId); + handleColumnsOrderChange( + newColumnsOrder, + Math.max(settings.pinnedColumnsCount - 1, 0), + ); + }, }, - }, { icon: , key: 'hide', @@ -871,9 +871,9 @@ const FlatRuns: React.FC = ({ projectId, workspaceId, searchId }) => { sortCount === 0 ? [] : [ - { type: 'divider' as const }, - ...sortMenuItemsForColumn(column, sorts, handleSortChange), - ]; + { type: 'divider' as const }, + ...sortMenuItemsForColumn(column, sorts, handleSortChange), + ]; items.push(...sortMenuItems); }