mirror of
https://github.com/block/buzz.git
synced 2026-11-13 04:41:12 +00:00
Polish welcome message copy
Signed-off-by: Clay Delk <clay.delk@gmail.com>
This commit is contained in:
@@ -82,12 +82,13 @@ export function WelcomeChannelSettings() {
|
||||
<SettingsOptionGroup>
|
||||
<SettingsOptionRow data-testid="welcome-channel-row">
|
||||
<div className="min-w-0 flex-1">
|
||||
<p className="text-sm font-medium">Welcome channel</p>
|
||||
<p className="text-sm font-medium">Custom welcome message</p>
|
||||
<p
|
||||
className="text-xs text-muted-foreground/70"
|
||||
data-settings-subcopy
|
||||
>
|
||||
Set the message new members see when they join.
|
||||
Create a message new members will see in their own Welcome
|
||||
channel.
|
||||
</p>
|
||||
</div>
|
||||
<Button
|
||||
@@ -109,15 +110,13 @@ export function WelcomeChannelSettings() {
|
||||
<DialogHeader>
|
||||
<DialogTitle>
|
||||
{creationMode === "assist"
|
||||
? "Help me write a welcome message"
|
||||
: savedMessage
|
||||
? "Edit welcome message"
|
||||
: "Create a welcome message"}
|
||||
? "Get writing help"
|
||||
: "Custom welcome message"}
|
||||
</DialogTitle>
|
||||
<DialogDescription>
|
||||
{creationMode === "assist"
|
||||
? "Describe what you want new members to know. We’ll create a structured draft you can edit."
|
||||
: "Write freely, then right-click to insert a member, link, image, or channel."}
|
||||
? "Describe what new members should know, and generate a draft you can edit."
|
||||
: "Welcome new members and share helpful information, channels, and community practices. Right-click to add names, channels, images, or links."}
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
@@ -129,11 +128,12 @@ export function WelcomeChannelSettings() {
|
||||
autoFocus
|
||||
className="min-h-0 flex-1 resize-none rounded-2xl border-border/50 bg-background/80 px-4 py-3 text-base shadow-none placeholder:text-muted-foreground/65"
|
||||
onChange={(event) => setAssistantPrompt(event.target.value)}
|
||||
placeholder="Welcome new members by name, ask them to introduce themselves in #introductions, and share our community guide and team photo."
|
||||
placeholder="Welcome new members by name. Ask them to introduce themselves in #introductions, then share our community guide and team photo."
|
||||
value={assistantPrompt}
|
||||
/>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
Include the tone, links, images, and channels you want to use.
|
||||
Describe the tone and include any links, images, or channels
|
||||
you want to share.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -143,7 +143,7 @@ export function WelcomeChannelSettings() {
|
||||
type="button"
|
||||
variant="ghost"
|
||||
>
|
||||
Create manually
|
||||
Back to editor
|
||||
</Button>
|
||||
<Button
|
||||
aria-busy={isGenerating}
|
||||
|
||||
@@ -78,13 +78,19 @@ const NEW_MEMBER_TOKEN = "{{member}}";
|
||||
const ALL_TOKEN_PATTERN = /\{\{member\}\}|\{\{insert:([^}]+)\}\}/g;
|
||||
|
||||
export const DEFAULT_MESSAGE: WelcomeMessage = {
|
||||
text: `Welcome, ${NEW_MEMBER_TOKEN}! We’re so glad you’re here. Take a look around and tell us what you’re excited to build.\n\nIntroduce yourself and visit {{insert:community-guide}} to get started.`,
|
||||
text: `Welcome, ${NEW_MEMBER_TOKEN}! We’re glad you’re here. Take a look around.\n\nIntroduce yourself in {{insert:choose-channel}}, and visit {{insert:add-link}} to learn more about our community.`,
|
||||
inserts: [
|
||||
{
|
||||
id: "community-guide",
|
||||
id: "choose-channel",
|
||||
type: "channel",
|
||||
title: "Choose a channel",
|
||||
url: "",
|
||||
},
|
||||
{
|
||||
id: "add-link",
|
||||
type: "link",
|
||||
title: "Community guide",
|
||||
url: "https://example.com/community-guide",
|
||||
title: "Add a link",
|
||||
url: "",
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
@@ -115,7 +115,7 @@ test("builds a personalized welcome sequence", async ({ page }) => {
|
||||
await expect(welcomeSettings).toBeVisible();
|
||||
await welcomeSettings.scrollIntoViewIfNeeded();
|
||||
const welcomeRow = welcomeSettings.getByTestId("welcome-channel-row");
|
||||
await expect(welcomeRow).toContainText("Welcome channel");
|
||||
await expect(welcomeRow).toContainText("Custom welcome message");
|
||||
await expect(
|
||||
welcomeRow.getByRole("button", { name: "Create" }),
|
||||
).toBeVisible();
|
||||
@@ -385,7 +385,7 @@ test("builds a personalized welcome sequence", async ({ page }) => {
|
||||
await expect(welcomeRow.getByRole("button", { name: "Edit" })).toBeVisible();
|
||||
await welcomeRow.getByRole("button", { name: "Edit" }).click();
|
||||
await expect(
|
||||
builder.getByRole("heading", { name: "Edit welcome message" }),
|
||||
builder.getByRole("heading", { name: "Custom welcome message" }),
|
||||
).toBeVisible();
|
||||
await expect(builder.getByRole("button", { name: "Save" })).toBeDisabled();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user