feat: animate the start-screen URL field

Use a scoped 250 ms fade and top-anchored scale transition with animated recent-row reflow. Respect Reduce Motion, preserve the fixed window size, and exercise native focus, draft retention and rapid reversals.
This commit is contained in:
2026-10-19 18:46:00 +02:00
parent 6d653e8875
commit f6485bf221
4 changed files with 54 additions and 10 deletions
+5 -1
View File
@@ -2189,7 +2189,10 @@ private struct PlayerContent: View {
}
.buttonStyle(StartScreenButtonStyle())
.accessibilityLabel("Open YouTube URL…")
if showsYouTubeInput { startURLInput.padding(.horizontal, 14) }
if showsYouTubeInput {
startURLInput.padding(.horizontal, 14)
.transition(.opacity.combined(with: .scale(scale: 0.96, anchor: .top)))
}
if let latest, let resumePosition {
Button { model.open(latest.url) } label: {
HStack(spacing: 8) {
@@ -2224,6 +2227,7 @@ private struct PlayerContent: View {
.padding(.top, 20)
}
}
.animation(reduceMotion ? nil : .easeInOut(duration: 0.25), value: showsYouTubeInput)
.font(.system(size: 14, weight: .medium))
.disabled(!model.canOpen)
.padding(.horizontal, size.width < 600 ? 14 : 30)