Skip to content

fix: the note's formatting toolbar floats beside the selection, never clipped inside the note (goal 0253) - #530

Merged
alicoding merged 3 commits into
mainfrom
goal-0253-note-toolbar
Aug 30, 2026
Merged

fix: the note's formatting toolbar floats beside the selection, never clipped inside the note (goal 0253)#530
alicoding merged 3 commits into
mainfrom
goal-0253-note-toolbar

Conversation

@alicoding

Copy link
Copy Markdown
Owner

Owner-raised: the bold/italic toolbar was "hidden inside the note object… so tiny you can't even do anything… blocking the text or don't appear always." Reproduced: the toolbar element existed with a zero bounding box — fully clipped inside the note node.

Root cause (from the vendored source): Crepe's toolbar mounts through TooltipProvider's default parent — inside the (clipped, zoom-transformed) note node — and Crepe's config exposes no mount point. The provider itself has a documented root option one dependency down; defect_class: under-adopted-api, third strike, recorded in the goal.

Fix, adopted not invented: Crepe's toolbar is off; Mill registers its own through the same kit primitives (tooltipFactory + TooltipProvider with root: document.body). The toolbar now floats at UI scale beside the selection — Primer icon buttons (bold/italic/strikethrough/code) dispatching the kit's own commands, active states via isMarkSelectedCommand, positioned by floating-ui with flip so it never covers the text it acts on. The sticky's outside-press commit excludes the body-level toolbar, so pressing Bold formats instead of ending the edit session (that interplay was caught live during verification). One behavior everywhere MilkdownEditor mounts.

Proof: new regression case in atlas-note-markdown.spec.ts (toolbar has a real box, doesn't intersect the live selection rect, Bold survives the commit as a real <strong>); all note/card editor suites green; screenshots reviewed.

🤖 Generated with Claude Code

https://claude.ai/code/session_012im1JxQQV2ahnXzZDdVmZq

… clipped inside the note (goal 0253)

Crepe's own toolbar mounted through TooltipProvider's default parent
-- inside the note node -- where the node's box clipped it to nothing,
the board zoom shrank it, and floating-ui misplaced it. Crepe's config
exposes no mount point, so its toolbar is off and Mill registers its
own through the same kit primitives (tooltipFactory + TooltipProvider)
with the provider's documented root: document.body -- the toolbar now
floats at UI scale beside the selection with Primer buttons
(bold/italic/strikethrough/code) dispatching the kit's own commands.
The sticky's outside-press commit excludes the body-level toolbar, so
pressing Bold formats instead of ending the edit session.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012im1JxQQV2ahnXzZDdVmZq
@alicoding
alicoding enabled auto-merge (squash) August 30, 2026 16:22
@alicoding
alicoding merged commit aa6b9e3 into main Aug 30, 2026
30 checks passed
@alicoding
alicoding deleted the goal-0253-note-toolbar branch August 30, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant