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: add cta on complete page #1028

Merged
merged 22 commits into from
Apr 11, 2024
Merged

feat: add cta on complete page #1028

merged 22 commits into from
Apr 11, 2024

Conversation

catalinpit
Copy link
Contributor

@catalinpit catalinpit commented Mar 15, 2024

CleanShot 2024-03-18 at 11 45 40
CleanShot 2024-03-18 at 11 46 25

Summary by CodeRabbit

  • New Features

    • Introduced a "Claim Account" feature allowing new users to sign up by providing their name, email, and password.
    • Enhanced user experience for both logged-in and non-logged-in users with improved UI/UX and additional functionality.
  • Enhancements

    • Implemented form validation and error handling for a smoother sign-up process.
    • Integrated analytics to track user actions during account claiming.

Copy link

vercel bot commented Mar 15, 2024

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

Name Status Preview Comments Updated (UTC)
prd-app 🔄 Building (Inspect) Visit Preview Apr 11, 2024 7:08am
prd-marketing 🔄 Building (Inspect) Visit Preview Apr 11, 2024 7:08am
stg-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2024 7:08am
stg-marketing ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2024 7:08am

Copy link
Contributor

coderabbitai bot commented Mar 15, 2024

Walkthrough

The recent update streamlines user account management by focusing on the account claiming process. It introduces the ClaimAccount component for efficient account claiming, enhancing account creation workflow with validation, error handling, and analytics tracking. The update also improves user experience for both logged-in and non-logged-in users through UI adjustments and content enhancements.

Changes

File Path Change Summary
.../sign/[token]/complete/claim-account.tsx Introduced ClaimAccount form component with validation, submission handling, and error messaging for account claiming.
.../sign/[token]/complete/page.tsx Enhanced UI/UX with added imports, updated structure, improved layout, styling, and new content for document status and account claiming logic for non-logged-in users.

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.

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

github-actions bot commented Mar 15, 2024

Thank you for following the naming conventions for pull request titles! 💚🚀

@catalinpit
Copy link
Contributor Author

@coderabbitai review

@ElTimuro
Copy link
Member

ElTimuro commented Apr 5, 2024

  • Minor point, the copy should mention you get the document you signed in directly in the account

Mythie
Mythie previously approved these changes Apr 10, 2024
@dguyen
Copy link
Collaborator

dguyen commented Apr 10, 2024

Minor UI issues

The BG is cropped out

image

The top padding for unauthenticated layouts is gone

image

@catalinpit
Copy link
Contributor Author

catalinpit commented Apr 10, 2024

Minor UI issues

The BG is cropped out

image

The top padding for unauthenticated layouts is gone

image

How do you keep finding these? 😆

I testes them locally a zillion times on different screens to make sure they look good and you still found something, haha. Will try to fix these! Thanks! 🙏

Regarding this "The top padding for unauthenticated layouts is gone", I removed it because there was an unnecessary scrolling. Should I add it back? Imo, it looks better like this.

@dguyen
Copy link
Collaborator

dguyen commented Apr 10, 2024

Regarding this "The top padding for unauthenticated layouts is gone", I removed it because there was an unnecessary scrolling. Should I add it back? Imo, it looks better like this.

As in it caused unnecessarily scrolling due to the general height of the page?

PDF lengths range in size, normally they're multi pages for signatures and such so there usually would be scrolling anyway

@catalinpit
Copy link
Contributor Author

catalinpit commented Apr 10, 2024

Regarding this "The top padding for unauthenticated layouts is gone", I removed it because there was an unnecessary scrolling. Should I add it back? Imo, it looks better like this.

As in it caused unnecessarily scrolling due to the general height of the page?

PDF lengths range in size, normally they're multi pages for signatures and such so there usually would be scrolling anyway

I'm writing these on my mobile, so I wasn't super explicit. Sorry!

I know there would be scrolling because PDFs are of different sizes.

"As in it caused unnecessarily scrolling due to the general height of the page?"

Yes. Even if you have a PDF with one page, you'll have to scroll because of excessive padding at the top.

@dguyen
Copy link
Collaborator

dguyen commented Apr 10, 2024

Got it 👍

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: 2

Comment on lines +32 to +47
export const ZClaimAccountFormSchema = z
.object({
name: z.string().trim().min(1, { message: 'Please enter a valid name.' }),
email: z.string().email().min(1),
password: ZPasswordSchema,
})
.refine(
(data) => {
const { name, email, password } = data;
return !password.includes(name) && !password.includes(email.split('@')[0]);
},
{
message: 'Password should not be common or based on personal information',
path: ['password'],
},
);
Copy link
Contributor

Choose a reason for hiding this comment

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

The form schema and validation logic are well-implemented. Consider enhancing the email validation to ensure it adheres to more specific requirements than just a minimum length.

- email: z.string().email().min(1),
+ email: z.string().email().min(5, { message: "Email must be at least 5 characters long" }),

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
export const ZClaimAccountFormSchema = z
.object({
name: z.string().trim().min(1, { message: 'Please enter a valid name.' }),
email: z.string().email().min(1),
password: ZPasswordSchema,
})
.refine(
(data) => {
const { name, email, password } = data;
return !password.includes(name) && !password.includes(email.split('@')[0]);
},
{
message: 'Password should not be common or based on personal information',
path: ['password'],
},
);
export const ZClaimAccountFormSchema = z
.object({
name: z.string().trim().min(1, { message: 'Please enter a valid name.' }),
email: z.string().email().min(5, { message: "Email must be at least 5 characters long" }),
password: ZPasswordSchema,
})
.refine(
(data) => {
const { name, email, password } = data;
return !password.includes(name) && !password.includes(email.split('@')[0]);
},
{
message: 'Password should not be common or based on personal information',
path: ['password'],
},
);

@@ -254,7 +254,7 @@ test('[DOCUMENT_FLOW]: should be able to create, send and sign a document', asyn
await page.getByRole('button', { name: 'Sign' }).click();

await page.waitForURL(`/sign/${token}/complete`);
await expect(page.getByText('You have signed')).toBeVisible();
await expect(page.getByText('Document Signed')).toBeVisible();
Copy link
Contributor

Choose a reason for hiding this comment

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

Tip

Codebase Verification

The text "Document Signed" found in the UI includes an exclamation mark ("Document Signed!"), which is not present in the text checked in the test script. This might lead to inconsistencies in test validations. It's recommended to align the text in the test with the actual UI text to ensure accurate testing.

Analysis chain

The update in the text check from 'You have signed' to 'Document Signed' aligns with the UI changes. Verify that this text change is consistent across all relevant parts of the application to maintain uniformity.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the text 'Document Signed' is used consistently in the UI where applicable.
rg --type html --type tsx 'Document Signed'

Length of output: 73



Script:

#!/bin/bash
# Verify that the text 'Document Signed' is used consistently in the UI where applicable.
rg 'Document Signed' --glob '*.html' --glob '*.tsx'

Length of output: 177

dguyen
dguyen previously approved these changes Apr 10, 2024
Copy link

🚨 @catalinpit has 6 pull requests awaiting review. Please consider reviewing them when possible. 🚨

@catalinpit catalinpit merged commit 8b58f10 into main Apr 11, 2024
13 checks passed
@catalinpit catalinpit deleted the feat/add-cta-on-complete-page branch April 11, 2024 07:09
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 🚨 e2e changes 🚨
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants