crossmate

A collaborative crossword app for iOS
Log | Files | Refs | LICENSE

commit b812b0fc67c9e44d7027a9d8031ef7b12e6fbd3f
parent 674d35c79bf3eea1500a02dbc0c9ce9270e8c4fb
Author: Michael Camilleri <[email protected]>
Date:   Sat,  9 May 2026 07:17:55 +0900

Improve Success Panel animation

The Success Panel was animating from above the safe area rather than
from the true edge of the device. This commit fixes that.

Co-Authored-By: Codex GPT 5.5 <[email protected]>

Diffstat:
MCrossmate/Views/PuzzleView.swift | 53++++++++++++++++++++++++++++++-----------------------
1 file changed, 30 insertions(+), 23 deletions(-)

diff --git a/Crossmate/Views/PuzzleView.swift b/Crossmate/Views/PuzzleView.swift @@ -262,33 +262,40 @@ struct PuzzleView: View { if showClueBar { ClueBarSlot(session: session) } - ZStack { - if isSolved { - SuccessPanel(session: session, roster: roster) - .transition(.move(edge: .bottom)) - } else if showsCustomKeyboard { - KeyboardView(session: session, showsNavigationKeys: padLayout != nil) - .transition(.move(edge: .bottom)) - } - } - .frame(height: controlsPanelHeight) - .clipped() - .background { - Color(.systemGroupedBackground) + controlsPanel + .frame(height: controlsPanelHeight) + } + } + + private var controlsPanel: some View { + ZStack(alignment: .top) { + if isSolved { + SuccessPanel(session: session, roster: roster) + .frame(height: controlsPanelHeight) + .ignoresSafeArea(edges: .bottom) + .transition(.move(edge: .bottom)) + } else if showsCustomKeyboard { + KeyboardView(session: session, showsNavigationKeys: padLayout != nil) + .frame(height: controlsPanelHeight) .ignoresSafeArea(edges: .bottom) + .transition(.move(edge: .bottom)) } - .overlay { - if controlsPanelHeight > 0 { - VStack(spacing: 0) { - Rectangle() - .fill(Color(.opaqueSeparator)) - .frame(height: 0.5) - Spacer(minLength: 0) - } - } + } + .frame(height: controlsPanelHeight, alignment: .top) + .clipped() + .background { + Color(.systemGroupedBackground) + .ignoresSafeArea(edges: .bottom) + } + .overlay(alignment: .top) { + if controlsPanelHeight > 0 { + Rectangle() + .fill(Color(.opaqueSeparator)) + .frame(height: 0.5) } - .animation(.easeOut(duration: 0.25), value: isSolved) } + .animation(.easeOut(duration: 0.25), value: isSolved) + .ignoresSafeArea(edges: .bottom) } private var controlsPanelHeight: CGFloat {