From 6963085295ef7cf3c9db5b70833da5aa5f682317 Mon Sep 17 00:00:00 2001 From: Rainnny7 Date: Sun, 21 Apr 2024 19:51:30 -0400 Subject: [PATCH] Update search ui --- Frontend/bun.lockb | Bin 339104 -> 339216 bytes Frontend/package.json | 2 +- Frontend/src/app/api/docs/search/route.ts | 28 +-- Frontend/src/app/common/search.ts | 14 -- .../components/docs/search/search-dialog.tsx | 195 +++++++----------- .../components/docs/search/search-input.tsx | 37 ---- Frontend/src/app/components/docs/sidebar.tsx | 4 +- Frontend/src/app/components/ui/command.tsx | 158 ++++++++++++++ 8 files changed, 239 insertions(+), 199 deletions(-) delete mode 100644 Frontend/src/app/common/search.ts delete mode 100644 Frontend/src/app/components/docs/search/search-input.tsx create mode 100644 Frontend/src/app/components/ui/command.tsx diff --git a/Frontend/bun.lockb b/Frontend/bun.lockb index f936f112c84b5e54d95713d44c5f6fe4205cf4bf..c881f871cba43d60d018656c25ced0e302e7381d 100644 GIT binary patch delta 21856 zcmeHvcUTq2*Z=O_y~2tJ2uK&Pp(02TFN%8YvA4t)g9a6qL`B7}37D9~6w@|3!HyA2 z@{L`wC2G*9!G;|>_J+O2_WPWjSwz0*o9FjD@B3HoazBYTvGZB>ifQg z&-HXk@{y#}&M3PAzm+A)1NdOBB>4lMKwcI&f1V_{1Dj+>k`wSNU}<0!klK|4dID$7 zmn021MW6%ZUf`#rJ+&JFtRhL>Q+*anQh5mCAn*pB2Ok7{13YyY4J-rn1^NM>{lpzQ z0VKUAKTA>t;0o~M*q=b^NdM8LYRceWB`FY0Hy|1NdNKEQB#=7mDX=Awyp95rp1hQg zCJsoQw*k5V=OHSF-ZDw@1wRTrMJ*mk?Rqcg&b0(WuB6sku9tKx=XM&=qbM$2$)j3Q zZ{!vnpOh&{E|B&EQmnjyrGXuR)XVUMVaW-@P`8$QF#t%h>#uVCJ8O8abAU8g6W8(j zW@ujue4xI=Eifo+J+EB^B%h}NsaIzpjctmql?hBq`kl8K9zP_$_rL_Hp71FWSQ1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EH`d&H$G?ByW6xWNrU+(JcHdLQVvEjB8m~9ls&Q_7gRYGg zSd1dsmzh;{}A$&MJLbXMkFTW{#G4^INeX6_BCH%!k zbO+DXuvq$(`Z#0eLW18=!}VPof6TO2#jF0}T-9`^B*2VvVjoR0&V`H1=z3#Co)6pJOuWbHjM z2Lsp_1bl-GG+$12e11~9R#6Q17Uo87>_;td@OOA&BQ#%L^}6e~9d8|LbXs%*7saHA zh-WXRT-zYK@1+KtIh-?3X^mzr0AouwQpHb2{QqM@W$pd>E_}m~dGau4F)Qc9$`uLE zJ7v$j)!;z$by!XQJ!tuv5(NrksL}kH0Y7xh{AexLU``)3D$snZR?yS&h1YCZIsxkR za0GeMo~?$0Jd<4`*u(;TF$;ZJv@f_^hiCSauUa(g4D4bqUzHx>&Tib$X#EX5zq z@>^wWet<_!KagJNw8YRqD?8m`M?D!CDdQM#g}CfVG*JfW@qs~s-;|&epl@>+q6Rs zWOa9_g;;us>d(@4sFAGUPSuC?KZrjacdFs+^)^*wyLYIb?Cc)Zj}1DgmS7#XtCQLP z98^8no`Y%}d$Ub-W3k)SAhzK!{-hs3#hg%8W$D{t^aEdOAiHotElM4=bHR#iarqol zzmVCz5Vaut => { - const query: string | null = request.nextUrl.searchParams.get("query"); // The query to search for - - // Ensure the query is valid - if (!query || query.length < 3 || query.length > 64) { - return new NextResponse( - JSON.stringify({ error: "Invalid query given" }), - { status: 400 } - ); - } - - // Return the results of the search - return new NextResponse( - JSON.stringify( - DOCS_SEARCH_INDEX.search(query, { limit: 5 }).map( - (result: FuseResult) => { - return { - slug: result.item.slug, - title: result.item.title, - summary: result.item.summary, - }; - } - ) - ) - ); + return new NextResponse(JSON.stringify(getDocsContent())); }; diff --git a/Frontend/src/app/common/search.ts b/Frontend/src/app/common/search.ts deleted file mode 100644 index 180abec..0000000 --- a/Frontend/src/app/common/search.ts +++ /dev/null @@ -1,14 +0,0 @@ -import Fuse from "fuse.js"; -import { getDocsContent } from "@/lib/mdxUtils"; - -/** - * The fuse index for searching the docs. - */ -export const DOCS_SEARCH_INDEX: Fuse = new Fuse( - getDocsContent(), - { - keys: ["title", "summary"], - includeScore: true, - threshold: 0.5, - } -); diff --git a/Frontend/src/app/components/docs/search/search-dialog.tsx b/Frontend/src/app/components/docs/search/search-dialog.tsx index 1fe3c58..3c97ee1 100644 --- a/Frontend/src/app/components/docs/search/search-dialog.tsx +++ b/Frontend/src/app/components/docs/search/search-dialog.tsx @@ -1,146 +1,103 @@ "use client"; +import { ReactElement, useEffect, useState } from "react"; import { - AnchorHTMLAttributes, - ChangeEvent, - HTMLAttributes, - ReactElement, - useState, -} from "react"; -import { - DialogClose, - DialogDescription, - DialogFooter, - DialogHeader, - DialogTitle, -} from "@/components/ui/dialog"; + CommandDialog, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, +} from "@/components/ui/command"; +import { MagnifyingGlassIcon } from "@heroicons/react/24/outline"; import { Input } from "@/components/ui/input"; -import { Button } from "@/components/ui/button"; -import { Label } from "@/components/ui/label"; -import Link from "next/link"; +import { useRouter } from "next/navigation"; +import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime"; /** - * Content for the search dialog. + * The dialog for quickly searching the docs. * * @return the content jsx */ -const SearchDialogContent = (): ReactElement => { - const [label, setLabel] = useState(undefined); +const QuickSearchDialog = (): ReactElement => { + const [open, setOpen] = useState(false); const [results, setResults] = useState( undefined ); // The search results + const router: AppRouterInstance = useRouter(); - /** - * Search the docs with the given query. - */ - const search = async ( - event: ChangeEvent - ): Promise => { - const query: string = event.target.value; // Get the query to search for - const tooShort: boolean = query.length < 3; - - // No query or too short - if (!query || tooShort || query.length > 64) { - // Display warning - if (query) { - setLabel( - tooShort - ? "Please enter at least 3 characters" - : "Your input is too long" - ); - } - setResults(undefined); - return; + // Fetch the default results when the page loads + useEffect((): void => { + if (!results) { + const fetchDefaults = async () => { + const response: Response = await fetch("/api/docs/search"); // Search the docs + // setLabel(undefined); // Clear the label + setResults((await response.json()) as DocsContentMetadata[]); + }; + fetchDefaults(); } - const response: Response = await fetch( - `/api/docs/search?query=${query}` - ); // Search the docs - setLabel(undefined); // Clear the label - setResults((await response.json()) as DocsContentMetadata[]); - }; + }, [results]); // Render the contents return ( <> - {/* Header */} - - Quick Search - - Quickly find the documentation you're looking for by - typing in a few terms. - - - {/* Query Input */} -
- - setOpen(true)}> +
+
- - {/* Results */} -
- {results?.length === 0 && ( -

No Results

- )} - {results?.map( - ( - result: DocsContentMetadata, - index: number - ): ReactElement => ( - - ) - )} +
- {/* Footer */} - - - - - + {/* Dialog */} + + {/* Input */} + + + {/* Results */} + + + No results were found. + + + + {results?.map( + ( + result: DocsContentMetadata, + index: number + ): ReactElement => ( + + router.push(`/docs/${result.slug}`) + } + > +

+ {result.title} +

+

+ {result.summary} +

+
+ ) + )} +
+
+
); }; -/** - * The props for a search result entry. - */ -type SearchResultEntryProps = { - /** - * The search result to display. - */ - result: DocsContentMetadata; -}; - -/** - * A search result entry. - * - * @param result the result to display - * @param props the additional props - * @return the result jsx - */ -const SearchResultEntry = ({ - result, - ...props -}: AnchorHTMLAttributes & - SearchResultEntryProps): ReactElement => ( - -

{result.title}

-

{result.summary}

- -); - -export default SearchDialogContent; +export default QuickSearchDialog; diff --git a/Frontend/src/app/components/docs/search/search-input.tsx b/Frontend/src/app/components/docs/search/search-input.tsx deleted file mode 100644 index 9257cff..0000000 --- a/Frontend/src/app/components/docs/search/search-input.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import { ReactElement } from "react"; -import { Dialog, DialogContent, DialogTrigger } from "@/components/ui/dialog"; -import { Input } from "@/components/ui/input"; -import { MagnifyingGlassIcon } from "@heroicons/react/24/outline"; -import SearchDialogContent from "@/components/docs/search/search-dialog"; - -/** - * The quick search component. - * - * @return the search jsx - */ -const QuickSearch = (): ReactElement => ( - - - {/* Button to open search */} -
- -
- - -
- - - -
-); -export default QuickSearch; diff --git a/Frontend/src/app/components/docs/sidebar.tsx b/Frontend/src/app/components/docs/sidebar.tsx index 88a194f..1fd7d56 100644 --- a/Frontend/src/app/components/docs/sidebar.tsx +++ b/Frontend/src/app/components/docs/sidebar.tsx @@ -4,7 +4,7 @@ import { cn } from "@/lib/utils"; import { capitalize } from "@/lib/stringUtils"; import { minecrafter } from "@/font/fonts"; import { getDocsContent } from "@/lib/mdxUtils"; -import QuickSearch from "@/components/docs/search/search-input"; +import QuickSearchDialog from "@/components/docs/search/search-dialog"; /** * The sidebar for the docs page. @@ -24,7 +24,7 @@ const Sidebar = ({ activeSlug }: { activeSlug: string }): ReactElement => {
{/* Quick Search */} - + {/* Links */}
diff --git a/Frontend/src/app/components/ui/command.tsx b/Frontend/src/app/components/ui/command.tsx new file mode 100644 index 0000000..e4ad011 --- /dev/null +++ b/Frontend/src/app/components/ui/command.tsx @@ -0,0 +1,158 @@ +"use client"; + +import * as React from "react"; +import { type DialogProps } from "@radix-ui/react-dialog"; +import { Command as CommandPrimitive } from "cmdk"; +import { Search } from "lucide-react"; + +import { cn } from "@/lib/utils"; +import { Dialog, DialogContent } from "@/app/components/ui/dialog"; + +const Command = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)); +Command.displayName = CommandPrimitive.displayName; + +interface CommandDialogProps extends DialogProps {} + +const CommandDialog = ({ children, ...props }: CommandDialogProps) => { + return ( + + + + {children} + + + + ); +}; + +const CommandInput = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( +
+ + +
+)); + +CommandInput.displayName = CommandPrimitive.Input.displayName; + +const CommandList = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)); + +CommandList.displayName = CommandPrimitive.List.displayName; + +const CommandEmpty = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>((props, ref) => ( + +)); + +CommandEmpty.displayName = CommandPrimitive.Empty.displayName; + +const CommandGroup = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)); + +CommandGroup.displayName = CommandPrimitive.Group.displayName; + +const CommandSeparator = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)); +CommandSeparator.displayName = CommandPrimitive.Separator.displayName; + +const CommandItem = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)); + +CommandItem.displayName = CommandPrimitive.Item.displayName; + +const CommandShortcut = ({ + className, + ...props +}: React.HTMLAttributes) => { + return ( + + ); +}; +CommandShortcut.displayName = "CommandShortcut"; + +export { + Command, + CommandDialog, + CommandInput, + CommandList, + CommandEmpty, + CommandGroup, + CommandItem, + CommandShortcut, + CommandSeparator, +};