-
Notifications
You must be signed in to change notification settings - Fork 11
Fix clipped emoji in reaction pills #339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,37 @@ import { createServer } from "./vite-server.mjs"; | |
| import react from "@vitejs/plugin-react"; | ||
| import { fileURLToPath } from "node:url"; | ||
|
|
||
| test("native reaction emoji fit inside compact pills", async ({ page }) => { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This case uses the standard stateless source configuration and no mutable server middleware, but declaring it with the base AGENTS.md reference: AGENTS.md:L112-L115 Useful? React with 👍 / 👎. |
||
| const server = await createServer({ | ||
| root: fileURLToPath(new URL("../../", import.meta.url)), | ||
| configFile: false, | ||
| envFile: false, | ||
| plugins: [react()], | ||
| logLevel: "error", | ||
| server: { host: "127.0.0.1", port: 0 }, | ||
| }); | ||
| try { | ||
| await server.listen(); | ||
| await page.goto( | ||
| `http://127.0.0.1:${server.httpServer.address().port}/tests/fixtures/emoji.html?reactions&wrap`, | ||
| ); | ||
| for (const emoji of ["👍", "🙌"]) { | ||
| const pill = page.locator(`button[data-reaction="${emoji}"]`); | ||
| const glyph = pill.locator("span").first(); | ||
| await expect(pill).toHaveCSS("height", "28px"); | ||
| await expect(glyph).toHaveCSS("min-width", "18px"); | ||
| await expect(glyph).toHaveCSS("height", "18px"); | ||
| await expect(glyph).toHaveCSS("font-size", "14px"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Every Chromium and WebKit functional run also executes AGENTS.md reference: AGENTS.md:L144-L149 Useful? React with 👍 / 👎. |
||
| await expect(glyph).toHaveCSS("line-height", "18px"); | ||
| } | ||
| await page.locator('button[data-reaction="👍"]').screenshot({ | ||
| path: test.info().outputPath("native-reaction-emoji.png"), | ||
| }); | ||
| } finally { | ||
| await server.close(); | ||
| } | ||
| }); | ||
|
|
||
| test("reaction plus opens a visible emoji-only picker, restores focus and publishes custom emoji", async ({ | ||
| page, | ||
| }) => { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P2] Update the existing reaction-polish size assertion alongside this change
Switching native emoji to
--text-body-smchanges the default computed size from 12px to 14px, buttests/browser/reactions-polish.spec.mjs:30still asserts12pxon the same native glyph. That retained journey is selected in both browser projects, so adding the new 14px assertion inreactions.spec.mjsleaves the suite inconsistent and stops the older journey before its preview/toggle/inline-add checks. The completed Chromium 2/3 job already confirms this exact failure (expected 12px, received 14px): https://github.com/block/buzz-app/actions/runs/36412891794/job/108897041312 . Update the retained assertion to the intended 14px contract, keep its downstream behavior checks, and revalidate both reaction specs in Chromium and WebKit rather than reverting the glyph fix or weakening the assertions.