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

[Feat] discover v2 #1045

Merged
merged 7 commits into from
Mar 7, 2025
Merged

[Feat] discover v2 #1045

merged 7 commits into from
Mar 7, 2025

Conversation

alexbeno
Copy link
Contributor

@alexbeno alexbeno commented Mar 4, 2025

Summary by CodeRabbit

  • New Features
    • Introduced several new UI components: detailed cards for issues and projects with interactive tooltips and metrics, a dynamic banner highlighting live events, and a carousel for browsing projects and issues.
    • Added an updated page header with context-sensitive navigation and calls to action.
  • Refactor
    • Streamlined the Discover page to deliver a unified, tailored experience by consolidating multiple features into an improved layout.

Copy link

vercel bot commented Mar 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
saas-frontend ❌ Failed (Inspect) Mar 7, 2025 1:42pm
saas-storybook ❌ Failed (Inspect) Mar 7, 2025 1:42pm

Copy link
Contributor

coderabbitai bot commented Mar 4, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This PR introduces several new React components and corresponding TypeScript interfaces to display issues, projects, and tailored discoveries. Components such as IssueCard, NewProjectCard, PageBanner, PageCarousel, and PageHeader were added, while DiscoverPage was refactored to utilize DiscoverPageV2. In addition, the PR expands the domain, query adapter, and API client adapters to support tailored discovery features. Changes also include updates to shared components like ListBanner and PageContainer, along with the addition of new mock methods for testing.

Changes

Files Change Summary
app/(saas)/discover/_components/issue-card/issue-card.tsx
.../issue-card.types.ts
Added new IssueCard component and its IssueCardProps interface for displaying issue details.
app/(saas)/discover/_components/new-project-card/new-project-card.tsx
.../new-project-card.types.ts
Introduced NewProjectCard component with helper Metrics and corresponding NewProjectCardProps interface to display project information.
app/(saas)/discover/_components/page-banner/page-banner.tsx
app/(saas)/discover/_components/page-carousel/page-carousel.tsx
.../page-carousel.types.ts
Added PageBanner to handle hackathon data and PageCarousel (with ResourceBadge) to display carousels, plus its props interface.
app/(saas)/discover/_features/page-header/page-header.tsx
.../page-header.types.ts
New PageHeader component and its props interface that conditionally renders based on available data.
app/(saas)/discover/page.tsx
app/(saas)/discover/v1.tsx
app/(saas)/discover/v2.tsx
Refactored DiscoverPage to use <DiscoverPageV2 /> and added new versions DiscoverPageV1 and DiscoverPageV2 to reorganize discovery sections.
core/application/react-query-adapter/reco/client/index.ts
.../use-get-tailored-discoveries.ts
Updated exports and introduced useGetTailoredDiscoveries hook for fetching tailored discoveries via React Query.
core/domain/reco/input/reco-facade-port.ts
.../tailored-discoveries-model.ts
.../reco-storage-port.ts
.../reco-contract.types.ts
Extended domain interfaces and types with methods and models for tailored discoveries.
core/infrastructure/marketplace-api-client-adapter/adapters/reco-client-adapter.ts
.../reco-client-adapter-mock.ts
Added getTailoredDiscoveries in both real and mock adapters along with additional mock methods for related operations.
shared/features/list-banner/list-banner.tsx
.../list-banner.types.ts
Updated ListBanner component and its props to support children and extended class name configuration.
shared/features/page/page-container/page-container.tsx
shared/features/page/page-inner/page-inner.tsx
.../page-inner.types.ts
Refactored PageContainer to utilize new PageInner component; added PageInner component and related types for responsive layouts.

Sequence Diagram(s)

sequenceDiagram
  participant PB as PageBanner
  participant HRA as HackathonReactQueryAdapter
  participant SK as Skeleton
  participant ES as ErrorState
  participant LB as ListBanner
  participant LHC as LiveHackathonCard
  
  PB->>HRA: Fetch hackathon data
  alt Loading
    HRA-->>PB: Loading state
    PB->>SK: Render Skeleton
  else Error
    HRA-->>PB: Error response
    PB->>ES: Render ErrorState
  else No Data
    HRA-->>PB: Empty data
    PB->>LB: Render ListBanner
  else Data Available
    HRA-->>PB: Live hackathon data
    PB->>LHC: Render LiveHackathonCard
  end
Loading
sequenceDiagram
  participant DP as DiscoverPageV2
  participant Q as useGetTailoredDiscoveries
  participant PC as PageCarousel
  participant NPC as NewProjectCard
  participant IC as IssueCard
  participant PB as PageBanner
  
  DP->>Q: Request tailored discoveries
  Q-->>DP: Return discoveries (sections)
  loop For each section
    DP->>PC: Render carousel with section details
    alt Projects available
      PC->>NPC: Render NewProjectCard for each project
    end
    alt Issues available
      PC->>IC: Render IssueCard for each issue
    end
  end
  alt First section exists
    DP->>PB: Render PageBanner
  end
Loading

Possibly related PRs

Suggested reviewers

  • pixelfact

Poem

I'm a little rabbit, hopping with glee,
New cards and banners, as clear as can be.
Issues and projects now neatly displayed,
In code fields where our efforts are laid.
A hop, a skip, through features so new –
Coding magic unfolds in every debut!
🐰✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0700eb2 and c631b57.

⛔ Files ignored due to path filters (1)
  • public/images/backgrounds/discover-header.png is excluded by !**/*.png
📒 Files selected for processing (25)
  • app/(saas)/discover/_components/issue-card/issue-card.tsx (1 hunks)
  • app/(saas)/discover/_components/issue-card/issue-card.types.ts (1 hunks)
  • app/(saas)/discover/_components/new-project-card/new-project-card.tsx (1 hunks)
  • app/(saas)/discover/_components/new-project-card/new-project-card.types.ts (1 hunks)
  • app/(saas)/discover/_components/page-banner/page-banner.tsx (1 hunks)
  • app/(saas)/discover/_components/page-carousel/page-carousel.tsx (1 hunks)
  • app/(saas)/discover/_components/page-carousel/page-carousel.types.ts (1 hunks)
  • app/(saas)/discover/_features/page-header/page-header.tsx (1 hunks)
  • app/(saas)/discover/_features/page-header/page-header.types.ts (1 hunks)
  • app/(saas)/discover/page.tsx (1 hunks)
  • app/(saas)/discover/v1.tsx (1 hunks)
  • app/(saas)/discover/v2.tsx (1 hunks)
  • core/application/react-query-adapter/reco/client/index.ts (1 hunks)
  • core/application/react-query-adapter/reco/client/use-get-tailored-discoveries.ts (1 hunks)
  • core/domain/reco/input/reco-facade-port.ts (2 hunks)
  • core/domain/reco/models/tailored-discoveries-model.ts (1 hunks)
  • core/domain/reco/output/reco-storage-port.ts (2 hunks)
  • core/domain/reco/reco-contract.types.ts (2 hunks)
  • core/infrastructure/marketplace-api-client-adapter/adapters/reco-client-adapter.ts (3 hunks)
  • core/infrastructure/marketplace-api-client-adapter/mock-adapters/reco-client-adapter-mock.ts (1 hunks)
  • shared/features/list-banner/list-banner.tsx (1 hunks)
  • shared/features/list-banner/list-banner.types.ts (1 hunks)
  • shared/features/page/page-container/page-container.tsx (1 hunks)
  • shared/features/page/page-inner/page-inner.tsx (1 hunks)
  • shared/features/page/page-inner/page-inner.types.ts (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@haydencleary haydencleary marked this pull request as ready for review March 7, 2025 13:40
@haydencleary haydencleary merged commit 49942de into main Mar 7, 2025
2 of 6 checks passed
@haydencleary haydencleary deleted the feat-discover-v2 branch March 7, 2025 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants