From 53406e25c550c4f540c1c45994da1bfb4d6aabaa Mon Sep 17 00:00:00 2001 From: Phat Pham Date: Thu, 12 Nov 2026 14:46:09 +0700 Subject: [PATCH] feat: add edge-swipe dismiss for the mobile preview - let a left-edge rightward drag move the fullscreen preview over the feed and close it past a distance or flick threshold, with spring-back below it - keep vertical edge drags on native preview scrolling and ignore the gesture while the actions dialog is open - clean up the drag transform on rotation, layout changes, close, and reopen Co-Authored-By: Claude Code --- README.md | 1 + core/render.ts | 4 +- docs/ARCHITECTURE.md | 2 +- docs/RUNBOOK.md | 1 + web-static/service-worker.js | 6 +- web-static/static/app.js | 203 +++++++++++++++++++++++++++++++++++ web-static/static/style.css | 7 ++ 7 files changed, 218 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 017f440..7504d9f 100644 --- a/README.md +++ b/README.md @@ -375,6 +375,7 @@ Presentation-layer note: - on screens wider than 900px the preview panel is an aside fixed on the right at about 65% of the width and 0.8rem top/bottom insets, with the bookmark, `…`, and Close controls in its header; the page keeps its normal scroll behavior - at 900px or narrower the borderless panel covers the full viewport and the footer places the bookmark, `…`, and Close after Previous/Next (in both portrait and landscape). Above 900px the aside header holds the bookmark, `…`, and Close. The `…` button opens a settings-style dialog headed by the article title with its source icon/host and a close button, with the actions stacked as full-width rows over the standard backdrop (dismiss with the close button, backdrop, Escape, or by choosing an action). Content respects left/right safe-area insets in iPhone landscape; while the panel covers the viewport the `theme-color` tint matches the panel surface so the status-bar strip blends with it - on phones, the glass preview header and footer slide away while scrolling down and return when scrolling up; the desktop aside keeps its chrome visible +- on phones, dragging right from the left screen edge drags the fullscreen preview with the finger and reveals the feed underneath; releasing past about 30% of the width (or a quick flick) closes the preview and returns to the same feed position, while a shorter drag springs back. Vertical drags from the edge still scroll the article, the gesture is ignored while the `…` dialog is open, and rotating cancels it. In a regular Safari tab the system edge-back gesture may take precedence; the app gesture is reliable in the installed PWA - preview is available on every device; phones open the reader view full-screen, and the Reading option is always shown in Reader settings ### Bookmarks diff --git a/core/render.ts b/core/render.ts index b7b95af..9882c77 100644 --- a/core/render.ts +++ b/core/render.ts @@ -190,8 +190,8 @@ export function renderIndexPage(data: PageData): string { - - + +