Commit Graph

3 Commits

Author SHA1 Message Date
2b7c9cd3eb Collapse editor top bar to one row (back + filename)
The cut/copy/paste icons were dead placeholders (no handlers);
clipboard actions live in the floating selection menu, so the second
icon row is removed. The bar goes from two rows at 52dp to one row at
32dp, giving the editor 20dp more height.

- filename_test.go now finds the label by type (back icon precedes it)
- menu tracking tests updated for the new editorY (reg.Y = 10+32)
- scroll_cursor e2e simulation updated to match
- On-device verified: back button works, floating menu places above
  with room and flips below on the first lines, handles unaffected.
2026-08-18 08:32:19 -04:00
dc35aa2e36 Redesign selection handles (teardrop + 48dp grab); place menu above selection
- Handles are now teardrops (stem + filled circle) like the native
  Android selector: 20dp circle normally, 28dp while dragging.
- The grab region is a 48dp box around the circle centre, independent
  of the visual size; the old 16dp target was not grabbable by finger.
- The copy/cut/paste menu is placed ABOVE the selected line (native
  behaviour), flipping below only when there is no room above. The menu
  is drawn last (top of the z-order) and Gio routes a touch to the
  topmost op whose clip contains it, so a below-placed menu covered the
  handles' grab boxes and silently stole every handle-drag press.
- Regressions: menu above-placement arithmetic, first-line flip-below,
  and the existing tracking/clamp tests updated for the new policy.
- On-device verified: handle drags work with the menu up (previously
  dead lower grab region), first-line handles still grabbable from the
  uncovered top strip, menu taps and tap-to-clear unchanged.
- doc/development_plan.md section 15 records the z-order/placement
  contract.
2026-08-18 08:08:51 -04:00
dcb96d04d8 Fix Android window geometry, selection menu tracking
- SurfaceView windows are always translucent, so adjustResize cannot
  resize them: the keyboard overlapped the bottom of the window and the
  top bar sat under the status bar. Consume the insets in app instead:
  a smali-injected PadInsetsListener (identical block in build_emu.sh
  and build_phone.sh) shrinks the GioView to statusBarBottom..keyboardTop
  (or ..navBarTop) on every API 30+ insets dispatch, with
  setDecorFitsSystemWindows(false) so IME insets are delivered at
  targetSdk 34.
- Fix a change-detection bug in the listener: the height write skipped
  the topMargin/bottomMargin checks on every IME state transition, so
  the margins were never applied while the keyboard animated. All three
  params are now checked with a single requestLayout on any change.
- Selection menu now re-anchors to the selected word every frame while
  it is visible and hides when the word scrolls out of the viewport
  (positionSelectionMenu + regression test).
- Doc: development_plan.md section 14 (invariants, geometry contract,
  build-script identity invariant).

Verified on device: top bar below status bar and clickable, bottom bar
flush with keyboard top (view 128..1517 at 1080x2400), BACK dismiss +
re-tap re-raise without a show loop, typing saves, menu tracks scrolls.
2026-08-17 23:58:19 -04:00