feat: allow add myself feature for embeds#2754
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Adds support for passing “current user” details into the embedded v2 authoring experience so the UI can offer an “Add Myself” recipient shortcut when authoring via embeds (coordinated with embeds repo changes).
Changes:
- Extend v2 embed authoring hash schemas/types to accept an optional
userobject (email,name). - Plumb
embedAuthoringOptions.userinto the embedded editor config for both create and edit embed routes. - Update the recipients UI to use embedded
userinfo (when present) for “Add Myself”, and document the new prop.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/lib/types/envelope-editor.ts | Adds user to embed authoring Zod schemas and to EnvelopeEditorConfig.embedded. |
| apps/remix/app/routes/embed+/v2+/authoring+/envelope.edit.$id.tsx | Passes user into the embedded editor config for edit flow. |
| apps/remix/app/routes/embed+/v2+/authoring+/envelope.create._index.tsx | Passes user into the embedded editor config for create flow. |
| apps/remix/app/components/general/envelope-editor/envelope-editor-recipient-form.tsx | Uses embedded user to power the “Add Myself” behavior in embedded mode. |
| apps/docs/content/docs/developers/embedding/authoring/v2.mdx | Documents the new user prop for v2 authoring components. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| customBrandingLogo: Boolean(teamSettings.brandingEnabled && teamSettings.brandingLogo), | ||
| user: embedAuthoringOptions.user, | ||
| }), | ||
| [token], |
| user: z | ||
| .object({ | ||
| email: z.string().email().optional(), | ||
| name: z.string().optional(), | ||
| }) | ||
| .optional(), |
| brandingLogo, | ||
| user: embedAuthoringOptions.user, | ||
| }), | ||
| [token], |
Description
Update embed envelope authoring to allow a "user" prop.
Passing in a user prop will enable the "Add Myself" feature.
The required PR changes on the embed repo side are here documenso/embeds#73