Skip to content

feat(site): support icon and description in preset #19063

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

ssncferreira
Copy link
Contributor

@ssncferreira ssncferreira commented Jul 28, 2025

Description

This PR updates the CreateWorkspacePageView to use the Combobox React component instead of SelectFilter for the Preset selection.

Changes

  • Updated CreateWorkspacePageView to use the Combobox component in place of SelectFilter.
  • Modified the Combobox component to render preset icons using ExternalImage instead of Avatar.
Screenshot 2025-07-29 at 12 27 14 Screenshot 2025-07-29 at 12 27 21

Follow-up from: #18977

@ssncferreira ssncferreira changed the title feat: UI create workspace page with preset's icon and description feat(site): support icon and description in preset Jul 28, 2025
@bpmct bpmct requested a review from Copilot July 28, 2025 19:22
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the workspace creation UI to support icon and description display for presets by replacing the SelectFilter component with the more feature-rich Combobox component.

  • Replaces SelectFilter with Combobox in the workspace creation form
  • Updates preset option structure to include icon and description fields
  • Modifies Combobox to render preset icons using ExternalImage instead of Avatar

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
site/src/pages/CreateWorkspacePage/CreateWorkspacePageView.tsx Replaces SelectFilter with Combobox and updates preset options to include icon/description
site/src/components/Combobox/Combobox.tsx Updates icon rendering to use ExternalImage instead of Avatar

@ssncferreira ssncferreira marked this pull request as ready for review July 29, 2025 09:21
@ssncferreira ssncferreira requested a review from jaaydenh July 29, 2025 09:22
@@ -103,7 +103,8 @@ export const SearchAndFilter: Story = {
screen.queryByRole("option", { name: "Kotlin" }),
).not.toBeInTheDocument();
});
await userEvent.click(screen.getByRole("option", { name: "Rust" }));
// Accessible name includes both image alt text and text content: "Rust Rust"
await userEvent.click(screen.getByRole("option", { name: "Rust Rust" }));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we changed the icon image to be an ExternalImage with alt={option.displayName} https://github.com/coder/coder/pull/19063/files#diff-f7c0d4d4c43b6dd17458ff44a1a0dfdccfae367b09ffe41fdbe09c48c151e466R126
The name includes both the image alt text (Rust) + the text content (Rust). Let me know if this is ok, or if there is a better way to filter out this element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy