diff --git a/src/client/components/ComicDetail/ComicVineSearchForm.tsx b/src/client/components/ComicDetail/ComicVineSearchForm.tsx index fe5c79c..ea93968 100644 --- a/src/client/components/ComicDetail/ComicVineSearchForm.tsx +++ b/src/client/components/ComicDetail/ComicVineSearchForm.tsx @@ -43,52 +43,46 @@ export const ComicVineSearchForm = (props: ComicVineSearchFormProps) => { validate={validate} render={({ handleSubmit }) => (
- - - Override Search Query - - - - + {(props) => ( )} -
+
- + {(props) => ( )}
- + {(props) => ( )}
-
+
diff --git a/src/client/components/ComicDetail/SlidingPanelContent.tsx b/src/client/components/ComicDetail/SlidingPanelContent.tsx index a2a4e21..e3b2896 100644 --- a/src/client/components/ComicDetail/SlidingPanelContent.tsx +++ b/src/client/components/ComicDetail/SlidingPanelContent.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React, { useState } from "react"; import { ComicVineSearchForm } from "./ComicVineSearchForm"; import { ComicVineMatchPanel } from "./ComicVineMatchPanel"; import { EditMetadataPanel } from "./EditMetadataPanel"; @@ -13,6 +13,47 @@ interface CVMatchesPanelProps { onMatchApplied: () => void; }; +/** + * Collapsible container for manual ComicVine search form. + * Allows users to manually search when auto-match doesn't yield results. + */ +const CollapsibleSearchForm: React.FC<{ rawFileDetails?: RawFileDetails }> = ({ + rawFileDetails, +}) => { + const [isExpanded, setIsExpanded] = useState(false); + + return ( +
+ + {isExpanded && ( +
+ +
+ )} +
+ ); +}; + /** * Sliding panel content for ComicVine match search. * @@ -32,19 +73,18 @@ export const CVMatchesPanel: React.FC = ({ onMatchApplied, }) => ( <> -
- -
- -
-

Searching for:

+
+

Searching for:

{inferredMetadata.issue ? ( <> - {inferredMetadata.issue?.name} - # {inferredMetadata.issue?.number} + {inferredMetadata.issue?.name} + # {inferredMetadata.issue?.number} ) : null}
+ + +