mirror of
https://github.com/block/buzz.git
synced 2026-10-30 05:51:46 +00:00
Add hover feedback to welcome insert menu
Signed-off-by: kenny lopez <klopez4212@gmail.com>
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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`,
|
||||
|
||||
Reference in New Issue
Block a user