-
Notifications
You must be signed in to change notification settings - Fork 816
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe recent update streamlines user account management by focusing on the account claiming process. It introduces the Changes
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Thank you for following the naming conventions for pull request titles! 💚🚀 |
apps/web/src/app/(signing)/sign/[token]/complete/claim-account.tsx
Outdated
Show resolved
Hide resolved
apps/web/src/app/(signing)/sign/[token]/complete/claim-account.tsx
Outdated
Show resolved
Hide resolved
@coderabbitai review |
|
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. |
Got it 👍 |
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: 2
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'], | ||
}, | ||
); |
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.
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.
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(); |
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.
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
🚨 @catalinpit has 6 pull requests awaiting review. Please consider reviewing them when possible. 🚨 |
Summary by CodeRabbit
New Features
Enhancements