Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(market): Market featured agent card #9463

Merged
merged 8 commits into from
Feb 10, 2025
Merged

Conversation

andrewhooker2
Copy link
Contributor

Background

Resolves: #9313

The marketplace featured agent's section has a bug where if you hover over a featured agent's card we are getting an incorrect background color applied to the description.

Changes 🏗️

  1. Refactored FeaturedStoreCard to FeaturedAgentCard:

    • Condensed props and leverage StoreAgent type from api
    • Removed onClick handler from props as this is not json serializable and is not inline with NextJS best practices
    • Used built in Card Components from ShadCN to minimize custom styling.
    • Optimize images with implementation of the Image component from NextJS
  2. Enhanced FeaturedCardSection components:

    • Removing extensive prop passing and leverage the agent itself with the StoreAgent type.
    • Implemented Link from NextJS to better handler routing and remove the useRouter implementation
    • Removed unnecessary handleCardClick method.

Checklist 📋

For code changes:

  • I have clearly listed my changes in the PR description
  • I have made a test plan
  • I have tested my changes according to the test plan:

Test Plan

  • Goto the landing page of the application or /marketplace
  • Scroll to the featured agents section
  • Move mouse over each of the cards and observe the image disappearing and text being shown
  • Observe the background color of the text that replaced the image matches that of the card

Replaced all instances of `FeaturedStoreCard` with `FeaturedAgentCard` to align with updated component naming. Adjusted story arguments structure for better consistency and maintainability. Removed unused properties like `onClick` where not necessary.
…d reusability.

Replaced `FeaturedStoreCard` with `FeaturedAgentCard` for preciseness. Updated `FeaturedSection` to align with changes and added `Link` for navigation. Simplified type definitions and improved hover functionality for better UX. Leveraging built in StoreAgent type already supplied by api.
This cleans up the code by removing an unused import from FeaturedSection.tsx. The change improves code readability and eliminates potential confusion for future maintenance.
Updated the structure of arguments to nest agent-related properties under an `agent` object and added `backgroundColor` control. This improves organization and supports better flexibility for future enhancements.
@andrewhooker2 andrewhooker2 requested a review from a team as a code owner February 10, 2025 21:00
@andrewhooker2 andrewhooker2 requested review from Pwuts and Bentlybro and removed request for a team February 10, 2025 21:00
@CLAassistant
Copy link

CLAassistant commented Feb 10, 2025

CLA assistant check
All committers have signed the CLA.

Copy link

supabase bot commented Feb 10, 2025

This pull request has been ignored for the connected project bgwpwdsxblryihinutbx because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

Copy link
Contributor

This PR targets the master branch but does not come from dev or a hotfix/* branch.

Automatically setting the base branch to dev.

@github-actions github-actions bot changed the base branch from master to dev February 10, 2025 21:00
@github-actions github-actions bot added platform/frontend AutoGPT Platform - Front end platform/backend AutoGPT Platform - Back end size/l labels Feb 10, 2025
Copy link

Qodo Merge was enabled for this repository. To continue using it, please link your Git account with your Qodo account here.

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis ✅

9313 - PR Code Verified

Compliant requirements:

  • Fix hover state background color on agent card to match rest of card color

Requires further human verification:

  • Match design from Figma - Need to verify final colors match Figma design
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Dark Mode Colors

The dark mode background color is hardcoded to neutral-700. This should be validated against the design system and Figma specs to ensure consistency.

} rounded-xl dark:bg-neutral-700`}

Copy link

deepsource-io bot commented Feb 10, 2025

Here's the code health analysis summary for commits 00c312d..98b51e1. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScript✅ Success
❗ 3 occurences introduced
🎯 6 occurences resolved
View Check ↗
DeepSource Python LogoPython✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

Copy link

netlify bot commented Feb 10, 2025

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit 98b51e1
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/67aa72fb25fee4000979d0f9

Copy link

netlify bot commented Feb 10, 2025

Deploy Preview for auto-gpt-docs-dev canceled.

Name Link
🔨 Latest commit 98b51e1
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs-dev/deploys/67aa72fb925ecc0008e835c5

Replaced the FeaturedAgent type with StoreAgent in the FeaturedSection stories for better alignment with the backend API. Removed unused imports and commented-out code to improve maintainability.
ntindle
ntindle previously approved these changes Feb 10, 2025
@andrewhooker2 andrewhooker2 added this pull request to the merge queue Feb 10, 2025
Merged via the queue into dev with commit 6eee920 Feb 10, 2025
25 checks passed
@andrewhooker2 andrewhooker2 deleted the market-featured-agent-card branch February 10, 2025 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform/backend AutoGPT Platform - Back end platform/frontend AutoGPT Platform - Front end Review effort [1-5]: 2 size/l
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Marketplace - hover state has the wrong bg color and truncate description
3 participants