Giveth / giveth-dapps-v2

This project is the aggregation of GIVeconomy and Giveth.io DApps in a single repo
https://staging.giveth.io
GNU General Public License v3.0
61 stars 34 forks source link

Fix/UI change profile incompelte message button and modal button #4675

Closed kkatusic closed 3 weeks ago

kkatusic commented 4 weeks ago

message:

Screenshot 2024-09-03 at 23 41 17

modal:

Screenshot 2024-09-03 at 23 41 11

cc @divine-comedian

Summary by CodeRabbit

vercel[bot] commented 4 weeks ago

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 Sep 3, 2024 9:46pm
coderabbitai[bot] commented 4 weeks ago

Walkthrough

The changes primarily involve updates to localization files for different languages, enhancing the clarity of labels related to bridging and obtaining GIV tokens. Additionally, there are modifications to various components and hooks, including styling adjustments, type safety improvements, and the introduction of a new function for retrieving token balances across different blockchain networks. Configuration files were also updated to unify the GIV buy link across multiple environments.

Changes

Files Change Summary
lang/ca.json, lang/en.json, lang/es.json Updated labels for bridging GIV tokens to include "Get" in addition to "Bridge," enhancing clarity on user actions.
src/components/modals/CompleteProfileModal.tsx, src/components/views/userProfile/IncompleteProfileToast.tsx Modified button styles to include !important for background and color properties, ensuring styles take precedence during hover states.
src/components/views/donate/OnTime/OneTimeDonationCard.tsx Added return type annotation : bigint to the gasfee variable declaration within the useMemo hook for improved type safety.
src/components/views/donate/OnTime/SelectTokenModal/SelectTokenModal.tsx, src/components/views/donate/OnTime/SelectTokenModal/getBalanceForToken.tsx Introduced a new interface for token balance management, refactored balance fetching logic, and added a new function for retrieving token balances across EVM and Solana networks.
src/components/views/givfarm/GIVfarmBottom.tsx Removed JSX code for an external link to purchase GIV tokens, altering the user interface by eliminating this option.
src/config/production.tsx Updated the GIV_BUY_LINK configuration across multiple environments to a unified link pointing to 'https://linktr.ee/GIVtoken'.
src/hooks/useSolanaBalance.ts Enhanced balance calculation by explicitly converting the token amount to a bigint, improving type safety.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant App
    participant TokenService

    User->>App: Request to bridge GIV tokens
    App->>TokenService: Fetch available GIV tokens
    TokenService-->>App: Return GIV token data
    App-->>User: Display options to Get or Bridge GIV tokens

🐰 In the meadow, I hop and play,
New links and labels brighten my day!
With colors that pop and buttons that gleam,
GIV tokens are now a delightful dream!
So come, dear friends, let's dance and cheer,
For changes have come, and joy is near! 🌼✨

[!TIP] We have updated our review workflow to use the Anthropic's Claude family of models. Please share any feedback in the discussion post on our Discord.


Recent review details **Configuration used: CodeRabbit UI** **Review profile: CHILL**
Commits Files that changed from the base of the PR and between 125ce36ad46b4b4072cbb61a16881c9e74679fbb and d17dd678e0976af2ee511e50b85d568e75dafea1.
Files selected for processing (11) * lang/ca.json (2 hunks) * lang/en.json (1 hunks) * lang/es.json (1 hunks) * src/components/modals/CompleteProfileModal.tsx (1 hunks) * src/components/views/donate/OnTime/OneTimeDonationCard.tsx (1 hunks) * src/components/views/donate/OnTime/SelectTokenModal/SelectTokenModal.tsx (5 hunks) * src/components/views/donate/OnTime/SelectTokenModal/getBalanceForToken.tsx (1 hunks) * src/components/views/givfarm/GIVfarmBottom.tsx (1 hunks) * src/components/views/userProfile/IncompleteProfileToast.tsx (1 hunks) * src/config/production.tsx (4 hunks) * src/hooks/useSolanaBalance.ts (1 hunks)
Files skipped from review due to trivial changes (1) * src/components/views/userProfile/IncompleteProfileToast.tsx
Additional comments not posted (16)
src/hooks/useSolanaBalance.ts (1)
`58-58`: **LGTM!** The code change enhances type safety by explicitly converting the token amount to a `bigint` using the `BigInt()` constructor. This is the correct way to convert a value to a `bigint` and improves the robustness of the balance retrieval process.
src/components/views/givfarm/GIVfarmBottom.tsx (1)
Line range hint `1-1`: **Verify the impact of removing the GIV token purchase link.** The code segment that rendered an external link for purchasing GIV tokens has been removed. This change eliminates the option to buy GIV tokens directly from this component. Please verify the following: 1. Ensure that removing the GIV token purchase link does not break any existing functionality or user flows. 2. Confirm that there are alternative ways for users to purchase GIV tokens, if necessary. 3. Update any relevant documentation or user guides to reflect the removal of the GIV token purchase link from this component. Run the following script to search for any potential usage or references to the removed code segment:
src/components/views/donate/OnTime/SelectTokenModal/SelectTokenModal.tsx (6)
`16-16`: **LGTM!** The code changes are approved. --- `35-38`: **LGTM!** The code changes are approved. --- `75-82`: **LGTM!** The code changes are approved. --- `84-85`: **LGTM!** The code changes are approved. --- `163-207`: **LGTM!** The code changes are approved. --- `210-216`: **LGTM!** The code changes are approved.
src/components/views/donate/OnTime/OneTimeDonationCard.tsx (1)
Line range hint `281-289`: **LGTM!** The addition of the return type annotation `: bigint` to the `useMemo` hook improves type safety and aligns with TypeScript best practices. The change is safe and does not introduce any issues.
src/config/production.tsx (4)
`152-152`: **LGTM!** The change to unify the GIV buy link across different environments looks good. --- `298-298`: **LGTM!** The change is consistent with the update made in the `MAINNET_CONFIG` section and further unifies the GIV buy link. --- `444-444`: **LGTM!** The change is consistent with the updates made in the `MAINNET_CONFIG` and `GNOSIS_CONFIG` sections and further unifies the GIV buy link. --- `585-585`: **LGTM!** The change is consistent with the updates made in the other config sections and completes the unification of the GIV buy link across all environments.
lang/en.json (1)
`214-214`: **Ensure the label change does not negatively impact user experience.** The label has been changed from `"Bridge your GIV"` to `"Get or Bridge GIV"`. This expands the meaning to include obtaining GIV tokens in addition to bridging. Verify that this change aligns with the intended user interaction and experience. Ensure it does not create confusion or set incorrect expectations for users on how they can acquire GIV tokens.
lang/es.json (1)
`214-214`: **The change to the "label.bridge_your_giv" value looks good!** Adding "Obtén o" before "Mueve tu GIV" broadens the meaning to include both obtaining new GIV tokens and moving existing ones. This improves the label's clarity for Spanish-speaking users.
lang/ca.json (1)
`214-214`: **Label change looks good!** The updated label `"Obteniu o Mou el teu GIV"` enhances clarity by suggesting both obtaining and moving GIV tokens. This can improve user understanding and interaction with the bridging feature.
--- 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 - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit .` - `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 generate interesting stats about this repository and render them as a table.` - `@coderabbitai show all the console.log statements in this repository.` - `@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 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](https://docs.coderabbit.ai/guides/configure-coderabbit) 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](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.