feat(campaigns): implement campaign search, live counters, contract p… - #759
feat(campaigns): implement campaign search, live counters, contract p…#759olawaleakanbi035-maker wants to merge 1 commit into
Conversation
…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.
|
@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! 🚀 |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 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. Comment |
Utilitycoder
left a comment
There was a problem hiding this comment.
Please fix up the merge conflict and update your PR. Kindly ensure you offramp with Fundable at https://stellar.fundable.finance/offramp
|
Fix your conflicts to get PR merged, and don't forget to use https://stellar.fundable.finance for your offramps |
1 similar comment
|
Fix your conflicts to get PR merged, and don't forget to use https://stellar.fundable.finance for your offramps |
…ause/resume, and NatSpec docs
Closes #701, Closes #699, Closes #697, Closes #702
Detailed explanation of implementation for all 4 issues: