Repository navigation
The desktop app reacts with any emoji, and on macOS its Edit menu inserts emoji in the composer - #242
Merged
Merged
Conversation
… & Symbols The reaction picker gets a "+" after the quick reactions. It focuses a field in the picker; on macOS it also opens the system's emoji palette, which types into it, and on Windows and Linux the field shows and asks for an emoji (Win + . or an input method's picker). The first character it gets, if the Mac app's isReaction (ported exactly) accepts it, is sent as the quick ones are; the rest is dropped, and an input method still composing is left alone. On macOS an Edit menu: AppKit adds its own Emoji & Symbols (Ctrl-Cmd-Space) to it, as to the Mac app's, and the palette types into the composer.
…posing in the field is left alone Windows types an emoji one character (code point) at a time, so the field now waits a moment after the last change before taking what it was given; the composing check now matters for that wait. The test covers an input method committing an emoji, an emoji typed in parts, and more single emoji; comments no longer claim how Windows' panel types, and the test cleans its folder.
Owner
Author
Review (
|
This was referenced Nov 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Any emoji as a reaction. The reaction picker gets a "+" ("More reactions") after the six quick reactions, as in the Mac app's
ReactionPicker. It focuses a small field in the picker:window.show_character_palette()), which types into that field.shortcut:comment.The field waits until input stops for 50 ms, then takes what it has. Windows types an emoji one character (code point) at a time, and GPUI's
WM_CHARpath reports each as its own change, so reading the field on every change would turn 👍🏽 into 👍 and lose ❤️. If an input method is still composing in the field at that point (marked text), the field is left alone until the composition is committed. Then: if its first character passesis_reaction, it is sent withHush::react, the same call the quick reactions make (choosing our current reaction again takes it back), and the picker closes. Anything else is cleared and the picker stays open.is_reactionis ported exactly fromMessageActions.isReaction: one grapheme (Swift'scount == 1), and either more than one scalar (an emoji-form selector, a skin tone, a ZWJ sequence, a flag, a keycap) or a first scalar withEmoji_Presentation. So "1", "#", "©" and a bare "❤" are turned down. Grapheme splitting and emoji properties come fromunicode-segmentationandunicode-properties, which GPUI already depends on (no new crate inCargo.lock).Emoji in the composer. On macOS the app now has an Edit menu. AppKit adds its own "Emoji & Symbols" (⌃⌘Space, fn E) to any menu titled "Edit", which is also where the Mac app's item comes from. The palette then types into the focused field, the composer included. I checked this with a small AppKit program (no window) that sets a main menu with an "Edit" submenu built the way GPUI builds it. Even an empty one gets
Emoji & Symbols [orderFrontCharacterPalette:]with ⌃⌘Space and fn-E. So the app adds no item of its own: one would show twice. Windows and Linux have no menu bar. Their system pickers (Win + ., an input method's) already type into the focused composer, so nothing changes there.Note for #229 (Edit menu): this PR adds
Menu::new("Edit")with no items. Whichever PR merges second keeps a single Edit menu. Don't add an explicit "Emoji & Symbols" item there, because macOS adds one already.Why
#230: the desktop app could only react with the six quick reactions, and on macOS it had no way to insert an emoji from the app.
How it was tested
Test first: the unit tests
a_reaction_is_one_emoji_with_its_skin_tone_or_joined_parts_not_textandthe_first_character_given_is_the_reaction_if_it_is_one, and the window testan_emoji_given_after_plus_reacts_as_a_quick_one_and_anything_else_goes. The window test opens a picker, presses "+", then:A reaction reaches the core through
react(an unlinked core refuses it: "Couldn't react"), and the picker closes. All three tests failed against stubs before the code was written. Mutation checks also fail the window test: "+" not focusing the field, no wait, no composing check.Gate, from
core/(CARGO_INCREMENTAL=0):cargo fmt --checkpasses;cargo clippy --all-targets -q -- -D warningspasses;cargo clippy --all-targets --features hush-desktop/snapshot -q -- -D warningspasses;cargo test --features hush-desktop/snapshot -qpasses (desktop 298, core 537 passed, 4 ignored), on the head merged with main (8c3d221).Snapshot:
reply-light.png/reply-dark.png(macOS) show the picker with "+" after the six reactions. The field is invisible there, as on the Mac.The Swift leg of
make check(xcodebuild) was skipped: nothing inapp/changed.Not tested here
WM_CHAR,WM_IME_COMPOSITION) and Linux input code. The window test covers them, but not with a real input method.cfg(test), and the desktop app isn't linked on this Mac.Closes #230