diff --git a/apps/docs/components/ProjectConfigVariables/ProjectConfigVariables.ComboBox.tsx b/apps/docs/components/ProjectConfigVariables/ProjectConfigVariables.ComboBox.tsx index a88c010ebd3..6e16df207ab 100644 --- a/apps/docs/components/ProjectConfigVariables/ProjectConfigVariables.ComboBox.tsx +++ b/apps/docs/components/ProjectConfigVariables/ProjectConfigVariables.ComboBox.tsx @@ -83,10 +83,8 @@ export function ComboBox({ - + ({ onValueChange={setSearch} handleReset={() => setSearch('')} /> - + + {!isLoading && search.length > 0 && options.length === 0 ? `No ${name} found` : ''} + + {isLoading ? (
@@ -125,7 +127,7 @@ export function ComboBox({ ) : ( <> {search.length > 0 && options.length === 0 && ( -

+

No {name}s found based on your search

)} @@ -146,6 +148,7 @@ export function ComboBox({ 'mr-2 h-4 w-4', selectedOption === option.value ? 'opacity-100' : 'opacity-0' )} + aria-hidden /> {option.displayName} diff --git a/apps/docs/components/ProjectConfigVariables/ProjectConfigVariables.tsx b/apps/docs/components/ProjectConfigVariables/ProjectConfigVariables.tsx index 29c0734eba3..53d67ed51b4 100644 --- a/apps/docs/components/ProjectConfigVariables/ProjectConfigVariables.tsx +++ b/apps/docs/components/ProjectConfigVariables/ProjectConfigVariables.tsx @@ -34,7 +34,7 @@ import { useOnLogout } from '~/lib/userAuth' import { LOCAL_STORAGE_KEYS, useIsLoggedIn, useIsUserLoading } from 'common' import { Check, Copy } from 'lucide-react' import Link from 'next/link' -import { useEffect, useMemo, useState } from 'react' +import { useEffect, useId, useMemo, useState } from 'react' import CopyToClipboard from 'react-copy-to-clipboard' import { withErrorBoundary } from 'react-error-boundary' import { Button_Shadcn_ as Button, cn, Input } from 'ui' @@ -303,7 +303,15 @@ function BranchSelector() { ) : null } -function VariableView({ variable, className }: { variable: Variable; className?: string }) { +function VariableView({ + variable, + inputId, + className, +}: { + variable: Variable + inputId: string + className?: string +}) { const isUserLoading = useIsUserLoading() const isLoggedIn = useIsLoggedIn() @@ -397,6 +405,7 @@ function VariableView({ variable, className }: { variable: Variable; className?:
- {copied ? : } + {copied ? : } + + {copied ? `${prettyFormatVariable[variable]} copied` : ''} +
{stateSummary === 'loggedIn.selectedProject.dataError' && (

@@ -472,16 +484,21 @@ function ProjectConfigVariablesInternal({ variable }: { variable: Variable }) { const { clear: clearSharedStoreData } = useSnapshot(projectsStore) useOnLogout(clearSharedStoreData) + const inputId = useId() + return (

- + +
- +
) diff --git a/packages/ui/src/components/shadcn/ui/command.tsx b/packages/ui/src/components/shadcn/ui/command.tsx index a52e0c8d8ac..97207463274 100644 --- a/packages/ui/src/components/shadcn/ui/command.tsx +++ b/packages/ui/src/components/shadcn/ui/command.tsx @@ -58,7 +58,7 @@ const CommandInput = React.forwardRef< ref ) => (
- {showSearchIcon && } + {showSearchIcon && } - + )}