Skip to content

Conversation

@samhvw8
Copy link
Contributor

@samhvw8 samhvw8 commented Apr 9, 2025

Context

Improve UI UX in chatarea, this pr introduce fuzzy search box into mode & provider profile

Implementation

Using fzf to select-dropbox

ScreenCast

https://www.loom.com/share/5e69ee75da0044aaa41e98d8b13f6b40?sid=0b084a44-d811-4a0f-8a93-f5035fb01510

How to Test

Get in Touch


Important

Implement fuzzy search and dropdown grouping in SelectDropdown using fzf and refactor to use Popover.

  • Behavior:
    • Implements fuzzy search in SelectDropdown using fzf.
    • Groups dropdown options by type, handling separators and shortcuts.
    • Uses Popover instead of DropdownMenu for dropdown rendering.
  • Components:
    • Refactor SelectDropdown in select-dropdown.tsx to use Popover, PopoverContent, and PopoverTrigger.
    • Adds search input and clear functionality in the dropdown.
  • Tests:
    • Update tests in select-dropdown.test.tsx to mock Popover components.
    • Add tests for new functionalities like fuzzy search and option grouping.

This description was created by Ellipsis for af99ea6079c372188fcebe0b420f6c8e866a6534. It will automatically update as commits are pushed.

@changeset-bot
Copy link

changeset-bot bot commented Apr 9, 2025

⚠️ No Changeset found

Latest commit: d8bf63b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. enhancement New feature or request labels Apr 9, 2025
Copy link
Contributor

Choose a reason for hiding this comment

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

The mocks for the Popover and related components force the dropdown to open, but they don’t simulate behavior for different option types (e.g., separators vs. shortcuts). While acceptable as a temporary workaround, consider refining these mocks or adding integration tests to simulate real interactions as per our testing guidelines.

Copy link
Contributor

Choose a reason for hiding this comment

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

The 'X' icon used to clear the search leverages a <div> with an onClick handler. For accessibility, consider replacing it with a <button> element or adding appropriate ARIA roles and tab index to ensure it's keyboard-navigable.

Copy link
Contributor

Choose a reason for hiding this comment

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

The fuzzy search and grouping logic is implemented directly in the component. For improved modularity and testability (per our standards on modular code and reusable utilities), consider extracting the fuzzy search and grouping functionalities into separate helper functions or hooks.

Copy link
Contributor

Choose a reason for hiding this comment

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

The search input lacks an aria-label, which is important for accessibility. Consider adding an aria-label attribute to the input element to improve screen reader support.

Suggested change
<input
<input aria-label="Search input"

@adamhill
Copy link
Contributor

adamhill commented Apr 9, 2025

Nice. I have wanted fuzzy search in our long dropboxes for a while. Thanks for the contribution!

@hannesrudolph hannesrudolph moved this from New to PR [Pre Approval Review] in Roo Code Roadmap Apr 10, 2025
@samhvw8 samhvw8 force-pushed the chatarea-search-bar-provider-profile branch from af99ea6 to d8bf63b Compare April 12, 2025 01:14
Copy link
Collaborator

@mrubens mrubens left a comment

Choose a reason for hiding this comment

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

The focus ring feels too eye-catching to me - can we just leave it the same as the border color?

Screenshot 2025-04-14 at 11 09 01 PM

@mrubens
Copy link
Collaborator

mrubens commented Apr 15, 2025

The focus ring feels too eye-catching to me - can we just leave it the same as the border color?

I think I can do it quickly, one sec

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 15, 2025
@mrubens mrubens merged commit 89107b8 into RooCodeInc:main Apr 15, 2025
12 checks passed
@github-project-automation github-project-automation bot moved this from PR [Pre Approval Review] to Done in Roo Code Roadmap Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants