iOS client for Grain grain.social
ios photography atproto
7
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: make alt text overlay scrollable for long text on panoramic images

Wraps alt text in a ScrollView that centers short text and scrolls long
text. Tapping the overlay background dismisses it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+15 -6
+15 -6
Grain/Views/Components/GalleryCardView.swift
··· 350 350 if showingAlt, let alt = photo.alt, !alt.isEmpty { 351 351 ZStack { 352 352 Color.black.opacity(0.6) 353 - Text(alt) 354 - .font(.subheadline) 355 - .foregroundStyle(.white) 356 - .multilineTextAlignment(.center) 357 - .padding(20) 353 + .onTapGesture { 354 + withAnimation(.easeInOut(duration: 0.2)) { showingAlt = false } 355 + } 356 + GeometryReader { geo in 357 + ScrollView { 358 + Text(alt) 359 + .font(.subheadline) 360 + .foregroundStyle(.white) 361 + .multilineTextAlignment(.center) 362 + .padding(20) 363 + .frame(maxWidth: .infinity) 364 + .frame(minHeight: geo.size.height) 365 + } 366 + .scrollBounceBehavior(.basedOnSize) 367 + } 358 368 } 359 369 .transition(.asymmetric( 360 370 insertion: .opacity.animation(.easeIn(duration: 0.35)), 361 371 removal: .opacity 362 372 )) 363 - .allowsHitTesting(false) 364 373 } 365 374 } 366 375 .tag(index)