Walk Create Community through the Figma screens and restore a chosen logo after reload, so a guest can leave without saving until they reach the email step.

This commit is contained in:
adilallo committed 2026-11-05 16:14:04 -07:00
1 parent ca1f58a50c
commit 2348a9e94f
61 files changed
+1110 -421

No files matched your search

+12 -6
View File
@@ -21,11 +21,17 @@ export function isValidCreateFlowSaveEmail(value: unknown): boolean {
// Native type=email rejects whitespace; jsdom’s checkValidity does not.
if (/\s/.test(value)) return false;
if (typeof document === "undefined") {
return EMAIL_FALLBACK_PATTERN.test(value);
if (!EMAIL_FALLBACK_PATTERN.test(value)) return false;
} else {
const input = document.createElement("input");
input.type = "email";
input.required = true;
input.value = value;
if (!input.checkValidity()) return false;
}
const input = document.createElement("input");
input.type = "email";
input.required = true;
input.value = value;
return input.checkValidity();
// Native type=email allows a single domain label (`maya@example`). The
// save-progress field needs a dotted domain so we can actually send mail.
const at = value.lastIndexOf("@");
const domain = at >= 0 ? value.slice(at + 1) : "";
return domain.includes(".");
}
+1 -1
View File
@@ -81,7 +81,7 @@ export async function sendMagicLinkEmail(
const { text, html } = buildVerifyLinkParts(
verifyUrl,
"Open this link to sign in (it expires in 60 minutes):",
"If you did not request this, you can ignore this email.",
"If you did not request this, you can ignore this email.\n\nSent because you saved a draft at communityrule.info",
"Sign in",
);
await sendHtmlMail({
@@ -22,6 +22,9 @@ const communityStructureChipSnapshotRowSchema = z.object({
const communityStructureChipSnapshotsSchema = z
.object({
organizationTypes: z.array(communityStructureChipSnapshotRowSchema).optional(),
otherOrganizationTypes: z
.array(communityStructureChipSnapshotRowSchema)
.optional(),
scale: z.array(communityStructureChipSnapshotRowSchema).optional(),
maturity: z.array(communityStructureChipSnapshotRowSchema).optional(),
})
@@ -104,8 +107,10 @@ export const createFlowStateSchema = z
title: z.string().max(500).optional(),
summary: z.string().max(8000).optional(),
communityContext: z.string().max(200).optional(),
communityLocation: z.string().max(200).optional(),
communitySaveEmail: z.string().max(320).optional(),
communityAvatarUrl: z.string().max(512).optional(),
communityAvatarFileName: z.string().max(255).optional(),
previewSurfaceColor: z
.string()
.max(32)