Skip to content

DEX-234: Replace experimental web modal with a custom web modal navigator - #214

Merged
cvburgess merged 7 commits into
mainfrom
dex-234-replace-experimental-web-modal-with-a-custom-web-modal
Oct 20, 2026
Merged

cvburgess merged 7 commits into
mainfrom
dex-234-replace-experimental-web-modal-with-a-custom-web-modal

Conversation

@cvburgess

Copy link
Copy Markdown
Owner

Why

Web form sheets (= "new task", "edit task", and the settings task/list/habit editors) rendered through Expo Router's experimental modal stack, which SDK 58 removes. Without a replacement they stop rendering as dialogs on web — and on this branch (already on SDK 58) EXPO_UNSTABLE_WEB_MODAL=1 is already inert, so they had silently regressed to full-page routes. Fixes the regression, not just the upgrade.

Closes DEX-234

What

Follows Expo's custom web modal navigator guide, which is the documented replacement for the removed experimental stack.

  • src/components/WebModalStack.web.tsx — a custom StackRouter navigator built with createStandardRouterNavigator + NativeStackView. It renders the stack up to the last non-modal route as the live base stack, then layers every formSheet/modal route on top as a centered dialog (max width 680, theme tokens) inside the existing WebOverlay (repo rule: every web overlay goes through WebOverlay.web.tsx). Dialogs close on backdrop click (a full-viewport Pressable), Esc (topmost dialog only), and browser back (actions.back). The base stack stays mounted, so the screen underneath keeps its scroll position.
  • src/components/WebModalStack.tsx — native passthrough re-exporting expo-router's Stack, so native form sheets are byte-for-byte unchanged.
  • Layouts — (app)/_layout.tsx (new-task, edit-task/[id]), settings/_layout.tsx (lists/[id], habits/[id]), and settings/tasks/_layout.tsx ([id]) swap Stack → WebModalStack. The settings/lists + habits editors are included because the old stack was bundle-wide — every formSheet screen rendered as a dialog, and skipping them would have left a visible regression on web.
  • src/package.json — drop EXPO_UNSTABLE_WEB_MODAL=1 from start/web/export:web.
  • docs/frontend.md — replace the experimental-stack bullet with the new navigator's constraint; tighten the now-stale vaul reference in "Web overlays".

ModalScreen contract preserved

The dialog body stays a flex column and ModalScreen.web.tsx (flex: 1) still fills it — the guide's snippet renders the dialog as a flex row, which would have broken every screen relying on the existing contract.

Validation

  • 10 new web tests: isModalRoute classification, backdrop + Esc dismissal, topmost-only Esc, plus the existing 66 layout/screen tests still green (they mock expo-router's Stack, which the native passthrough re-exports.
  • (166 suites / 2029 tests), , , all pass.
  • Manual web behaviors from the issue's test cases (backdrop/Esc/browser-back close, direct URL load, scroll preservation, DEX-101 loading gate) have no e2e harness in this repo (docs/frontend.md); they were verified by construction against the guide and remain the manual QA checklist.
    EOF
    )

… navigator

Web form sheets render through a custom StackRouter navigator
(WebModalStack.web.tsx) that layers formSheet/modal routes as centered dialogs
over the live base stack, matching the behavior EXPO_UNSTABLE_WEB_MODAL=1
provided before SDK 58 removed it. Native keeps expo-router's Stack via a
passthrough re-export.
Stacked modal routes each render an overlay; leaving every listener armed
would close the whole pile on one Esc press.
Drop the render-without-crashing and styling assertions from the web test
(not-worth-writing categories in docs/testing.md), compress comment blocks
under the 2-line cap, and tighten the frontend.md constraint.
@supabase

supabase Bot commented Oct 20, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project isreileykodwkyedcewv because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@netlify

netlify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for dexterplanner canceled.

Name Link
🔨 Latest commit 79bcfe0
🔍 Latest deploy log https://app.netlify.com/projects/dexterplanner/deploys/6ad7c6edeb367ba4f7697de5

@cvburgess
cvburgess merged commit 7fb7bd7 into main Oct 20, 2026
6 checks passed
@cvburgess
cvburgess deleted the dex-234-replace-experimental-web-modal-with-a-custom-web-modal branch October 20, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant