keyboard migration: ContentKeyboardPanel onto contained container
Created by: jedmund
Summary
Migrates the lesson/content keyboard panel (Views/Lesson/SharedKeyboardView.swift) off its hand-rolled inner shell and onto KeyboardContainer with .contained + declarative overlays.
- Drops the local
Color(white:0.1)rounded rect, 12pt inner padding, and the two.overlay(alignment: .top)blocks with hand-computed.offset(y:)math. - Degree labels + step arcs now travel through
config.overlayswith stable ids (degree-labelsfirst so it stacks on top ofstep-arcs). -
config.isScrollSafe = trueexplicitly, since.containeddefaults to false — fixes the pagingScrollViewstealing touches while keys are held. - Memoizes
highlightsinto@State, updated via.onChangeof active pitches, selected sequence notes, and page id, instead of rebuilding aPitchSetper frame. - Preserves the outer interactiveBackground card + 20pt padding + caption below the keyboard, and the callout reveal hook for attached callouts.
Stacks on top of phase 2 (PlayableKeyboard migration).
Test plan
-
Project builds for iOS simulator -
Lesson right-slot keyboard still renders diagrams with degree labels + step arcs stacked above keys -
Captions still appear below the keyboard inside the card -
Scrolling between lesson pages while holding a key no longer steals the touch -
Attached-callout pages still reveal on key press