fix(reactions): cancel button collapses entire emoji picker #71

Merged
nrupard merged 1 commit from fix/reaction-picker-cancel into main 2026-05-11 19:25:09 +02:00
Owner

Summary

  • Picker close x button used hx-target="this", replacing only itself with + while the emoji buttons stayed rendered. Clicking the new + opened another picker nested inside the leftover row, which the user could repeat to stack pickers indefinitely.
  • Gave the picker wrapper a stable id (picker-{id}) and pointed the cancel button at it via hx-target="#picker-{id}" hx-swap="outerHTML", so cancel collapses the whole picker back to a single + button.
  • Bug existed in rooms and DMs; user reported it in DMs. Fix applies universally.

Test plan

  • Open a DM, hover a message, click +, then click x - picker should collapse to a single + (no leftover emoji row, no stacking).
  • Repeat in a room.
  • Pick an emoji from the picker to confirm the reaction toggle path still works.
## Summary - Picker close `x` button used `hx-target="this"`, replacing only itself with `+` while the emoji buttons stayed rendered. Clicking the new `+` opened another picker nested inside the leftover row, which the user could repeat to stack pickers indefinitely. - Gave the picker wrapper a stable id (`picker-{id}`) and pointed the cancel button at it via `hx-target="#picker-{id}" hx-swap="outerHTML"`, so cancel collapses the whole picker back to a single `+` button. - Bug existed in rooms and DMs; user reported it in DMs. Fix applies universally. ## Test plan - [ ] Open a DM, hover a message, click `+`, then click `x` - picker should collapse to a single `+` (no leftover emoji row, no stacking). - [ ] Repeat in a room. - [ ] Pick an emoji from the picker to confirm the reaction toggle path still works.
fix(reactions): cancel button collapses entire emoji picker
Some checks failed
Check / clippy + fmt + tests (pull_request) Failing after 26s
b2847a7b9e
The picker's close (x) button used hx-target="this" hx-swap="outerHTML", so cancel only replaced the x with the + button while leaving every emoji button in the picker still rendered. Clicking the new + opened another picker nested inside the leftover row, which the user could repeat to stack pickers indefinitely.

Give the picker wrapper a stable id (picker-{id}) and target it from the cancel button so the whole picker collapses back to a single + button.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
nrupard deleted branch fix/reaction-picker-cancel 2026-05-11 19:25:09 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/lets-chat!71
No description provided.