-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat: Add search functionality to settings page (#5983) #5984
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
base: main
Are you sure you want to change the base?
Conversation
- Add missing header search translations for all 17 locales - Fix regex escaping in highlightText function to prevent regex injection - Add test for regex special character handling - Address ellipsis-dev review comments from PR RooCodeInc#5984
- Replace string.includes() with fzf fuzzy search for better pattern matching - Add comprehensive tests for search utilities and component interactions - Ensure consistent search behavior across settings page Addresses PR RooCodeInc#5984 review feedback: - Pattern consistency with established fuzzy search approach - Comprehensive test coverage for new functionality - Maintains existing inline styles for VSCode theme compatibility
Enhanced Settings Search with Scroll-to-Setting FunctionalityI have successfully implemented a significant improvement to the settings search feature that addresses the core usability issue where search results would only navigate to the correct tab without scrolling to the specific setting. Key Improvements ImplementedScroll-to-Setting Navigation
UI/UX Enhancements
Technical Implementation DetailsData Attribute Strategy
Core Functionality
Files Modified
Quality AssuranceTest Coverage
Code Quality
Edge Case Handling
User Experience ImpactThis enhancement significantly improves the discoverability and usability of the settings interface. Users can now efficiently locate specific settings through search without the additional manual scrolling that was previously required. The visual feedback ensures users understand exactly which setting was targeted, reducing confusion and improving overall workflow efficiency. |
Hey @SannidhyaSah, The implementation looks great, however I noticed this: ![]() Is there a way to give this a nice description like the rest of the elements? Also there's a merge conflict, can you take a look? Thank you! |
…ighting - Add SearchHighlight component for highlighting search terms - Add SettingsSearchDropdown component with search input and results - Add search utilities for filtering and highlighting settings - Update all settings components to support search highlighting - Add comprehensive test coverage for search functionality - Update localization files for search feature across all languages - Integrate search functionality into main SettingsView
f9b4912
to
42c1873
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @SannidhyaSah I noticed some styling issues on this branch:
Here's how the settings look normally:

Here's how they look on this branch:

Can you take a look?
}) | ||
|
||
// Add a highlight animation to draw attention | ||
element.classList.add("search-highlight") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The class name search-highlight
doesn't match the CSS definition. The CSS file defines setting-highlight
(see webview-ui/src/index.css
lines 499-502). This mismatch will prevent the highlight animation from working when users click on search results.
element.classList.add("search-highlight") | |
element.classList.add("setting-highlight") |
* @param settingId - The ID of the setting to scroll to | ||
* @returns true if the element was found and scrolled to, false otherwise | ||
*/ | ||
export const scrollToSetting = (settingId: string): boolean => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that the scrollToSetting
function is duplicated here and in scrollToSetting.ts
. This duplication could lead to maintenance issues if one is updated without the other. Could we consolidate these into a single location?
Since SettingsView.tsx
imports from scrollToSetting.ts
, perhaps we could remove this duplicate from searchUtils.ts
and have any components that need it import from the dedicated file instead?
Related GitHub Issue
Closes: #5983
Roo Code Task Context (Optional)
No Roo Code task context for this PR
Description
This PR implements a comprehensive search functionality for the settings page to address the issue of having too many settings (11 sections) that are difficult to navigate.
Key implementation details:
Architecture decisions:
SETTINGS_SEARCH_CONFIG
) for easy maintenance and adding new settingssearchUtils.ts
for reusabilitySettingsSearchDropdown
,SearchHighlight
) following existing patternsTest Procedure
Automated Testing:
cd webview-ui && npx vitest src/components/settings/__tests__/SettingsSearchDropdown.spec.tsx
(8 tests)cd webview-ui && npx vitest src/components/settings/__tests__/searchUtils.spec.ts
(12 tests)cd webview-ui && npx vitest src/components/settings/__tests__/SearchHighlight.spec.tsx
(12 tests)Manual Testing Steps:
Testing Environment:
Pre-Submission Checklist
Screenshots / Videos
Documentation Updates
Additional Notes
Code Quality Notes:
Performance Considerations:
Get in Touch
@ Lews (Discord)
Important
Adds search functionality to the settings page with a search bar, dropdown results, and keyboard navigation support.
SettingsView.tsx
with dropdown results grouped by section.searchUtils.ts
to search across labels, descriptions, and keywords.SettingsSearchDropdown
component inSettingsSearchDropdown.tsx
for search UI.SearchHighlight
andSettingHighlightWrapper
inSearchHighlight.tsx
for highlighting search terms.SettingsSearchDropdown
,SearchHighlight
, andsearchUtils
in respective__tests__
directories.settings.json
for new search-related translations.This description was created by
for 193f873. You can customize this summary. It will automatically update as commits are pushed.