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

feat: signup password hint #959

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

anikdhabal
Copy link
Contributor

@anikdhabal anikdhabal commented Feb 23, 2024

fixes #954

14b819e39cfe404188af025df75cd6d9.mp4

Summary by CodeRabbit

  • New Features
    • Introduced a new HintedPasswordInput component across the app which enhances password fields with interactive validation hints to help users create stronger passwords.
  • Enhancements
    • Updated password validation rules to include requirements for uppercase, lowercase, digits, and special characters, ensuring improved security.
  • Refactor
    • Improved import organization in the password input components for better code clarity.

Copy link
Contributor

coderabbitai bot commented Feb 23, 2024

Important

Review Skipped

Auto reviews are limited to the following labels: coderabbit. Please add one of these labels to enable auto reviews.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The recent updates focus on enhancing password input components across various forms by introducing HintedPasswordInput, which provides dynamic validation feedback and visual indicators for password criteria. This change aligns with the need for more interactive and user-friendly password inputs, particularly highlighted in the signup process.

Changes

File Path Change Summary
.../forms/reset-password.tsx Imported ZHintedPasswordSchema, replaced PasswordInput with HintedPasswordInput.
.../forms/signup.tsx Replaced ZPasswordSchema with ZHintedPasswordSchema, updated component to HintedPasswordInput.
.../auth-router/schema.ts Added ZHintedPasswordSchema with detailed password validation rules.
.../primitives/password-input.tsx Reorganized import statements, improving code readability.
.../primitives/hinted-password-input.tsx Introduced HintedPasswordInput component for enhanced password input with hints.

Assessment against linked issues

Objective Addressed Explanation
Show password hints in signup form [#954]

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>.
    • 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.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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

vercel bot commented Feb 23, 2024

@anikdhabal is attempting to deploy a commit to the Documenso Team Team on Vercel.

A member of the Team first needs to authorize it.

@prajwalkulkarni
Copy link
Contributor

As per the React docs, it is advised to use useEffect to synchronize the component with an external system. Since no synchronizations are being done here, I believe the code in the effect handler can be extracted out and conditionally executed in the component, i.e., the validation can run whenever the input is changed and the user has focused on the input field. This way we can get rid of the useEffect. What do you think?

@anikdhabal anikdhabal changed the title feat: password hint feat: signup password hint Feb 24, 2024
@adithyaakrishna
Copy link
Member

@anikdhabal The in-built schema validation is giving errors due to the changes to password-input.tsx file. I've also attached the screenshots below for reference

Sign up:

Screenshot 2024-03-01 at 13 35 29

Sign in:

Screenshot 2024-03-01 at 13 34 17

@github-actions github-actions bot added the apps: web Issues related to the webapp label Mar 6, 2024
@anikdhabal
Copy link
Contributor Author

@anikdhabal The in-built schema validation is giving errors due to the changes to password-input.tsx file. I've also attached the screenshots below for reference

Sign up:

Screenshot 2024-03-01 at 13 35 29 **Sign in:** Screenshot 2024-03-01 at 13 34 17

Hey @adithyaakrishna thanks for the review. I've fixed it.

@dguyen
Copy link
Collaborator

dguyen commented Apr 4, 2024

Some feedback on the design, I haven't looked at the code yet:

  • This doesn't really work with many resolutions since it'll overflow out of the screen, especially with the new sign up form design
  • The arrow symbol should probably match the color of the tooltip on light theme

Maybe have a look at the PopOver primitive?

@anikdhabal
Copy link
Contributor Author

Some feedback on the design, I haven't looked at the code yet:

  • This doesn't really work with many resolutions since it'll overflow out of the screen, especially with the new sign up form design
  • The arrow symbol should probably match the color of the tooltip on light theme

Maybe have a look at the PopOver primitive?

Thank you for the review. We can move the tooltip to the left side from the right as it is overflows in the new design. Additionally, I will fix the arrow symbol.

Copy link

vercel bot commented May 25, 2024

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

Name Status Preview Comments Updated (UTC)
stg-docs ❌ Failed (Inspect) May 25, 2024 4:50am

@anikdhabal
Copy link
Contributor Author

@Mythie any update on this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apps: web Issues related to the webapp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: signup password hint
4 participants