Skip to content

feat(campaigns): implement campaign search, live counters, contract p… - #759

Open
olawaleakanbi035-maker wants to merge 1 commit into
Fundable-Protocol:mainfrom
olawaleakanbi035-maker:main
Open

feat(campaigns): implement campaign search, live counters, contract p…#759
olawaleakanbi035-maker wants to merge 1 commit into
Fundable-Protocol:mainfrom
olawaleakanbi035-maker:main

Conversation

@olawaleakanbi035-maker

Copy link
Copy Markdown

…ause/resume, and NatSpec docs

Closes #701, Closes #699, Closes #697, Closes #702

Detailed explanation of implementation for all 4 issues:

  1. Issue feat(frontend): Campaign search - filter by status, tree type, or progress #701: feat(frontend): Campaign search - filter by status, tree type, or progress
  • Created CampaignSearch component (apps/web/src/components/modules/campaigns/CampaignSearch.tsx) and Next.js page route (apps/web/src/app/(overview)/campaigns/page.tsx).
  • Implemented real-time text query search filtering across campaign title, description, creator address, and tree species.
  • Added status filter dropdown/pills (All, Active, Paused, Successful, Failed, Claimed).
  • Added tree type filter (Oak, Mangrove, Pine, Acacia, Cedar, Fruit Tree, Baobab, Redwood, Birch).
  • Added progress range filters (0-25%, 25-50%, 50-75%, 75-100%, 100%+) and sorting controls (Trending, Progress, Target, Newest).
  • Integrated Campaigns navigation item into app sidebar (app-sidebar.tsx).
  1. Issue docs(contract): NatSpec documentation for all campaign contract functions #699: docs(contract): NatSpec documentation for all campaign contract functions
  • Comprehensive inline Rust NatSpec doc comments (///) added across contracts/campaign-funding/src/lib.rs.
  • Documented all public contract functions (initialize, create_campaign, contribute, trigger_expiry, claim_funds, refund, pause_campaign, resume_campaign, get_campaign, get_contribution, get_campaign_count, get_fee_rate, get_fee_collector, set_fee_rate, set_fee_collector).
  • Added detailed descriptions for function parameters (# Arguments), return types (# Returns), side effects, published events (# Events), and failure conditions (# Errors).
  • Documented all structs (Campaign, CampaignCreatedEvent, ContributionMadeEvent, etc.), enums (CampaignStatus, DataKey), and error variants (Error).
  1. Issue feat(contract): Campaign pause/resume - pause fundraising without canceling #697: feat(contract): Campaign pause/resume - pause fundraising without canceling
  • Added Paused variant to CampaignStatus enum in contracts/campaign-funding/src/lib.rs.
  • Added error variants Error::CampaignPaused (18) and Error::CampaignNotPaused (19).
  • Implemented pause_campaign(env, campaign_id) method allowing campaign creator to temporarily halt contributions while leaving existing escrowed funds valid.
  • Implemented resume_campaign(env, campaign_id) method allowing campaign creator to resume fundraising if deadline has not passed.
  • Updated contribute to reject deposits when campaign is Paused with Error::CampaignPaused.
  • Updated trigger_expiry to allow expiring paused campaigns when deadline is reached.
  • Added contract unit tests test_pause_and_resume_campaign_success and test_contribute_while_paused_fails.
  1. Issue feat(frontend): Campaign detail - show live tree counter and progress bar #702: feat(frontend): Campaign detail - show live tree counter and progress bar
  • Created LiveTreeCounter component (apps/web/src/components/modules/campaigns/LiveTreeCounter.tsx) featuring an animated numerical ticker (using requestAnimationFrame ease-out cubic animation) showing total trees planted vs target trees, unit cost, and species badge.
  • Created AnimatedProgressBar component (apps/web/src/components/modules/campaigns/AnimatedProgressBar.tsx) with animated goal fill, milestone tick markers (25%, min threshold, 75%, 100%), and metric breakdown cards (total raised, min target, hard cap).
  • Created CampaignDetail view (apps/web/src/components/modules/campaigns/CampaignDetail.tsx) and Next.js page route (apps/web/src/app/(overview)/campaigns/[id]/page.tsx) integrating live tree counter, animated progress bar, campaign metadata, and interactive creator pause/resume toggle.

…ause/resume, and NatSpec docs

Closes Fundable-Protocol#701, Closes Fundable-Protocol#699, Closes Fundable-Protocol#697, Closes Fundable-Protocol#702

Detailed explanation of implementation for all 4 issues:

1. Issue Fundable-Protocol#701: feat(frontend): Campaign search - filter by status, tree type, or progress
- Created CampaignSearch component (apps/web/src/components/modules/campaigns/CampaignSearch.tsx) and Next.js page route (apps/web/src/app/(overview)/campaigns/page.tsx).
- Implemented real-time text query search filtering across campaign title, description, creator address, and tree species.
- Added status filter dropdown/pills (All, Active, Paused, Successful, Failed, Claimed).
- Added tree type filter (Oak, Mangrove, Pine, Acacia, Cedar, Fruit Tree, Baobab, Redwood, Birch).
- Added progress range filters (0-25%, 25-50%, 50-75%, 75-100%, 100%+) and sorting controls (Trending, Progress, Target, Newest).
- Integrated Campaigns navigation item into app sidebar (app-sidebar.tsx).

2. Issue Fundable-Protocol#699: docs(contract): NatSpec documentation for all campaign contract functions
- Comprehensive inline Rust NatSpec doc comments (///) added across contracts/campaign-funding/src/lib.rs.
- Documented all public contract functions (initialize, create_campaign, contribute, trigger_expiry, claim_funds, refund, pause_campaign, resume_campaign, get_campaign, get_contribution, get_campaign_count, get_fee_rate, get_fee_collector, set_fee_rate, set_fee_collector).
- Added detailed descriptions for function parameters (# Arguments), return types (# Returns), side effects, published events (# Events), and failure conditions (# Errors).
- Documented all structs (Campaign, CampaignCreatedEvent, ContributionMadeEvent, etc.), enums (CampaignStatus, DataKey), and error variants (Error).

3. Issue Fundable-Protocol#697: feat(contract): Campaign pause/resume - pause fundraising without canceling
- Added Paused variant to CampaignStatus enum in contracts/campaign-funding/src/lib.rs.
- Added error variants Error::CampaignPaused (18) and Error::CampaignNotPaused (19).
- Implemented pause_campaign(env, campaign_id) method allowing campaign creator to temporarily halt contributions while leaving existing escrowed funds valid.
- Implemented resume_campaign(env, campaign_id) method allowing campaign creator to resume fundraising if deadline has not passed.
- Updated contribute to reject deposits when campaign is Paused with Error::CampaignPaused.
- Updated trigger_expiry to allow expiring paused campaigns when deadline is reached.
- Added contract unit tests test_pause_and_resume_campaign_success and test_contribute_while_paused_fails.

4. Issue Fundable-Protocol#702: feat(frontend): Campaign detail - show live tree counter and progress bar
- Created LiveTreeCounter component (apps/web/src/components/modules/campaigns/LiveTreeCounter.tsx) featuring an animated numerical ticker (using requestAnimationFrame ease-out cubic animation) showing total trees planted vs target trees, unit cost, and species badge.
- Created AnimatedProgressBar component (apps/web/src/components/modules/campaigns/AnimatedProgressBar.tsx) with animated goal fill, milestone tick markers (25%, min threshold, 75%, 100%), and metric breakdown cards (total raised, min target, hard cap).
- Created CampaignDetail view (apps/web/src/components/modules/campaigns/CampaignDetail.tsx) and Next.js page route (apps/web/src/app/(overview)/campaigns/[id]/page.tsx) integrating live tree counter, animated progress bar, campaign metadata, and interactive creator pause/resume toggle.
@drips-wave

drips-wave Bot commented Aug 29, 2026

Copy link
Copy Markdown

@olawaleakanbi035-maker Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 104236c8-5ddb-4dc0-a1cf-93b6920e6a32


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.

@Utilitycoder Utilitycoder left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please fix up the merge conflict and update your PR. Kindly ensure you offramp with Fundable at https://stellar.fundable.finance/offramp

@Idrhas

Idrhas commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Fix your conflicts to get PR merged, and don't forget to use https://stellar.fundable.finance for your offramps

1 similar comment
@Idrhas

Idrhas commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Fix your conflicts to get PR merged, and don't forget to use https://stellar.fundable.finance for your offramps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants