Skip to content

feat: allow add myself feature#73

Merged
Mythie merged 1 commit into
mainfrom
feat/allow-add-myself-on-embeds
May 5, 2026
Merged

feat: allow add myself feature#73
Mythie merged 1 commit into
mainfrom
feat/allow-add-myself-on-embeds

Conversation

@dguyen
Copy link
Copy Markdown
Contributor

@dguyen dguyen commented May 1, 2026

Add support for "Add Myself" button in the envelope create and edit flows

Introduces a new optional "user" prop

user?: {
    name?: string;
    email?: string;
  };

Copilot AI review requested due to automatic review settings May 1, 2026 05:49
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 user to the encoded embed options payload (URL hash) for create/update across frameworks.
  • Updates the playground create/update configurators to collect user.name / user.email and 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 thread packages/angular/src/create-envelope.ts
Comment thread packages/angular/src/update-envelope.ts
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 Mythie merged commit 956a4f2 into main May 5, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants