The assignee menu holds still: the chips under it wait until it shuts #227
No reviewers
Labels
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Grandiras/Ponente!227
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "assignee-menu-holds-still"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #225. The assignee menu moved around while you ticked people on and off. It hangs off the foot of the assignee panel, and the panel is as tall as its row of chips. So a person added from the menu wrapped the row, grew the panel and pushed the menu down under the pointer, and removing one pulled it back up.
The chip row now holds still while the menu is open. It's frozen at who was on the card when the menu opened (
_heldChips). The menu's ticks show who is on in the meantime, and the chips catch up when the menu closes. This is the same way GitHub's assignee dropdown behaves. Only the drawing waits: every toggle still reaches the dialog as it happens, so closing the menu any way at all (Escape, a click elsewhere) loses nothing.Also: if a member loses edit rights while the menu is open, the menu now closes. Previously it could stay open offering everybody to someone who may now only add themselves.
Tests:
permissions.spec.jsnow checks that the menu's offset from its panel doesn't change while people are toggled, and that the new chip appears only once the menu closes. It measures the offset rather than the screen position, which the menu's entrance and the smooth scroll would disturb. The spec fails on the #225 picker and passes here.permissionsandmobilespecs: 9 passed.dotnet test: 560 passed.The docs (
ui.mdandboards-and-permissions.md) are updated. No changelog change, since this refines the unreleased picker entry.🤖 Generated with Claude Code
🤖 Reviewing this PR — the review will link the full session transcript.
6f6cc43f14c8efc0f230✅ Verdict: approve — no blocking issues found.
The hold is implemented cleanly and the test measures the right thing.
_heldChipsfreezes only the drawing:OnCardreads the snapshot while the menu is open and the live set otherwise, and every close path (CloseAsync, the new demotion branch inOnParametersSet) clears it on the same render, so the chips catch up exactly once. Every toggle still mutates the liveSelectedMemberDidsand reaches the dialog, so closing the menu any way loses nothing, as the PR claims.@if (_open && OnlyDid is null)gate makes the menu unreachable in the mode where it should never exist.el.offsetTopprobe is correct for what it wants to detect: the menu is absolutely positioned atcalc(100% - 0.5rem)inside theposition: relativepanel, sooffsetTopgrows with the panel when a chip wraps the row (the #225 bug), while the entrancetranslateYanimation and the smooth scroll injs/assignee-menu.jschange only screen position, notoffsetTop. The assertion ordering — chip count 0 before reading the offset, chip count 1 only after Escape — is right.Two minor notes, neither blocking: in the
OnParametersSetdemotion path focus is not handed anywhere (unlikeCloseAsync's_addButton.FocusAsync(), and the old button isn't rendered in that mode anyway), so a keyboard user's focus drops to the body when the menu vanishes under them; and theoretically a parent swappingSelectedMemberDidsfor a fresh instance while the menu is open would leave ticks reading the new set while the chips read the snapshot — but every route to that also flipsCanEdit, which the new gate now handles.⏱ 8m 28s · 0 steps · $0.0000 · tokens: 0 in / 0 out (+0 cache-read) · Go: 5h 14% · wk 80% · mo 72%
🤖 Reviewing this PR — the review will link the full session transcript.
💬 Verdict: comment — the reviewer did not submit a structured review; the raw output follows.
(empty)
⏱ 0m 28s · 0 steps · $0.0000 · tokens: 0 in / 0 out (+0 cache-read) · Go: 5h 14% · wk 80% · mo 72%
🔧 Let opencode-bot fix this — tick the box and opencode-bot picks up the review above, on this PR branch. Nothing runs until you do.