Repository navigation
feat: force signature fields for document signers - #1139
Conversation
WalkthroughThe recent changes introduce several key updates including a new "Direct Links" feature for asynchronous digital signing, enhancements to contract management for freelancers, the announcement of new pricing plans, and various code refinements. These updates emphasize flexibility, efficiency, and improved user workflow, particularly in the realm of digital signatures and document management. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant WebApp
participant DirectLinksService
participant DocumentTemplate
participant Signer
User->>WebApp: Request to create Direct Link
WebApp->>DirectLinksService: Create link with template
DirectLinksService->>DocumentTemplate: Prepare document template
DocumentTemplate->>DirectLinksService: Return prepared template
DirectLinksService->>WebApp: Provide Direct Link
WebApp->>User: Display Direct Link
Signer->>DirectLinksService: Access Direct Link
DirectLinksService->>DocumentTemplate: Retrieve document
DocumentTemplate->>DirectLinksService: Provide document for signing
DirectLinksService->>Signer: Display document for signing
Signer->>DirectLinksService: Submit signed document
DirectLinksService->>WebApp: Notify of document signing
Poem
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 (
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
| </DialogDescription> | ||
| </DialogHeader> | ||
| <DialogFooter> | ||
| <div className="flex w-full flex-nowrap gap-4"> |
There was a problem hiding this comment.
I think you should remove this div so we can use the normal layout for footers to stay consistent
There was a problem hiding this comment.
Ok, thanks. I did it, although the buttons on the webhook modal is also like this (buttons on the left side). I guess I should update that as well?
There was a problem hiding this comment.
Yeah just use the defaults which is right side
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (5)
- packages/app-tests/e2e/document-flow/stepper-component.spec.ts (4 hunks)
- packages/lib/server-only/document/send-document.tsx (5 hunks)
- packages/prisma/seed/documents.ts (1 hunks)
- packages/ui/primitives/document-flow/add-fields.tsx (4 hunks)
- packages/ui/primitives/document-flow/missing-signature-field-dialog.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (3)
- packages/lib/server-only/document/send-document.tsx
- packages/ui/primitives/document-flow/add-fields.tsx
- packages/ui/primitives/document-flow/missing-signature-field-dialog.tsx
Additional comments not posted (2)
packages/prisma/seed/documents.ts (1)
357-359: Enhancement to include document metadata is appropriate.The inclusion of
documentMeta: trueensures that metadata is fetched along with the document, aligning with the new feature requirements to check for signature fields. This is a positive change for data completeness and integrity.packages/app-tests/e2e/document-flow/stepper-component.spec.ts (1)
Line range hint
295-330: Proper implementation of the test for preventing document creation without signatures.The test correctly checks for the presence of a dialog informing the user about the missing signature field, which aligns with the new feature's requirements. Ensure that the dialog text 'No signature field found' matches exactly with what is implemented in the UI component.
Verification successful
Verified: The dialog text 'No signature field found' matches the UI component's implementation.
The search results confirm that the dialog text in the test case matches the text used in the UI component (
DialogTitle). The test case correctly verifies the functionality that prevents document creation without signatures.
packages/ui/primitives/document-flow/missing-signature-field-dialog.tsx:<DialogTitle>No signature field found</DialogTitle>packages/app-tests/e2e/document-flow/stepper-component.spec.ts:page.getByRole('dialog').getByText('No signature field found').first(),Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the dialog text matches the UI component's implementation. # Test: Search for the dialog component implementation. Expect: Exact match of the dialog text. rg --type typescript $'No signature field found'Length of output: 84
Script:
#!/bin/bash # Description: Verify the dialog text matches the UI component's implementation. # Test: Search for the dialog component implementation. Expect: Exact match of the dialog text. rg --type ts 'No signature field found'Length of output: 314
Description
Show a dialog when the document has signers with no signature fields placed.
Changes Made
Created a new dialog that'll be triggered when the document owner tries to send a document to the signers without placing signature fields. The document owners can't proceed to the next step unless they add signature fields.
Checklist
signer.mp4
Summary by CodeRabbit
New Features
MissingSignatureFieldDialogcomponent to ensure users don't miss adding signature fields.Enhancements
Bug Fixes
Refactor
Tests