refactor(site): migrate WorkspacesButton to Combobox - #27723
Conversation
| // Cap the list to the popover's available height minus the search | ||
| // input and footer. A nested max-height (e.g. 380px) larger than | ||
| // the remaining space clips the footer on short viewports. | ||
| style={{ | ||
| maxHeight: | ||
| "min(380px, calc(var(--radix-popper-available-height) - 8rem))", | ||
| }} |
There was a problem hiding this comment.
This is a bit of a hack, feel free to push back 😛
There was a problem hiding this comment.
I want to push back! but I honestly can't think of a better way to accomplish this
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0b4bb9d5b1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <Combobox | ||
| onValueChange={(templateId) => { |
There was a problem hiding this comment.
Add interaction coverage for the migrated picker
This replaces the template links with a searchable Combobox and moves navigation into onValueChange, but the commit does not add or update a Storybook story, and the existing WorkspacesPage stories never open or select from this picker. Add a play interaction that opens the menu, searches, selects a template, and verifies navigation so the new keyboard and filtering behavior is exercised as required by FE1.
AGENTS.md reference: site/AGENTS.md:L9-L10
Useful? React with 👍 / 👎.
| const templateLink = getLink( | ||
| linkToTemplate(template.organization_name, template.name), | ||
| function sortTemplatesByUsersDesc(templates: readonly Template[]) { | ||
| return [...templates].sort( |
There was a problem hiding this comment.
nit: wanna use toSorted() here?
Migrates the New workspace template picker off MUI Link, Emotion
css, and the custom Popover/MenuSearch stack onto the shared Combobox used by filters.Selecting a template still navigates to create a workspace. The list max-height uses the popover's available height so the footer stays visible and scrolling works on short viewports.