Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions dogfood/coder/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
coder = {
source = "coder/coder"
version = "~> 2.5"
version = "~> 2.9"
}
docker = {
source = "kreuzwerker/docker"
Expand Down Expand Up @@ -41,7 +41,9 @@ locals {
}

data "coder_workspace_preset" "cpt" {
name = "Cape Town"
name = "Cape Town"
description = "Development workspace hosted in South Africa with 1 prebuild instance"
icon = "/emojis/1f1ff-1f1e6.png"
parameters = {
(data.coder_parameter.region.name) = "za-cpt"
(data.coder_parameter.image_type.name) = "codercom/oss-dogfood:latest"
Expand All @@ -56,7 +58,9 @@ data "coder_workspace_preset" "cpt" {
}

data "coder_workspace_preset" "pittsburgh" {
name = "Pittsburgh"
name = "Pittsburgh"
description = "Development workspace hosted in United States with 2 prebuild instances"
icon = "/emojis/1f1fa-1f1f8.png"
parameters = {
(data.coder_parameter.region.name) = "us-pittsburgh"
(data.coder_parameter.image_type.name) = "codercom/oss-dogfood:latest"
Expand All @@ -71,7 +75,9 @@ data "coder_workspace_preset" "pittsburgh" {
}

data "coder_workspace_preset" "falkenstein" {
name = "Falkenstein"
name = "Falkenstein"
description = "Development workspace hosted in Europe with 1 prebuild instance"
icon = "/emojis/1f1ea-1f1fa.png"
parameters = {
(data.coder_parameter.region.name) = "eu-helsinki"
(data.coder_parameter.image_type.name) = "codercom/oss-dogfood:latest"
Expand All @@ -86,7 +92,9 @@ data "coder_workspace_preset" "falkenstein" {
}

data "coder_workspace_preset" "sydney" {
name = "Sydney"
name = "Sydney"
description = "Development workspace hosted in Australia with 1 prebuild instance"
icon = "/emojis/1f1e6-1f1fa.png"
parameters = {
(data.coder_parameter.region.name) = "ap-sydney"
(data.coder_parameter.image_type.name) = "codercom/oss-dogfood:latest"
Expand All @@ -101,7 +109,9 @@ data "coder_workspace_preset" "sydney" {
}

data "coder_workspace_preset" "saopaulo" {
name = "São Paulo"
name = "São Paulo"
description = "Development workspace hosted in Brazil with 1 prebuild instance"
icon = "/emojis/1f1e7-1f1f7.png"
parameters = {
(data.coder_parameter.region.name) = "sa-saopaulo"
(data.coder_parameter.image_type.name) = "codercom/oss-dogfood:latest"
Expand Down
9 changes: 3 additions & 6 deletions site/src/components/Combobox/Combobox.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ export const SearchAndFilter: Story = {
screen.queryByRole("option", { name: "Kotlin" }),
).not.toBeInTheDocument();
});
// Accessible name includes both image alt text and text content: "Rust Rust"
await userEvent.click(screen.getByRole("option", { name: "Rust Rust" }));
await userEvent.click(screen.getByRole("option", { name: "Rust" }));
},
};

Expand Down Expand Up @@ -138,11 +137,9 @@ export const ClearSelectedOption: Story = {
await userEvent.click(canvas.getByRole("button"));
// const goOption = screen.getByText("Go");
// First select an option
// Accessible name includes both image alt text and text content: "Go Go"
await userEvent.click(await screen.findByRole("option", { name: "Go Go" }));
await userEvent.click(await screen.findByRole("option", { name: "Go" }));
// Then clear it by selecting it again
// Accessible name includes both image alt text and text content: "Go Go"
await userEvent.click(await screen.findByRole("option", { name: "Go Go" }));
await userEvent.click(await screen.findByRole("option", { name: "Go" }));

await waitFor(() =>
expect(canvas.getByRole("button")).toHaveTextContent("Select option"),
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/Combobox/Combobox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const Combobox: FC<ComboboxProps> = ({
<ExternalImage
className="w-4 h-4 object-contain"
src={option.icon}
alt={option.displayName}
alt=""
/>
) : (
/* Placeholder for missing icon to maintain layout consistency */
Expand Down
82 changes: 40 additions & 42 deletions site/src/pages/TasksPage/TasksPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -386,55 +386,53 @@ const TaskForm: FC<TaskFormProps> = ({ templates, onSuccess }) => {
</Select>
</div>

<div className="flex flex-col gap-1">
<label
htmlFor="presetID"
className="text-xs font-medium text-content-primary"
>
Preset
</label>
{isLoadingPresets ? (
<Skeleton variant="rounded" width={320} height={32} />
) : (
<Select
key={`preset-select-${selectedTemplate.active_version_id}`}
name="presetID"
value={selectedPresetId || undefined}
onValueChange={(value) => setSelectedPresetId(value || null)}
disabled={!presetsData || presetsData.length === 0}
{isLoadingPresets ? (
<div className="flex flex-col gap-1">
<label
htmlFor="presetID"
className="text-xs font-medium text-content-primary"
>
<SelectTrigger
id="presetID"
className="w-80 text-xs [&_svg]:size-icon-xs border-0 bg-surface-secondary h-8 px-3"
Preset
</label>
<Skeleton variant="rounded" width={320} height={32} />
</div>
) : (
presetsData &&
presetsData.length > 0 && (
<div className="flex flex-col gap-1">
<label
htmlFor="presetID"
className="text-xs font-medium text-content-primary"
>
<SelectValue
placeholder={
!presetsData || presetsData.length === 0
? "None"
: "Select a preset"
}
/>
</SelectTrigger>
<SelectContent>
{presetsData && presetsData.length > 0 ? (
sortedPresets(presetsData).map((preset) => (
Preset
</label>
<Select
key={`preset-select-${selectedTemplate.active_version_id}`}
name="presetID"
value={selectedPresetId || undefined}
onValueChange={(value) =>
setSelectedPresetId(value || null)
}
>
<SelectTrigger
id="presetID"
className="w-80 text-xs [&_svg]:size-icon-xs border-0 bg-surface-secondary h-8 px-3"
>
<SelectValue placeholder="Select a preset" />
</SelectTrigger>
<SelectContent>
{sortedPresets(presetsData).map((preset) => (
<SelectItem value={preset.ID} key={preset.ID}>
<span className="overflow-hidden text-ellipsis block">
{preset.Name} {preset.Default && "(Default)"}
</span>
</SelectItem>
))
) : (
<SelectItem value="none" disabled>
<span className="overflow-hidden text-ellipsis block">
No presets available
</span>
</SelectItem>
)}
</SelectContent>
</Select>
)}
</div>
))}
</SelectContent>
</Select>
</div>
)
)}
</div>

<div className="flex items-center gap-2">
Expand Down
Loading