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
64 stars 33 forks source link

Feat/Verification of the user email #4862

Closed kkatusic closed 3 days ago

kkatusic commented 2 weeks ago

Depends also on:

Summary by CodeRabbit

Release Notes

vercel[bot] commented 2 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 Nov 21, 2024 1:20pm
coderabbitai[bot] commented 4 days ago

Walkthrough

This pull request implements enhancements to the email verification process across multiple localization files and components. It introduces new labels for email verification messages in Catalan, English, and Spanish, along with modifications for existing labels to ensure consistency. Additionally, new components and methods are added to manage email verification within the user interface, including the VerifyEmailBanner and InputUserEmailVerify. The changes also update context and GraphQL queries to incorporate email verification status, improving user feedback and interaction during the email verification workflow.

Changes

File Change Summary
lang/ca.json, lang/en.json, lang/es.json Added multiple new labels for email verification processes and modified existing labels for consistency.
pages/account.tsx Added VerifyEmailBanner component to display email verification status.
pages/project/[projectIdSlug]/index.tsx Removed console log from ProjectRoute component; no functional changes made.
src/apollo/gql/gqlUser.ts Introduced two new GraphQL mutations for sending email confirmation codes.
src/apollo/types/types.ts Added optional isEmailVerified property to the IUser interface.
src/components/InputUserEmailVerify.tsx Introduced a new component for handling email verification input, including validation and state management.
src/components/modals/EditUserModal.tsx Updated email input handling by importing InputUserEmailVerify and changing the email field label.
src/components/views/onboarding/InfoStep.tsx Enhanced email verification workflow with new state variables and functions for handling verification email and code input.
src/components/views/project/ProjectIndex.tsx Added conditional rendering for VerifyEmailBanner based on admin email verification status.
src/components/views/project/projectActionCard/AdminActions.tsx Introduced VerifyNotification component to prompt email verification for admins, with updated rendering logic for desktop and mobile views.
src/components/views/userProfile/VerifyEmailBanner.tsx Created new component for displaying email verification status with navigation functionality.
src/components/views/userProfile/projectsTab/ProfileProjectsTab.tsx Added conditional styling for ProjectsContainer based on email verification status.
src/context/profile.context.tsx Added updateUser method to ProfileContext for updating user data.
src/context/project.context.tsx Introduced isAdminEmailVerified property to IProjectContext for tracking admin email verification status.
src/features/user/user.queries.ts Added isEmailVerified field to the GET_USER_BY_ADDRESS GraphQL query.

Possibly related PRs

Suggested reviewers

Poem

🐇 In the meadow, bright and wide,
New messages for all to guide.
Verify your email, take a chance,
With clear instructions, join the dance!
Hops of joy, let’s celebrate,
A smoother path, oh, isn’t it great? 🌼

[!WARNING] There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure.

🔧 eslint (1.23.1) > If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration. warning eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options. warning eslint > @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead warning eslint > @humanwhocodes/config-array > @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead warning eslint > file-entry-cache > flat-cache > rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported warning eslint > file-entry-cache > flat-cache > rimraf > glob@7.2.3: Glob versions prior to v9 are no longer supported warning eslint > file-entry-cache > flat-cache > rimraf > glob > inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. warning jest > jest-cli > jest-config > glob@7.2.3: Glob versions prior to v9 are no longer supported warning jest > @jest/core > jest-runtime > glob@7.2.3: Glob versions prior to v9 are no longer supported warning jest > @jest/core > @jest/reporters > glob@7.2.3: Glob versions prior to v9 are no longer supported warning jest > @jest/core > @jest/transform > babel-plugin-istanbul > test-exclude > glob@7.2.3: Glob versions prior to v9 are no longer supported warning @sentry/nextjs > @rollup/plugin-commonjs > glob@8.1.0: Glob versions prior to v9 are no longer supported warning @sentry/nextjs > @rollup/plugin-commonjs > glob > inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.

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 , 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 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://docs.coderabbit.ai) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.