Skip to content

Commit df0af76

Browse files
alicodingclaude
andcommitted
fix: selected sticky legible over its yellow ground -- accent border flip + wider ring; suppress the pointer-click focus halo
The 2px card ring vanished against the sticky's attention tint (the owner saw only the webview's OS focus flash); a selected note now flips its border to the accent under a 3px ring, and a pointer click no longer flashes the focus halo (keyboard :focus-visible keeps its ring). Regression pinned: selection must change the sticky's computed border-color. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FW5GkkAG8du7tNdYLk2zSd
1 parent 3378c8f commit df0af76

2 files changed

Lines changed: 39 additions & 5 deletions

File tree

frontend/e2e/atlas-select-group.spec.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,30 @@ test('atlas shift-click select: toggle membership, group via member right-click,
200200
await expect(selected).toHaveCount(1)
201201
await cardB.click({ modifiers: ['Shift'] })
202202
await expect(selected).toHaveCount(2)
203+
204+
// Regression: a selected STICKY's ring must survive its yellow
205+
// ground -- the border flips to the accent on selection (the 2px
206+
// card ring alone was invisible over the attention tint).
207+
await page.keyboard.press('n')
208+
const noteBB = await board.boundingBox()
209+
if (!noteBB) throw new Error('board box missing for note placement')
210+
await page.mouse.click(noteBB.x + noteBB.width - 60, noteBB.y + noteBB.height - 80)
211+
const noteTA = page.getByTestId('atlas-sticky-textarea')
212+
await noteTA.fill('ZzK2eStickySel')
213+
await noteTA.blur()
214+
const stickyNote = page.locator('[data-testid="atlas-sticky-note"]')
215+
const restingBorder = await stickyNote.evaluate((el) => getComputedStyle(el).borderColor)
216+
await stickyNote.click({ modifiers: ['Shift'] })
217+
await expect(selected).toHaveCount(3)
218+
const selectedBorder = await stickyNote.evaluate((el) => getComputedStyle(el).borderColor)
219+
expect(selectedBorder).not.toBe(restingBorder)
220+
// Deselect + delete the note so the rest of the flow sees its
221+
// original two-card selection world.
222+
await stickyNote.click({ modifiers: ['Shift'] })
223+
await expect(selected).toHaveCount(2)
224+
await stickyNote.click({ button: 'right' })
225+
await menu.getByText('Delete note', { exact: true }).click()
226+
await expect(stickyNote).toHaveCount(0)
203227
await expect(page.locator('[data-testid="atlas-note-card"][data-flipped="true"]')).toHaveCount(0)
204228
await cardB.click({ modifiers: ['Shift'] })
205229
await expect(selected).toHaveCount(1)

frontend/src/atlas/AtlasStickyNode.module.css

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,23 @@
1717
cursor: text;
1818
}
1919

20-
/* Multi-selection outline (owner-caught follow-up to goal 0092): same
21-
box-shadow ring AtlasNoteCardNode.module.css uses, keyed off React
22-
Flow's own .selected on the node's outer wrapper. */
20+
/* Multi-selection outline (owner-caught follow-up to goal 0092),
21+
heavier than the card ring on purpose: the sticky's attention-tinted
22+
ground swallows the 2px accent line cards get away with on white --
23+
a wider ring plus the border flipping to the accent keeps a selected
24+
note legible at board zoom. */
2325
:global(.react-flow__node.selected) .sticky {
26+
border-color: var(--borderColor-accent-emphasis);
2427
box-shadow:
25-
0 0 0 2px var(--borderColor-accent-emphasis),
26-
0 0 0 5px var(--bgColor-accent-muted);
28+
0 0 0 3px var(--borderColor-accent-emphasis),
29+
0 0 0 7px var(--bgColor-accent-muted);
30+
}
31+
32+
/* A pointer click must not flash the webview's OS focus halo (the
33+
"blue flash" over the selection ring); keyboard focus keeps its
34+
visible ring via :focus-visible. */
35+
.sticky:focus:not(:focus-visible) {
36+
outline: none;
2737
}
2838

2939
.text {

0 commit comments

Comments
 (0)