pierrejeambrun commented on code in PR #55082:
URL: https://github.com/apache/airflow/pull/55082#discussion_r2315993719
##########
airflow-core/src/airflow/ui/src/layouts/Details/PanelButtons.tsx:
##########
@@ -292,6 +320,64 @@ export const PanelButtons = ({
</Select.Content>
</Select.Positioner>
</Select.Root>
+ <Select.Root
+ // @ts-expect-error The expected option type is
incorrect
+ collection={dagRunTypeOptions}
+ data-testid="run-type-filter"
+ onValueChange={handleRunTypeChange}
+ size="sm"
+ value={[runTypeFilter?.[0] ?? "all"]}
+ >
+
<Select.Label>{translate("common:dagRun.runType")}</Select.Label>
+ <Select.Control>
+ <Select.Trigger>
+ <Select.ValueText>
+ {(runTypeFilter?.[0] ?? "all") === "all"
+ ? translate("dags:filters.allRunTypes")
+ : runTypeFilter?.[0] !== undefined && (
+ <Flex gap={1}>
+ <RunTypeIcon
runType={runTypeFilter[0]} />
+ {translate(
+ dagRunTypeOptions.items.find(
+ (item) => item.value ===
runTypeFilter[0],
+ )?.label ?? "",
+ )}
+ </Flex>
+ )}
+ </Select.ValueText>
+ </Select.Trigger>
+ <Select.IndicatorGroup>
+ <Select.Indicator />
+ </Select.IndicatorGroup>
+ </Select.Control>
+ <Select.Positioner>
+ <Select.Content>
+ {dagRunTypeOptions.items.map((option) => (
+ <Select.Item item={option} key={option.value}>
+ {option.value === "all" ? (
+ translate(option.label)
+ ) : (
+ <Flex gap={1}>
+ <RunTypeIcon runType={option.value as
DagRunType} />
+ {translate(option.label)}
+ </Flex>
+ )}
+ </Select.Item>
+ ))}
+ </Select.Content>
+ </Select.Positioner>
+ </Select.Root>
+ <VStack alignItems="flex-start">
+ <Text fontSize="xs" mb={1}>
+ {translate("common:dagRun.triggeringUser")}
+ </Text>
+ <Input
+ onChange={handleTriggeringUserChange}
+
placeholder={translate("common:filters.triggeringUserPlaceholder")}
+ size="sm"
+ value={triggeringUserFilter ?? ""}
+ />
Review Comment:
I think you can replace this with our own 'searchbox' component which will
give you the `debounce` function out of the box. Here on each key stroke we
make multiple requests, that's not great
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]