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

Remove estimated matching from staging #4991

Merged
merged 2 commits into from
Jan 31, 2025
Merged

Conversation

kkatusic
Copy link
Collaborator

@kkatusic kkatusic commented Jan 30, 2025

Summary by CodeRabbit

  • Refactor

    • Removed references to QF strategy and cluster matching synchronization across multiple components
    • Simplified matching fund calculations and related logic
    • Removed deprecated tooltip and time difference display components
  • Style

    • Adjusted tooltip width in HarvestAll modal for tablet view
  • Impact

    • Streamlined project card and donation-related components
    • Removed detailed matching fund strategy information from user interface

@kkatusic kkatusic self-assigned this Jan 30, 2025
Copy link

vercel bot commented Jan 30, 2025

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

Name Status Preview Comments Updated (UTC)
giveth-dapps-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 30, 2025 1:22pm

Copy link
Contributor

coderabbitai bot commented Jan 30, 2025

Walkthrough

This pull request introduces a comprehensive removal of matching-related fields and strategies across multiple files in the Giveth dApp. The changes systematically eliminate references to matching, qfStrategy, and clusterMatchingSyncAt from GraphQL queries, TypeScript interfaces, and various React components. These modifications simplify the data structure and remove calculations related to estimated matching funds, suggesting a potential temporary suspension or reconfiguration of the matching estimation feature.

Changes

File Change Summary
src/apollo/gql/gqlDonations.ts Removed matching field from estimatedMatching in FETCH_QF_ROUND_HISTORY query
src/apollo/gql/gqlProjects.ts Removed qfStrategy, clusterMatchingSyncAt, and matching fields from multiple fragments and queries
src/apollo/types/types.ts Deleted QfStrategyEnum and removed qfStrategy and clusterMatchingSyncAt from IQFRound interface
src/components/modals/HarvestAll.sc.tsx Updated TooltipContent width from 250px to 200px for tablet media queries
Multiple Components Removed variables and logic related to qfStrategy, clusterMatchingSyncAt, and matching calculations

Possibly related issues

Possibly related PRs

Suggested reviewers

  • CarlosQ96
  • mateodaza

Poem

🐰 Hop, hop, away with matching's trace,
Queries cleaned with rabbit-like grace
Fields removed, simplicity reigns
No more complex matching domains
Code hops lighter, free and bright! 🌟

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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. (Beta)
  • @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.

Copy link
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 (3)
src/helpers/qf.ts (1)

Line range hint 73-95: Remove commented-out code.

Since we're removing the estimated matching feature, we should also remove the commented-out getEstimatedMatchingRange function to maintain code cleanliness.

src/components/views/project/projectActionCard/QFSection.tsx (2)

Line range hint 236-241: Remove commented-out code.

Remove the commented-out code block about "Last updated" since it's no longer needed after removing the matching feature.


Line range hint 1-1: High-level Feedback: Incomplete Feature Removal

The PR aims to remove the estimated matching feature, but the implementation seems incomplete:

  1. Helper functions for estimated matching calculations still exist in qf.ts
  2. Components like QFSection still use these calculations
  3. Commented-out code related to the feature remains in multiple files

Consider:

  1. Removing or deprecating the helper functions in qf.ts
  2. Removing all estimated matching calculations from components
  3. Cleaning up commented-out code
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7ddf900 and 3f5d568.

📒 Files selected for processing (10)
  • src/apollo/gql/gqlDonations.ts (0 hunks)
  • src/apollo/gql/gqlProjects.ts (0 hunks)
  • src/apollo/types/types.ts (0 hunks)
  • src/components/modals/HarvestAll.sc.tsx (1 hunks)
  • src/components/project-card/ProjectCard.tsx (0 hunks)
  • src/components/views/donate/DonatePageProjectDescription.tsx (0 hunks)
  • src/components/views/donate/OneTime/EstimatedMatchingToast.tsx (0 hunks)
  • src/components/views/project/projectActionCard/QFSection.tsx (1 hunks)
  • src/components/views/project/projectDonations/ProjectTotalFundCard.tsx (0 hunks)
  • src/helpers/qf.ts (1 hunks)
💤 Files with no reviewable changes (7)
  • src/apollo/gql/gqlDonations.ts
  • src/components/views/donate/DonatePageProjectDescription.tsx
  • src/components/views/donate/OneTime/EstimatedMatchingToast.tsx
  • src/components/project-card/ProjectCard.tsx
  • src/components/views/project/projectDonations/ProjectTotalFundCard.tsx
  • src/apollo/types/types.ts
  • src/apollo/gql/gqlProjects.ts
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build
🔇 Additional comments (3)
src/helpers/qf.ts (1)

Line range hint 41-54: Verify the mathematical formulas for matching calculations.

The functions calculateTotalEstimatedMatching and calculateEstimatedMatchingWithDonationAmount contain complex mathematical formulas. Let's verify these calculations are still relevant after removing the estimated matching feature.

Also applies to: 56-71

src/components/modals/HarvestAll.sc.tsx (1)

90-90: Verify UI change impact.

The tooltip width reduction from 250px to 200px seems unrelated to the removal of estimated matching. Please verify this change doesn't cause content overflow issues.

src/components/views/project/projectActionCard/QFSection.tsx (1)

59-60: ⚠️ Potential issue

Inconsistent removal of estimated matching feature.

The component still uses estimatedMatching calculations despite the feature being removed. This seems inconsistent with the PR's objective of removing estimated matching from staging.

Also applies to: 69-74

Copy link
Collaborator

@CarlosQ96 CarlosQ96 left a comment

Choose a reason for hiding this comment

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

Thx

@kkatusic kkatusic merged commit b51d87c into develop Jan 31, 2025
4 checks passed
@kkatusic kkatusic deleted the remove_estimated_matching branch January 31, 2025 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: QA
Development

Successfully merging this pull request may close these issues.

2 participants