Refine community management flows (#2738)

## Summary
- simplify Add community into clear create and join paths
- align community actions and icon editing across the rail, profile
menu, and settings
- consolidate invites around the member list and a reusable link dialog

## Testing
- `pnpm check`
- `pnpm test` (3,483 passed)
- `pnpm run build:e2e`
- focused Playwright coverage (34 passed)

## Snapshots

| Add a community | Join an existing community |
| --- | --- |
| ![Add a
community](https://raw.githubusercontent.com/block/buzz/fae692faa77186df7702fb025ca3082c7cc93a8c/pr-2738--01-add-community.png)
| ![Join an existing
community](https://raw.githubusercontent.com/block/buzz/fae692faa77186df7702fb025ca3082c7cc93a8c/pr-2738--02-join-community.png)
|

| Create a new community | Hosted community icon |
| --- | --- |
| ![Create a new
community](https://raw.githubusercontent.com/block/buzz/fae692faa77186df7702fb025ca3082c7cc93a8c/pr-2738--03-create-community.png)
| ![Hosted community
icon](https://raw.githubusercontent.com/block/buzz/fae692faa77186df7702fb025ca3082c7cc93a8c/pr-2738--04-community-icon.png)
|

| Invites | Invite link |
| --- | --- |
|
![Invites](https://raw.githubusercontent.com/block/buzz/fae692faa77186df7702fb025ca3082c7cc93a8c/pr-2738--05-invites.png)
| ![Invite
link](https://raw.githubusercontent.com/block/buzz/fae692faa77186df7702fb025ca3082c7cc93a8c/pr-2738--06-invite-link.png)
|

---------

Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Co-authored-by: Wes <wesbillman@users.noreply.github.com>
Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz>
This commit is contained in:
klopez4212
2026-07-25 03:30:33 +01:00
committed by GitHub
parent 60a171b19e
commit 384c72dee6
36 changed files with 2425 additions and 1237 deletions

View File

@@ -179,26 +179,22 @@ test("add-community deep link opens one editable prefill and acknowledges the qu
await page.goto("/");
await expect(
page.getByRole("heading", { name: "Add Community" }),
page.getByRole("heading", { name: "Join an existing community" }),
).toBeVisible();
const relayInput = page.locator("#ws-relay-url");
const nameInput = page.locator("#ws-name");
await expect(relayInput).toHaveValue(PENDING_ADD_COMMUNITY_LINK.relayUrl);
await expect(nameInput).toHaveValue(PENDING_ADD_COMMUNITY_LINK.name);
const communityInput = page.getByLabel("Community URL or invite link");
await expect(communityInput).toHaveValue(PENDING_ADD_COMMUNITY_LINK.relayUrl);
await expect(page.getByLabel("Name")).toHaveCount(0);
await nameInput.fill("Edited Team");
await expect(nameInput).toHaveValue("Edited Team");
await page.getByRole("button", { name: "Cancel" }).click();
await page.getByRole("button", { name: "Close" }).click();
await expect(
page.getByRole("heading", { name: "Add Community" }),
page.getByRole("heading", { name: "Join an existing community" }),
).toHaveCount(0);
await page.getByTestId("sidebar-profile-avatar-button").click();
await page.getByTestId("community-switcher").click();
await page.getByRole("menuitem", { name: "Add Community" }).click();
await expect(relayInput).toHaveValue("");
await expect(nameInput).toHaveValue("");
await page.getByRole("menuitem", { name: "Add a community" }).click();
await page.getByTestId("add-community-join").click();
await expect(communityInput).toHaveValue("");
const acknowledgements = await page.evaluate(() =>
(window.__BUZZ_E2E_COMMAND_LOG__ ?? []).filter(
@@ -228,10 +224,8 @@ test("queued add-community links open and acknowledge one at a time", async ({
);
await page.goto("/");
const relayInput = page.locator("#ws-relay-url");
const nameInput = page.locator("#ws-name");
await expect(relayInput).toHaveValue(PENDING_ADD_COMMUNITY_LINK.relayUrl);
await expect(nameInput).toHaveValue(PENDING_ADD_COMMUNITY_LINK.name);
const communityInput = page.getByLabel("Community URL or invite link");
await expect(communityInput).toHaveValue(PENDING_ADD_COMMUNITY_LINK.relayUrl);
await expect
.poll(() =>
@@ -246,12 +240,11 @@ test("queued add-community links open and acknowledge one at a time", async ({
)
.toEqual([{ id: PENDING_ADD_COMMUNITY_LINK.id }]);
await page.getByRole("button", { name: "Cancel" }).click();
await page.getByRole("button", { name: "Close" }).click();
await expect(relayInput).toHaveValue(
await expect(communityInput).toHaveValue(
SECOND_PENDING_ADD_COMMUNITY_LINK.relayUrl,
);
await expect(nameInput).toHaveValue(SECOND_PENDING_ADD_COMMUNITY_LINK.name);
await expect
.poll(() =>
page.evaluate(() =>