-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Conversation
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
daniel-lxs
left a comment
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?
|
The PR has been put on hold until #6599 issue is fixed. Once done a NEW pr will be created. |

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.tsfor 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.tsxwith dropdown results grouped by section.searchUtils.tsto search across labels, descriptions, and keywords.SettingsSearchDropdowncomponent inSettingsSearchDropdown.tsxfor search UI.SearchHighlightandSettingHighlightWrapperinSearchHighlight.tsxfor highlighting search terms.SettingsSearchDropdown,SearchHighlight, andsearchUtilsin respective__tests__directories.settings.jsonfor new search-related translations.This description was created by
for 193f8737dbbb7f5749adfeb4059bba53a2ce96d1. You can customize this summary. It will automatically update as commits are pushed.