Skip to content

Commit

Permalink
feat(frontend): search results updates (#9024)
Browse files Browse the repository at this point in the history
This PR covers all of these issues below related to the search bar
section

- [Marketplace - search results - change margins between chips and
section title
#8980](#8980)
- [Marketplace - search results - #8981
](#8981)
- [Marketplace - search results - search box reduce height to 60px
#8977](#8977)
- [Marketplace - search results - increase margins between filter chips
and search box
#8978](#8978)
- [Marketplace - search results - change line height
#8979](#8979)

---------

Co-authored-by: Swifty <[email protected]>
Co-authored-by: Nicholas Tindle <[email protected]>
  • Loading branch information
3 people authored Dec 18, 2024
1 parent 0e10e62 commit 95bd268
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
14 changes: 9 additions & 5 deletions autogpt_platform/frontend/src/app/store/search/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ function SearchResults({
<h2 className="font-geist text-base font-medium leading-normal text-neutral-800 dark:text-neutral-200">
Results for:
</h2>
<h1 className="font-poppins text-2xl font-semibold leading-loose text-neutral-800 dark:text-neutral-100">
<h1 className="font-poppins text-2xl font-semibold leading-[32px] text-neutral-800 dark:text-neutral-100">
{searchTerm}
</h1>
</div>
<div className="flex-none">
<SearchBar width="w-[439px]" />
<SearchBar width="w-[439px]" height="h-[60px]" />
</div>
</div>

Expand All @@ -138,7 +138,7 @@ function SearchResults({
</div>
) : totalCount > 0 ? (
<>
<div className="mt-8 flex items-center justify-between">
<div className="mt-[36px] flex items-center justify-between">
<SearchFilterChips
totalCount={totalCount}
agentsCount={agentsCount}
Expand All @@ -150,8 +150,12 @@ function SearchResults({
{/* Content section */}
<div className="min-h-[500px] max-w-[1440px]">
{showAgents && agentsCount > 0 && (
<div className="mt-8">
<AgentsSection agents={agents} sectionTitle="Agents" />
<div className="mt-[36px]">
<AgentsSection
agents={agents}
sectionTitle="Agents"
className="font-[Large-Poppins] text-[18px] font-semibold leading-[28px]"
/>
</div>
)}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ interface SearchBarProps {
textColor?: string;
placeholderColor?: string;
width?: string;
height?: string;
}

/** SearchBar component for user input and search functionality. */
Expand All @@ -22,6 +23,7 @@ export const SearchBar: React.FC<SearchBarProps> = ({
textColor = "text-[#707070] dark:text-neutral-200",
placeholderColor = "text-[#707070] dark:text-neutral-400",
width = "w-9/10 lg:w-[56.25rem]",
height = "h-[60px]",
}) => {
const router = useRouter();

Expand All @@ -42,7 +44,7 @@ export const SearchBar: React.FC<SearchBarProps> = ({
<form
onSubmit={handleSubmit}
data-testid="store-search-bar"
className={`${width} h-12 px-4 py-2 md:h-[4.5rem] md:px-6 md:py-1 ${backgroundColor} flex items-center justify-center gap-2 rounded-full md:gap-5`}
className={`${width} ${height} px-4 py-2 md:px-6 md:py-1 ${backgroundColor} flex items-center justify-center gap-2 rounded-full md:gap-5`}
>
<MagnifyingGlassIcon className={`h-5 w-5 md:h-7 md:w-7 ${iconColor}`} />
<input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const HeroSection: React.FC = () => {
Bringing you AI agents designed by thinkers from around the world
</h3>
<div className="mb-4 flex justify-center sm:mb-5 md:mb-6">
<SearchBar />
<SearchBar height="h-[74px]" />
</div>
<div>
<div className="flex justify-center">
Expand Down

0 comments on commit 95bd268

Please sign in to comment.