fix(school): make hero map fullscreen work on iOS Safari #10

Merged
tudor merged 1 commits from fix/hero-map-ios-fullscreen into main 2026-07-05 20:52:32 +00:00
Owner

On the school page, tapping the map band or the "View on map" link did nothing on iPhones: open() calls wrapperRef.current?.requestFullscreen?.(), and iOS Safari has no Element.requestFullscreen (fullscreen is video-only there), so the optional call silently no-ops.

  • When the Fullscreen API is missing — or its promise rejects — fall back to a fixed-position CSS overlay (data-fs-fallback, z-index 5000) driven by component state, with body scroll locked while open.
  • Native fullscreen path is unchanged; the Leaflet map re-measures through the shared isFullscreen flag either way.
  • New e2e journey deletes Element.prototype.requestFullscreen on a mobile viewport, opens the map, and asserts the fullscreen view opens and closes. It fails against the current production build, reproducing the report.

🤖 Generated with Claude Code

On the school page, tapping the map band or the "View on map" link did nothing on iPhones: `open()` calls `wrapperRef.current?.requestFullscreen?.()`, and iOS Safari has no `Element.requestFullscreen` (fullscreen is video-only there), so the optional call silently no-ops. - When the Fullscreen API is missing — or its promise rejects — fall back to a fixed-position CSS overlay (`data-fs-fallback`, z-index 5000) driven by component state, with body scroll locked while open. - Native fullscreen path is unchanged; the Leaflet map re-measures through the shared `isFullscreen` flag either way. - New e2e journey deletes `Element.prototype.requestFullscreen` on a mobile viewport, opens the map, and asserts the fullscreen view opens and closes. It fails against the current production build, reproducing the report. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
tudor added 1 commit 2026-07-05 20:34:24 +00:00
fix(school): make hero map fullscreen work on iOS Safari
PR Checks / Frontend Typecheck + Tests (pull_request) Successful in 9m39s
PR Checks / Backend Smoke (pull_request) Successful in 5s
PR Checks / Build Backend (no push) (pull_request) Successful in 10s
PR Checks / Build Frontend (no push) (pull_request) Successful in 47s
PR Checks / Build Pipeline (no push) (pull_request) Successful in 9s
PR Checks / AI Code Review (Claude) (pull_request) Successful in 4m15s
d52d384cf2
iOS Safari has no Element.requestFullscreen (fullscreen is video-only),
so tapping the map band or 'View on map' silently did nothing on
iPhones. Fall back to a fixed-position CSS overlay driven by state when
the Fullscreen API is missing or its promise rejects, locking body
scroll while open. The Leaflet map already re-measures via the shared
isFullscreen flag. New e2e journey simulates the iOS condition by
deleting the API and asserts the overlay opens and closes; it fails
against the current production build.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
tudor force-pushed fix/hero-map-ios-fullscreen from cc5b6955d8 to d52d384cf2 2026-07-05 20:34:24 +00:00 Compare

🤖 AI Code Review (Claude Code)

This PR adds an iOS-Safari-safe fallback for the school hero map's fullscreen toggle (CSS fixed-overlay driven by state instead of the missing Fullscreen API), with matching CSS and a new e2e test. The logic is sound: it correctly branches on el.requestFullscreen presence/rejection, restores body scroll on close, and the z-index/stacking math checks out against the rest of the app's CSS (no other modal is ever mounted on the school-detail page, so the 5000 z-index doesn't actually clash with anything). No correctness, security, or deploy/CI issues found.

🟡 Minor

  • nextjs-app/components/SchoolHeroMap.tsx: The CSS-overlay fallback path adds no Escape-key handler. Native requestFullscreen() gets Escape-to-exit for free from the browser, and the existing Modal component binds Escape explicitly, but this new fallback (used when requestFullscreen is absent or rejected) only exits via the visible close button, a minor keyboard/accessibility regression versus both of those patterns.
## 🤖 AI Code Review (Claude Code) This PR adds an iOS-Safari-safe fallback for the school hero map's fullscreen toggle (CSS fixed-overlay driven by state instead of the missing Fullscreen API), with matching CSS and a new e2e test. The logic is sound: it correctly branches on `el.requestFullscreen` presence/rejection, restores body scroll on close, and the z-index/stacking math checks out against the rest of the app's CSS (no other modal is ever mounted on the school-detail page, so the 5000 z-index doesn't actually clash with anything). No correctness, security, or deploy/CI issues found. ### 🟡 Minor - **nextjs-app/components/SchoolHeroMap.tsx**: The CSS-overlay fallback path adds no Escape-key handler. Native `requestFullscreen()` gets Escape-to-exit for free from the browser, and the existing `Modal` component binds Escape explicitly, but this new fallback (used when `requestFullscreen` is absent or rejected) only exits via the visible close button, a minor keyboard/accessibility regression versus both of those patterns.
tudor merged commit 90f2a02e75 into main 2026-07-05 20:52:32 +00:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: tudor/school_compare#10