From aee4c8fdd7b26d70d542e3f95dd775215a026403 Mon Sep 17 00:00:00 2001 From: Gildas Garcia <1122076+djhi@users.noreply.github.com> Date: Tue, 5 May 2026 19:24:58 +0200 Subject: [PATCH] chore: migrate `Input` usages to Shadcn component in database screens/components (#45600) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Screenshots ### Extensions search input Before: image After: image ### Triggers search input Before: image After: image ### Hooks search input Before: image After: image ### Backups - restore to new project dialog Before: image After: image ## Summary by CodeRabbit * **Refactor** * Standardized search inputs across database interfaces by consolidating into a grouped input pattern for consistent behavior and keyboard focus. * **Style** * Improved layout of the database creation dialog’s password field, including visible reveal control and relocated strength indicator for clearer form presentation. --------- Co-authored-by: Ali Waseem --- .../CreateNewProjectDialog.tsx | 24 +++++++------ .../Database/Extensions/Extensions.tsx | 31 +++++++++------- .../Database/Hooks/HooksList/HooksList.tsx | 21 ++++++----- .../Triggers/TriggersList/TriggersList.tsx | 35 +++++++++++++------ 4 files changed, 67 insertions(+), 44 deletions(-) diff --git a/apps/studio/components/interfaces/Database/Backups/RestoreToNewProject/CreateNewProjectDialog.tsx b/apps/studio/components/interfaces/Database/Backups/RestoreToNewProject/CreateNewProjectDialog.tsx index 95c017c379..d97de08f94 100644 --- a/apps/studio/components/interfaces/Database/Backups/RestoreToNewProject/CreateNewProjectDialog.tsx +++ b/apps/studio/components/interfaces/Database/Backups/RestoreToNewProject/CreateNewProjectDialog.tsx @@ -14,9 +14,9 @@ import { Form, FormControl, FormField, - Input, Input_Shadcn_, } from 'ui' +import { Input } from 'ui-patterns/DataInputs/Input' import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout' import { z } from 'zod' @@ -149,15 +149,25 @@ export const CreateNewProjectDialog = ({ control={form.control} name="password" render={({ field }) => ( - + + } + > 0} + reveal onChange={(e) => { const value = e.target.value field.onChange(value) @@ -166,14 +176,6 @@ export const CreateNewProjectDialog = ({ setPasswordStrengthMessage('') } else checkPasswordStrength(value) }} - descriptionText={ - - } /> diff --git a/apps/studio/components/interfaces/Database/Extensions/Extensions.tsx b/apps/studio/components/interfaces/Database/Extensions/Extensions.tsx index 0ea60b60e9..98aefe8c6f 100644 --- a/apps/studio/components/interfaces/Database/Extensions/Extensions.tsx +++ b/apps/studio/components/interfaces/Database/Extensions/Extensions.tsx @@ -5,7 +5,9 @@ import { AlertCircle, Search } from 'lucide-react' import { useEffect, useRef, useState } from 'react' import { Card, - Input, + InputGroup, + InputGroupAddon, + InputGroupInput, ShadowScrollArea, Table, TableBody, @@ -79,16 +81,19 @@ export const Extensions = () => { return ( <>
- setFilterString(e.target.value)} - onKeyDown={onSearchInputEscape(filterString, setFilterString)} - className="w-52" - icon={} - /> + + setFilterString(e.target.value)} + onKeyDown={onSearchInputEscape(filterString, setFilterString)} + /> + + + +
{isPermissionsLoaded && !canUpdateExtensions && ( @@ -112,8 +117,8 @@ export const Extensions = () => { Description Used by Links - {/* - [Joshen] All these classes are just to make the last column sticky + {/* + [Joshen] All these classes are just to make the last column sticky I reckon we can pull these out into the Table component where we can declare sticky columns via props, but we can do that if we start to have more tables in the dashboard with sticky columns diff --git a/apps/studio/components/interfaces/Database/Hooks/HooksList/HooksList.tsx b/apps/studio/components/interfaces/Database/Hooks/HooksList/HooksList.tsx index 0642ca1ee9..6ebbcccba3 100644 --- a/apps/studio/components/interfaces/Database/Hooks/HooksList/HooksList.tsx +++ b/apps/studio/components/interfaces/Database/Hooks/HooksList/HooksList.tsx @@ -3,7 +3,7 @@ import { includes, map as lodashMap, uniqBy } from 'lodash' import { Search } from 'lucide-react' import { parseAsBoolean, useQueryState } from 'nuqs' import { useState } from 'react' -import { Input } from 'ui' +import { InputGroup, InputGroupAddon, InputGroupInput } from 'ui' import { GenericSkeletonLoader } from 'ui-patterns/ShimmeringLoader' import { HooksListEmpty } from './HooksListEmpty' @@ -47,14 +47,17 @@ export const HooksList = () => { return (
- } - value={filterString} - className="w-52" - onChange={(e) => setFilterString(e.target.value)} - /> + + setFilterString(e.target.value)} + /> + + + +
- } - value={filterString} - className="w-full lg:w-52" - onChange={(e) => setFilterString(e.target.value)} - onKeyDown={onSearchInputEscape(filterString, setFilterString)} - /> + + setFilterString(e.target.value)} + onKeyDown={onSearchInputEscape(filterString, setFilterString)} + /> + + + + ({ label: type, value: type }))}