Skip to content

Commit a5af98a

Browse files
authored
feat(ui): add strategy icons to strategy filter dropdown (#136)
1 parent 82e4419 commit a5af98a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ui/src/components/runs/RunFilters.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Listbox, ListboxButton, ListboxOption, ListboxOptions } from '@headlessui/react'
22
import clsx from 'clsx'
33
import { JDenticon } from '@/components/shared/JDenticon'
4+
import { StrategyIcon } from '@/components/shared/StrategyIcon'
45

56
export type TestStatusFilter = 'all' | 'passing' | 'failing' | 'timeout' | 'cancelled'
67

@@ -119,7 +120,7 @@ export function RunFilters({
119120
{ value: 'cancelled', label: 'Cancelled' },
120121
]
121122
const suiteOptions = suites ? [{ value: '' as const, label: 'All suites' }, ...suites.map((s) => ({ value: s.hash, label: s.name ? `${s.name} (${s.hash.slice(0, 4)})` : s.hash, icon: <JDenticon value={s.hash} size={16} /> }))] : []
122-
const strategyOptions = strategies ? [{ value: '' as const, label: 'All strategies' }, ...strategies.map((s) => ({ value: s, label: s }))] : []
123+
const strategyOptions = strategies ? [{ value: '' as const, label: 'All strategies' }, ...strategies.map((s) => ({ value: s, label: s, icon: <StrategyIcon strategy={s} /> }))] : []
123124

124125
return (
125126
<div className="flex flex-wrap items-center gap-4">

0 commit comments

Comments
 (0)