Repository navigation
fix: open the reaction tray beside the react button - #1276
arifhossen-dev wants to merge 1 commit into
Conversation
The tray under a message lined up with the bubble's start, while the react button sits past its end, so reacting to a long message meant moving the pointer across the whole bubble. The tray and its full picker now line up with the side the react button is on. Pinned messages keep their layout. Closes dev-null-sh#1275
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Placement-aware alignment resources/js/components/chat/message-reactions.tsx, tests/Unit/ReactionTray.test.tsx |
ReactionTray uses alignsEnd for tray-row justification and emoji-picker alignment. Tests cover incoming messages, outgoing messages placed below, and beside placement. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Low
Possibly related PRs
- dev-null-sh/dev-null.sh#1101: This PR introduced the
placementprop; this change updates alignment forbesideplacement.
Suggested reviewers: xheaven, nunomaduro
Merge Risk: 
Minimal · up to b945a
-
The alignment change is covered for incoming, outgoing, and beside placements, with no actionable merge-blocking risk identified.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files.
-
Full details: Linked Issues check
-
Explanation
Issue
#1275requires easier emoji selection. The change aligns the tray and full picker with the react-button side for incoming, outgoing, andbesideplacements. The added test covers these alignments. The change does not reduce the separate click required to open the full emoji list. The test only checks alignment.Resolution
Change the reaction interaction so the full emoji list opens without the separate extra click, or add an equivalent implementation that satisfies the click-reduction requirement from
#1275. Add a test for that interaction.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
Intentional scope: this PR fixes the pointer travel part of #1275. The second click to open the full picker is unchanged, because the quick-reaction tray (adaptive 3 emojis, then the full picker) looks like a deliberate design. Maintainers: if you'd like the react button to open the full picker directly, or the tray to show more quick reactions, I'm happy to add that here or in a follow-up PR. |
Summary
Closes #1275.
In remotes, a message's react button sits just past the bubble's end (right of their messages, left of mine), but the reaction tray opened under the bubble's other edge. On a long message you had to move the pointer across the whole bubble to reach the emojis or the full picker.
The tray and its full picker now line up with the side the react button is on, so the emojis open right under the pointer.
Changes
ReactionTrayaligns its row to the react button's side: the end for their messages, the start for mine. The full picker'salignfollows the same side.placement="beside", floating next to the trigger. They keep their current layout.besideplacement. It fails onproductionand passes here.Validation
Local (macOS, PHP 8.5, PostgreSQL 18):
bunx vp test run tests/Unit/ReactionTray.test.tsx: 24 passedbun run test:unit: 212 passed, 0 failedbun run test:lint: passed (only existing warnings in other files)bun run test:types: passedphpstan: 0 errorspest --type-coverage --min=100: 100.0%pest --parallel(no coverage): 4,828 passedpest --coverage --exactly=100.0, because no coverage driver is installed. No PHP changed; CI runs it with pcov.pint --testandrector --dry-runonly flagged gitignored, locally generated files (bootstrap/cache/*.php,public/frankenphp-worker.php), not files in this change.Hosted CI: pending.
Visual evidence
Light theme, Chromium in the Claude desktop browser pane, fine pointer, 718×773 CSS px viewport at DPR 2, local seed data. The tray is opened from the react button on a long message.
production)Also checked on this branch: the full emoji picker opens anchored to the "More reactions" button, and Escape closes the picker and then the tray. Layout shift wasn't measured. The tray's fold animation and height are unchanged; only its horizontal alignment moved.
Device verification
Desktop only (macOS, Chromium-based browser pane, mouse). This change doesn't affect mobile interactions: on coarse pointers the tray is hidden (
pointer-coarse:hidden) and reactions use the bottom sheet, which this change doesn't touch.Independent review
Reviewer: a separate Claude Code subagent that hadn't seen the implementation reasoning. It reviewed base
704f8c84and headb945a7a3, and the four screenshots above.BubbleActionsputs the react button. Pinned messages (placement="beside") resolve to the samejustify-end/align="end"as before.ReactionTrayhas only two callers. The new test fails on base and follows the file's patterns. Nit, not blocking: the test finds the row by a class substring.Limitations
Summary by CodeRabbit