Skip to content

lesson keyboard: fix hit-test and replace slide-in with mask reveal

jedmund requested to merge jedmund/vienna-v5 into main

Created by: jedmund

Summary

Four commits that together fix the shared lesson keyboard's touch handling and its transition between interactive and overlay pages.

  1. 6577914 reorder the ZStack so the keyboard is declared above LessonDetailView. The paging ScrollView's pan recognizer was swallowing taps in the right 45% before they reached the keyboard; putting the keyboard on top lets it win hit-testing.
  2. c35986b exclude CLAUDE.md from build sources in the xcodeproj.
  3. 621232d drop .id(config.id) and the opacity transition on the keyboard container. Keying on the per-page id tore the view down on every page change and caused a visible flicker between consecutive interactive pages. Props now diff against a stable instance.
  4. 388d2f5 switch the transition itself. Rename keyboardBlurProgress to keyboardSlideProgress and make it signed (-1...1): positive when an overlay page is exiting upward above the keyboard, negative when one is entering from below. LessonScreen no longer translates the keyboard. It holds the dock position and a mask clips whichever edge the moving overlay page currently covers, so the keyboard reads as revealed/occluded rather than sliding in. Blur still tracks the magnitude so the revealed strip starts blurred and sharpens as it docks.

Test plan

  • Interactive pages: taps on white and black keys play notes; left-side scroll still pages vertically; right-side scroll is inert.
  • Flicker gone between Twelve Notes -> The White Keys -> Sharps and Flats.
  • Twelve, Then Repeat -> Twelve Notes: keyboard is already docked, progressively revealed as the overlay page sweeps up.
  • Sharps and Flats -> Two Names, One Key: overlay page rises from below, keyboard is progressively occluded from the bottom.
  • Reverse directions mirror the forward transitions.
  • Non-keyboard pages (reading, quiz, hardware) at rest show no ghost keyboard.

Merge request reports

Loading