Repository navigation
Conversation
A remote whose text is only emoji (shortcodes like 🙏 count) now drops the bubble fill and shows the emoji at text-3xl, or text-2xl in the compact dock. The bubble keeps its padding and corners, so staged, rejected and jump-highlight states still line up. The long-press preview gets the same treatment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Summary
In Remotes, a message that is only emoji sat in the same blue or grey bubble as text, at text size, so a single 🙏 looked like a small pill. This shows those messages the way most chat apps do: no bubble fill, and the emoji at twice the text size.
Changes
resources/js/lib/emoji-only.tsaddsisEmojiOnly(). It splits the text into graphemes withIntl.Segmenterand accepts emoji with skin tones, ZWJ sequences like 👨👩👧, flags and keycaps, with any spaces or line breaks between them. Symbols that browsers draw as text unless asked otherwise, like © and ™, don't count, and neither do plain digits or#. It avoids the regexvflag and\p{RGI_Emoji}in case the build target doesn't support them.isBareEmoji()inmessage-parts.tsxruns that check on the emojified body, so shortcodes like:pray:count too.BubbleWithMetathe text bubble keepsbubbleClassand addsbg-transparent text-foregroundwithtext-3xl, ortext-2xlin the compact dock. The padding and radius stay, so the staged dashed border, the rejected outline and the jump-to-message ring still draw around the same box, and nothing moves when a message changes state. A bare emoji message of your own no longer counts as "on primary", soMessageTextuses the normal colours rather than the ones meant for the blue bubble.LiftedMessage) gets the same treatment. Its box shadow becomesdrop-shadow-lgon the emoji itself, because a shadow around an empty box looked wrong.Any number of emoji goes bare, where iMessage only does it for up to three. A cap is easy to add if you'd rather have one.
Validation
Local, Node 24:
node --experimental-strip-types --test tests/Unit/EmojiOnly.test.ts: 4 passed. They cover single and repeated emoji, skin tones, a ZWJ family, a country flag, a tag-sequence flag, a keycap, ❤️, mixed text, punctuation, digits, ©, ™,:)and blank input.vp fmt --check resources/andvp lint: pass.tsc --noEmitandtsc --noEmit --project tests/tsconfig.json: pass.Visual evidence
All captures come from a local copy with seeded data, in Chrome's headless shell through Playwright at 2x, signed in as the seeded
local-devuser on the remote with@conner01. The before shots are the base commit (baa02bbf) built and shown with the same data.Also checked by hand in a browser at 1440x900:
:pray:goes bare.PerformanceObserverforlayout-shift, was 0 for incoming plain-text and emoji messages and for an emoji message going from staged to pushed. The pushed to pulled receipt flip shifts the meta line by 0.00026 for an emoji message and for a plain "ok" alike, so that comes from production, not from this change.Device verification
No physical device or simulator. The 390x844 shots used Chrome's device emulation (
isMobile,hasTouch) through Playwright, so they say nothing about real touch, the on-screen keyboard or safe areas. The composer isn't touched by this change.Independent review
Not done yet.
Limitations
text-2xlwasn't looked at.🤖 Generated with Claude Code
Summary by CodeRabbit