Skip to content

Featured c#502

Merged
Ebube111 merged 2 commits intostagingfrom
featured-c
Dec 15, 2025
Merged

Featured c#502
Ebube111 merged 2 commits intostagingfrom
featured-c

Conversation

@Ebube111
Copy link
Copy Markdown
Collaborator

@Ebube111 Ebube111 commented Dec 15, 2025

Summary by CodeRabbit

  • New Features

    • Added a "View All" control to the Featured Campaigns section for easier browsing of additional campaigns.
  • Updates

    • Refreshed the list of featured campaigns displayed on the homepage to showcase new projects.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 15, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
potlock-next-app Ready Ready Preview, Comment Dec 15, 2025 9:26am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 15, 2025

Walkthrough

The changes add an optional showViewAll prop to the FeaturedCampaigns component to conditionally render a VIEW ALL button, update the on_chain_id filter values in the carousel, and refresh the mainnet FEATURED_PROJECT_ACCOUNT_IDS constant by replacing one account with three new accounts.

Changes

Cohort / File(s) Summary
FeaturedCampaigns component updates
src/pages/campaigns.tsx
Added optional showViewAll prop (default: false) to component signature; added conditional VIEW ALL button rendering; wrapped arrow controls in nested div; updated on_chain_id filter from [91, 85, 81] to [106, 101, 91]
Featured campaigns configuration
src/pages/index.tsx
Updated FEATURED_PROJECT_ACCOUNT_IDS mainnet array: removed "v1.foodbank.near", added "nearcatalog.near", "meteor-wallet.near", "fastnear.tg"; passed showViewAll={true} prop to FeaturedCampaigns component

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify the new showViewAll prop integrates correctly with the conditional rendering logic
  • Confirm the on_chain_id filter values [106, 101, 91] are correct and intentional
  • Validate that the account swaps in FEATURED_PROJECT_ACCOUNT_IDS are accurate and complete

Possibly related PRs

Poem

🐰 Campaigns now dance with a "View All" delight,
New accounts join the featured spotlight,
Filter chains shift from old to new IDs,
A hop, skip, and jump—the UI spree!

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title check ⚠️ Warning The pull request title 'Featured c' is incomplete and vague, failing to clearly describe what changes were made to the featured campaigns functionality. Complete the title with a clear description of the main change, such as 'Add view all option to featured campaigns' or 'Update featured campaigns with new account IDs and view all button'.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch featured-c

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@Ebube111 Ebube111 merged commit 1fa48f9 into staging Dec 15, 2025
2 of 5 checks passed
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
src/pages/campaigns.tsx (2)

52-73: Header controls: behavior OK; consider minor a11y and reuse improvements

Behaviorally the arrows + VIEW ALL button layout and navigation look fine, and the /campaigns link is appropriate, but two small follow‑ups to consider:

  • The arrow <img> elements with onClick are not keyboard accessible; wrapping them in <button> with proper aria-labels would improve accessibility and match semantics.
  • This arrow-control pattern is duplicated in src/pages/index.tsx (lines 170‑181); extracting a small shared component would reduce duplication.

Please confirm there are no design constraints preventing turning these into <button> elements and, if desired, I can outline a small shared CarouselArrows component.


78-81: Updated featured on_chain_id filter; watch coupling to hard-coded count

The filter now targets [106, 101, 91], which aligns with the current hard-coded …{current + 1}/3 display, but this will silently drift if featured IDs are ever added/removed.

Consider deriving the denominator from data.filter(/* ids */).length instead of hard-coding 3, and please verify that all three IDs are expected to be present in the campaign feed in your target environments.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7160c5a and d892180.

📒 Files selected for processing (2)
  • src/pages/campaigns.tsx (2 hunks)
  • src/pages/index.tsx (2 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-04-17T14:16:13.402Z
Learnt from: carina-akaia
Repo: PotLock/potlock-nextjs-app PR: 365
File: src/features/donation/models/effects/index.ts:155-174
Timestamp: 2025-04-17T14:16:13.402Z
Learning: The transaction outcome handling in src/features/donation/models/effects/index.ts is temporary and will be replaced with `nearRps.txStatus` in the future, so extensive refinements to the current implementation aren't necessary.

Applied to files:

  • src/pages/index.tsx
📚 Learning: 2025-07-02T13:31:11.268Z
Learnt from: akaia-shadowfox
Repo: PotLock/potlock-nextjs-app PR: 424
File: src/pages/index.tsx:52-56
Timestamp: 2025-07-02T13:31:11.268Z
Learning: In src/pages/index.tsx, the donation count (total_donations_count) is intentionally displayed with a dollar sign prefix for UI consistency, even though it represents a count rather than a currency amount. This is the intended behavior.

Applied to files:

  • src/pages/index.tsx
📚 Learning: 2025-06-02T18:44:53.590Z
Learnt from: akaia-shadowfox
Repo: PotLock/potlock-nextjs-app PR: 400
File: src/features/donation/components/modal-confirmation-screen.tsx:83-88
Timestamp: 2025-06-02T18:44:53.590Z
Learning: In src/features/donation/components/modal-confirmation-screen.tsx, the isFeeBypassAllowed flag is temporarily hardcoded to true for urgent shipping, with a TODO comment indicating it should be replaced with campaign permission-based logic using campaign?.allow_fee_avoidance ?? false for campaign donations.

Applied to files:

  • src/pages/campaigns.tsx
🧬 Code graph analysis (2)
src/pages/index.tsx (1)
src/pages/campaigns.tsx (1)
  • FeaturedCampaigns (19-86)
src/pages/campaigns.tsx (2)
src/common/api/indexer/internal/client.generated.ts (1)
  • Campaign (1565-1678)
src/common/ui/layout/components/atoms/button.tsx (1)
  • Button (111-111)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build (20.x)
🔇 Additional comments (3)
src/pages/campaigns.tsx (1)

19-25: showViewAll prop shape and default look good

The added optional showViewAll prop with a default of false keeps existing callers working and matches how it’s used from Home.

Please ensure any other imports/usages of FeaturedCampaigns (if present outside this file) are updated if they rely on a stricter prop type definition.

src/pages/index.tsx (2)

26-37: FEATURED_PROJECT_ACCOUNT_IDS updates are straightforward

The mainnet featured project list change is a simple data update; the mapping logic below remains valid with the new accounts.

Please double-check these account IDs against the intended featured set for mainnet, especially fastnear.tg, to ensure there are no typos.


160-164: Home’s FeaturedCampaigns usage matches new API and handles loading state

Using campaigns?.results ?? [] aligns with the Campaign[] data prop, and showViewAll={true} correctly enables the new button on the homepage while keeping the campaigns page unchanged (default false).

Please verify in the UI that the VIEW ALL button appears only on Home and that the section hides gracefully when there are no campaigns (empty array).

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.

1 participant