feat: allow add myself feature#73
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for an optional user prefill object (name/email) to the envelope create/edit embedding flows across the playground configurators and all framework wrappers, enabling an “Add Myself” style experience.
Changes:
- Extends create/update embedding prop types to include optional
user?: { name?: string; email?: string }. - Adds
userto the encoded embed options payload (URL hash) for create/update across frameworks. - Updates the playground create/update configurators to collect
user.name/user.emailand pass them through when set.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| playground/src/components/embeddings/update-envelope.tsx | Adds user to the form schema/defaults/UI and forwards it to the React embed component. |
| playground/src/components/embeddings/create-envelope.tsx | Adds user to the form schema/defaults/UI and forwards it to the React embed component. |
| packages/vue/src/update-envelope.vue | Adds user prop type and includes it in the encoded options. |
| packages/vue/src/create-envelope.vue | Adds user prop type and includes it in the encoded options. |
| packages/svelte/src/update-envelope.svelte | Adds user prop/export and includes it in the encoded options. |
| packages/svelte/src/create-envelope.svelte | Adds user prop/export and includes it in the encoded options. |
| packages/solid/src/update-envelope.tsx | Adds user prop type and includes it in the encoded options. |
| packages/solid/src/create-envelope.tsx | Adds user prop type and includes it in the encoded options. |
| packages/react/src/update-envelope.tsx | Adds user prop type and includes it in the encoded options. |
| packages/react/src/create-envelope.tsx | Adds user prop type and includes it in the encoded options. |
| packages/preact/src/update-envelope.tsx | Adds user prop type and includes it in the encoded options. |
| packages/preact/src/create-envelope.tsx | Adds user prop type and includes it in the encoded options. |
| packages/mitosis/src/update-envelope.lite.tsx | Adds user prop type and includes it in the encoded options (source for multi-framework generation). |
| packages/mitosis/src/create-envelope.lite.tsx | Adds user prop type and includes it in the encoded options (source for multi-framework generation). |
| packages/angular/src/update-envelope.ts | Adds user prop type/@input and includes it in the encoded options. |
| packages/angular/src/create-envelope.ts | Adds user prop type/@input and includes it in the encoded options. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+389
to
+396
| user={ | ||
| embedConfig.user?.email || embedConfig.user?.name | ||
| ? { | ||
| email: embedConfig.user.email || undefined, | ||
| name: embedConfig.user.name || undefined, | ||
| } | ||
| : undefined | ||
| } |
Comment on lines
38
to
44
| const encodedOptions = btoa( | ||
| encodeURIComponent( | ||
| JSON.stringify({ | ||
| externalId: props.externalId, | ||
| user: props.user, | ||
| type: props.type, | ||
| folderId: props.folderId, |
Comment on lines
37
to
44
| const encodedOptions = btoa( | ||
| encodeURIComponent( | ||
| JSON.stringify({ | ||
| externalId: props.externalId, | ||
| user: props.user, | ||
| features: props.features, | ||
| css: props.css, | ||
| cssVars: props.cssVars, |
| user: z | ||
| .object({ | ||
| name: z.string().optional(), | ||
| email: z.string().email().optional(), |
Comment on lines
+424
to
+431
| user={ | ||
| embedConfig.user?.email || embedConfig.user?.name | ||
| ? { | ||
| email: embedConfig.user.email || undefined, | ||
| name: embedConfig.user.name || undefined, | ||
| } | ||
| : undefined | ||
| } |
| user: z | ||
| .object({ | ||
| name: z.string().optional(), | ||
| email: z.string().email().optional(), |
Mythie
approved these changes
May 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for "Add Myself" button in the envelope create and edit flows
Introduces a new optional "user" prop