Add hover feedback to welcome insert menu

Signed-off-by: kenny lopez <klopez4212@gmail.com>
This commit is contained in:
kenny lopez
2026-08-27 18:14:56 +01:00
parent 8427694538
commit fe090044d8
2 changed files with 29 additions and 5 deletions

View File

@@ -834,19 +834,31 @@ export function WelcomeComposer({
/>
</ContextMenuTrigger>
<ContextMenuContent className={ACTION_TRAY_SURFACE_CLASS}>
<ContextMenuItem onSelect={() => insertAtCaret("member")}>
<ContextMenuItem
className="hover:bg-muted/50 hover:text-foreground"
onSelect={() => insertAtCaret("member")}
>
<UserRound className="h-4 w-4" />
New member’s name
</ContextMenuItem>
<ContextMenuItem onSelect={() => insertAtCaret("link")}>
<ContextMenuItem
className="hover:bg-muted/50 hover:text-foreground"
onSelect={() => insertAtCaret("link")}
>
<Link2 className="h-4 w-4" />
Link
</ContextMenuItem>
<ContextMenuItem onSelect={() => insertAtCaret("image")}>
<ContextMenuItem
className="hover:bg-muted/50 hover:text-foreground"
onSelect={() => insertAtCaret("image")}
>
<ImageIcon className="h-4 w-4" />
Image
</ContextMenuItem>
<ContextMenuItem onSelect={() => insertAtCaret("channel")}>
<ContextMenuItem
className="hover:bg-muted/50 hover:text-foreground"
onSelect={() => insertAtCaret("channel")}
>
<Hash className="h-4 w-4" />
Channel
</ContextMenuItem>

View File

@@ -146,7 +146,19 @@ test("builds a personalized welcome sequence", async ({ page }) => {
);
const editor = builder.getByTestId("welcome-inline-message");
await editor.click({ button: "right", position: { x: 420, y: 22 } });
await expect(page.getByRole("menuitem", { name: "Link" })).toBeVisible();
const linkMenuItem = page.getByRole("menuitem", { name: "Link" });
await expect(linkMenuItem).toBeVisible();
const restingMenuItemColor = await linkMenuItem.evaluate(
(element) => getComputedStyle(element).backgroundColor,
);
await linkMenuItem.hover();
await expect
.poll(() =>
linkMenuItem.evaluate(
(element) => getComputedStyle(element).backgroundColor,
),
)
.not.toBe(restingMenuItemColor);
await waitForAnimations(page);
await builder.screenshot({
path: `${OUTDIR}/03-welcome-channel-builder.png`,