From 0ab54fd63a845637b17a58fcbf8b5613e8cf7c31 Mon Sep 17 00:00:00 2001 From: Danielle Maywood Date: Tue, 10 Feb 2026 16:24:11 +0000 Subject: [PATCH] fix(site): remove overflow-hidden (#22032) Fixes an issue where the outline on the tasks page preset selector was obscured by `overflow-hidden`. --- .../tasks/TaskPrompt/TaskPrompt.stories.tsx | 22 +++++++++++++++++++ .../modules/tasks/TaskPrompt/TaskPrompt.tsx | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/site/src/modules/tasks/TaskPrompt/TaskPrompt.stories.tsx b/site/src/modules/tasks/TaskPrompt/TaskPrompt.stories.tsx index d7f9085748..57eea64ef3 100644 --- a/site/src/modules/tasks/TaskPrompt/TaskPrompt.stories.tsx +++ b/site/src/modules/tasks/TaskPrompt/TaskPrompt.stories.tsx @@ -473,6 +473,28 @@ export const CheckExternalAuthOnChangingVersions: Story = { }, }; +// Regression test introduced in https://github.com/coder/coder/pull/22032 +// A change was introduced that cause the focused selector to be mostly +// hidden due to an introduced `overflow-hidden`. The change wasn't spotted +// in the PR it was introduced as no stories triggered that behavior, so we +// have added one to ensure the behavior doesn't regress. +export const PresetSelectorFocused: Story = { + beforeEach: () => { + spyOn(API, "getTemplateVersionPresets").mockResolvedValue( + MockPresets.map((preset, i) => ({ + ...preset, + Icon: i === 0 ? "/icon/code.svg" : i === 1 ? "/icon/database.svg" : "", + Description: i === 0 ? "For everyday development work" : "", + })), + ); + }, + play: async ({ canvasElement }) => { + const canvas = within(canvasElement); + const presetSelect = await canvas.findByLabelText(/preset/i); + presetSelect.focus(); + }, +}; + export const CheckPresetsWhenChangingTemplate: Story = { args: { templates: [ diff --git a/site/src/modules/tasks/TaskPrompt/TaskPrompt.tsx b/site/src/modules/tasks/TaskPrompt/TaskPrompt.tsx index 6c65144a96..a4dc7df441 100644 --- a/site/src/modules/tasks/TaskPrompt/TaskPrompt.tsx +++ b/site/src/modules/tasks/TaskPrompt/TaskPrompt.tsx @@ -305,7 +305,7 @@ const CreateTaskForm: FC = ({ templates, onSuccess }) => { )} -
+