From ffe1a0c9ee3209be8add48b3a52de2edd5d4c081 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Fri, 18 Jul 2025 03:06:58 -0700 Subject: [PATCH] feat: add search functionality to configuration table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added search input box that filters by configuration name and description - Real-time filtering as user types with case-insensitive matching - Clear search button (✕) appears when search term is entered - Improved layout with flexbox for search and category controls - Enhanced results messaging: shows "Found X matching settings" when searching - Better empty state messaging with option to clear search - Responsive design with flex-wrap for mobile compatibility 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- docs/src/components/ConfigurationTable.tsx | 139 +++++++++++++++++---- 1 file changed, 116 insertions(+), 23 deletions(-) diff --git a/docs/src/components/ConfigurationTable.tsx b/docs/src/components/ConfigurationTable.tsx index ce065a39010..938daf82b01 100644 --- a/docs/src/components/ConfigurationTable.tsx +++ b/docs/src/components/ConfigurationTable.tsx @@ -91,6 +91,7 @@ const ConfigurationTable: React.FC = ({ const [selectedCategory, setSelectedCategory] = useState( category || 'all', ); + const [searchTerm, setSearchTerm] = useState(''); // Get settings based on selected category const getSettings = (): ConfigSetting[] => { @@ -100,7 +101,17 @@ const ConfigurationTable: React.FC = ({ return configMetadata.by_category[selectedCategory] || []; }; - const settings = getSettings(); + // Filter settings based on search term + const filteredSettings = getSettings().filter(setting => { + if (!searchTerm) return true; + const searchLower = searchTerm.toLowerCase(); + return ( + setting.key.toLowerCase().includes(searchLower) || + setting.description.toLowerCase().includes(searchLower) + ); + }); + + const settings = filteredSettings; const formatDefault = (value: any): string => { if (value === null || value === undefined) return 'None'; @@ -116,29 +127,85 @@ const ConfigurationTable: React.FC = ({ return (
- {/* Category selector */} - {!category && ( -
-