-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
fix: issue 4539, qf shown in donation success page for estimated matching amount #4775
fix: issue 4539, qf shown in donation success page for estimated matching amount #4775
Conversation
…eor below estimated matching amount
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe pull request introduces changes focused on updating text strings related to donation eligibility and matching notifications across multiple language files. The updates clarify the conditions for quadratic funding eligibility, including a minimum donation requirement. The modifications simplify titles and enhance the clarity of messaging, aiming to improve user engagement. Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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
🧹 Outside diff range and nitpick comments (5)
src/apollo/gql/gqlQF.ts (1)
21-21
: LGTM! Consider adding a comment for clarity.The addition of the
minimumValidUsdValue
field to theQF_ROUNDS_QUERY
is appropriate and aligns with the query's purpose. This change will allow fetching the minimum valid USD value for QF rounds, which is likely related to donation eligibility as mentioned in the PR objectives.Consider adding a brief comment above this field to explain its purpose, e.g.:
allocatedTokenSymbol +// Minimum USD value for a valid donation in this QF round minimumValidUsdValue
This would enhance code readability and make it easier for other developers to understand the significance of this field.
src/components/views/donate/QFToast.tsx (3)
15-15
: Reorder imports for consistencyThe new import for
useRouter
should be placed before the import of local modules for better organization and consistency with best practices.Consider reordering the imports as follows:
+import { useRouter } from 'next/router'; import { EQFElegibilityState, usePassport } from '@/hooks/usePassport'; import PassportModal from '@/components/modals/PassportModal'; -import { useRouter } from 'next/router';🧰 Tools
GitHub Check: build
[failure] 15-15:
next/router
import should occur before import of@/hooks/usePassport
51-58
: Approve logic changes and address formattingThe updates to the description logic for both eligible and non-eligible users improve the clarity of the messages by including specific values. This aligns well with the PR objectives of enhancing user experience.
However, there are some minor formatting issues that should be addressed:
- Add a semicolon at the end of line 58.
- Adjust the formatting of the object passed to
formatMessage
on lines 64-65 for consistency:description = ( <> {formatMessage({ id: 'page.donate.passport_toast.description.non_eligible', - },{ - usd_value: currentRound?.minimumValidUsdValue, + }, { + usd_value: currentRound?.minimumValidUsdValue })}{' '} <span>{endDate}</span> </> );Also applies to: 64-65
🧰 Tools
GitHub Check: build
[failure] 58-58:
Insert;
79-90
: Approve new navigation feature with suggestionsThe addition of a navigation button for eligible users is a great improvement to the user experience, aligning well with the PR objectives.
Consider the following improvements:
- Use a constant or configuration value for the "/qf" route to make it easier to update if the route changes in the future.
- Use single quotes for consistency with the rest of the codebase:
-onClick={() => router.push("/qf")} +onClick={() => router.push('/qf')}
- Consider extracting the button component to a separate variable to improve readability:
const EligibleButton = ( <Button label={formatMessage({ id: 'qf_donor_eligibility.banner.link.back_to_project', })} buttonType='primary' size='small' icon={<IconExternalLink16 />} onClick={() => router.push('/qf')} /> ); // Then in the JSX: {isEligible ? ( <FlexCenter> {EligibleButton} </FlexCenter> ) : ( // ... existing non-eligible button )}🧰 Tools
GitHub Check: build
[failure] 88-88:
Replace"/qf"
with'/qf'
lang/es.json (1)
Line range hint
1-2078
: LGTM! Comprehensive Spanish translations for Giveth.The file contains a thorough set of Spanish translations for the Giveth application. The JSON structure is valid, and the use of placeholders for dynamic content is appropriate.
Consider adding comments or grouping related translations to improve maintainability for future updates. For example:
{ // User-related translations "label.user_donations": "Donaciones de {userName}", "label.user_projects": "Proyectos de {userName}", // Project-related translations "label.project_name": "Nombre del Proyecto", "label.project_details": "Detalles del Proyecto" }This organization can help developers quickly locate and update specific sections of the translations.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (5)
- lang/ca.json (1 hunks)
- lang/en.json (2 hunks)
- lang/es.json (1 hunks)
- src/apollo/gql/gqlQF.ts (1 hunks)
- src/components/views/donate/QFToast.tsx (4 hunks)
🧰 Additional context used
GitHub Check: build
src/components/views/donate/QFToast.tsx
[failure] 15-15:
next/router
import should occur before import of@/hooks/usePassport
[failure] 58-58:
Insert;
[failure] 62-62:
Insert⏎↹↹↹↹↹
[failure] 63-63:
Insert↹
[failure] 64-64:
Replace},
with↹},⏎↹↹↹↹↹
[failure] 65-65:
Insert↹
[failure] 88-88:
Replace"/qf"
with'/qf'
🔇 Additional comments not posted (11)
src/apollo/gql/gqlQF.ts (1)
21-21
: Verify usage of the new field in componentsThe addition of
minimumValidUsdValue
to theQF_ROUNDS_QUERY
is correct. To ensure full implementation:Please run the following script to check if the new field is being used in components:
This will help identify any components that might need updating to handle the new field.
✅ Verification successful
Usage of
minimumValidUsdValue
VerifiedAll components correctly utilize the new
minimumValidUsdValue
field.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for usage of minimumValidUsdValue in component files # Search for minimumValidUsdValue in TypeScript and JavaScript files echo "Searching for minimumValidUsdValue usage:" rg --type-add 'frontend:*.{ts,tsx,js,jsx}' -t frontend 'minimumValidUsdValue' # Search for QF_ROUNDS_QUERY usage to identify potentially affected components echo "\nComponents potentially needing updates for minimumValidUsdValue:" rg --type-add 'frontend:*.{ts,tsx,js,jsx}' -t frontend 'QF_ROUNDS_QUERY'Length of output: 1572
src/components/views/donate/QFToast.tsx (2)
24-27
: LGTM: Improved component logicThe addition of the
router
constant and theisEligible
check enhances the component's functionality and readability. These changes align well with the PR objectives of improving the user experience related to donation eligibility.
Line range hint
1-158
: Overall approval with minor suggestionsThe changes made to the
QFToast
component significantly improve the user experience related to donation eligibility, which aligns perfectly with the PR objectives. The addition of the navigation button for eligible users, the improved clarity in eligibility messages, and the overall restructuring of the component logic are all positive changes.The suggestions provided in the previous comments (import reordering, formatting fixes, and refactoring the button component) are minor and do not detract from the overall quality of the changes. Once these small adjustments are made, this PR will be ready for merge.
Great work on enhancing the functionality and user experience of the donation success page!
🧰 Tools
GitHub Check: build
[failure] 58-58:
Insert;
[failure] 62-62:
Insert⏎↹↹↹↹↹
[failure] 63-63:
Insert↹
[failure] 64-64:
Replace},
with↹},⏎↹↹↹↹↹
[failure] 65-65:
Insert↹
[failure] 66-66:
Replace}
with↹},⏎↹↹↹↹
lang/en.json (3)
1342-1344
: Improved clarity in passport eligibility messagesThe updates to the passport eligibility messages provide more specific information about the donation matching process. This change enhances user understanding of the eligibility criteria and the potential for matched donations.
1347-1347
: Simplified title for non-eligible donorsThe title for non-eligible donors has been updated to a more concise and impactful message: "Don't miss out!". This change improves the user experience by providing a clear and engaging call-to-action.
1695-1695
: New translation added for QF donor eligibility bannerA new translation has been added for the "Back to projects" link in the QF donor eligibility banner. This improves navigation for users checking their eligibility status.
To ensure completeness, let's check if there are any other related translations that might be missing:
✅ Verification successful
Verification of QF Donor Eligibility Translations
All related translations for "qf_donor_eligibility" have been verified. The new "Back to projects" link is consistent with existing entries.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for other qf_donor_eligibility related keys grep -n "qf_donor_eligibility" lang/en.jsonLength of output: 1783
lang/ca.json (5)
1344-1347
: New translations for QF donor eligibility look good!The added translations for Quadratic Funding donor eligibility messages are clear and consistent. They provide appropriate instructions for users to verify their eligibility and increase their Gitcoin Passport score if needed.
Line range hint
2190-2205
: Profile QF donor eligibility translations are well-implemented!The new and modified translations for the profile QF (Quadratic Funding) donor eligibility section are clear, consistent, and informative. They effectively guide users through the process of checking their eligibility, connecting their Gitcoin Passport, and understanding the required passport score. The translations maintain consistency with the English versions while providing appropriate Catalan language expressions.
Line range hint
2206-2248
: Project GIVback toast translations are comprehensive and clear!The new and modified translations for project GIVback toast messages cover a wide range of scenarios and project states. They provide clear and detailed information for both project owners and donors regarding GIVback eligibility, project status, and next steps. The translations are consistent with the context and offer appropriate guidance for various situations, from draft projects to verified and boosted projects.
Line range hint
2598-2607
: Stream balance toast and tooltip translations are accurate and helpful!The new translations for stream balance related toasts and tooltips effectively communicate important information about depositing, withdrawing, and managing stream balances. They provide clear warnings about the potential impact on recurring donations and offer helpful guidance to users. The translations are consistent with the context and accurately convey the necessary information to help users manage their stream balances effectively.
Line range hint
1-2607
: Overall, excellent additions and modifications to the Catalan translations!The changes made to this file significantly improve the Catalan language support for various features of the platform. The new translations for Quadratic Funding donor eligibility, profile QF eligibility, project GIVback toasts, and stream balance management are clear, consistent, and informative. They provide users with accurate guidance and information across different scenarios and features. These updates will enhance the user experience for Catalan-speaking users of the platform.
…_user_donates_less_than_minimum_$
…_user_donates_less_than_minimum_$ Update Branch
…_user_donates_less_than_minimum_$ Update Branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @HrithikSampson
relates to #4539
Summary by CodeRabbit
New Features
Bug Fixes