From 7a8d8d2f86ec048d2cae5623f4307ed6a3cee83c Mon Sep 17 00:00:00 2001 From: Jake Howell Date: Wed, 28 Jan 2026 18:51:22 +1100 Subject: [PATCH] feat: add icon and description to `preset` dropdown (#21694) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #20598 This pull-request implements a very basic change to also render the `icon` of the `Preset` when we've specifically defined one within the template. Furthermore, theres a `ⓘ` icon with a description. ### Preview CleanShot 2026-01-27 at 20 15 29@2x --- .../modules/tasks/TaskPrompt/TaskPrompt.tsx | 38 ++++++++++++++++--- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/site/src/modules/tasks/TaskPrompt/TaskPrompt.tsx b/site/src/modules/tasks/TaskPrompt/TaskPrompt.tsx index 7580963eef..7f854dd831 100644 --- a/site/src/modules/tasks/TaskPrompt/TaskPrompt.tsx +++ b/site/src/modules/tasks/TaskPrompt/TaskPrompt.tsx @@ -27,7 +27,7 @@ import { } from "components/Tooltip/Tooltip"; import { useAuthenticated } from "hooks/useAuthenticated"; import { useExternalAuth } from "hooks/useExternalAuth"; -import { ArrowUpIcon, RedoIcon, RotateCcwIcon } from "lucide-react"; +import { ArrowUpIcon, InfoIcon, RedoIcon, RotateCcwIcon } from "lucide-react"; import { type FC, useEffect, useState } from "react"; import { useMutation, useQuery, useQueryClient } from "react-query"; import TextareaAutosize, { @@ -294,7 +294,7 @@ const CreateTaskForm: FC = ({ templates, onSuccess }) => { )} -
+
@@ -310,15 +310,43 @@ const CreateTaskForm: FC = ({ templates, onSuccess }) => { value={selectedPresetId} onValueChange={setSelectedPresetId} > - + {presets?.toSorted(sortByDefault).map((preset) => ( - - + + {preset.Icon && ( + {preset.Name} + )} + {preset.Name} {preset.Default && "(Default)"} + {preset.Description && ( + + + + + + {preset.Description} + + + )} ))}