Repository navigation
M6 design: overlays (docs/overlays.md) - #101
Conversation
docs/overlays.md answers the M6 design questions (tree model, stacking, placement, dismissal, focus, modals, sheets and #35, scroll, drag and drop, migrations, look, testing), sketches the API and proposes a 7-PR build order. The prototypes settle questions with evidence and are marked as such: - tests/it/overlay_egui_evidence.rs: how egui orders layers (move_to_top is a flag, so D18's "build order every frame" does not restack), what set_modal_layer does and does not block, that Esc blurs focus inside egui, that a press keeps its origin through a drag, and that a screen-sized layer takes the wheel from the page. - tests/it/overlay_placement_prototype.rs: the pure placement function and its test matrix (12 tests), to be moved into the library by the build. No library behaviour changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWiKKe8zfqGfVMCSC5L3up
|
Decisions so far (2026-11-11):
|
|
Decisions (2026-11-11, continued):
|
|
Item 4 (enter/exit motion): agreed, revised shape. No free-standing Presence::drive. Presence lives on the overlay chain: |
|
Item 5 (dismissal): agreed as written in §4: one pure function, judged at the press, the anchor counts as inside, Esc topmost only, nothing judged during a drag, focus-out closes menus/popovers, window blur closes non-modal, scroll never closes, activation is the app's handler; DismissOn { Default, EscOnly, Never }. |
|
Item 6 (scroll): agreed as in §8: follow in the same frame, hide (keep state and stack slot) when the anchor is fully clipped, never close on scroll; Point/Pointer anchors are screen-fixed; a tall list is clamped to the available room and scrolls; one Placed::root_at shared by DnD, dismissal and hover (also the home for #102's blocking rule). |
|
Item 8 (stock widget state): agreed. Stock Select, dropdown/context menus and tooltips own their open state in egui temp data keyed by the widget id; the stock menu closes on item activation; no controlled mode (open/on_open_change) in v0.1, addable later without breaking. |
Stacking gains a repair step (egui never forgets a layer's rank, so a reopened overlay would keep a stale place); presence moves onto the overlay chain (.shown/.transition/.entrance/.on_exited); submenus open on click and keyboard only in v0.1; tooltips migrate; stock widgets own their open state. The note now states the approved design. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWiKKe8zfqGfVMCSC5L3up
Design note for M6 overlays, for the user to approve (not the build). See docs/overlays.md. It includes 19 prototype tests (marked) that pin egui stacking and modality facts and the placement rules. Decisions needed are listed at the end of the note.
🤖 Generated with Claude Code
https://claude.ai/code/session_01PWiKKe8zfqGfVMCSC5L3up