From 95e63ea7e2372ed4a6870895bfc91818a8b6fd29 Mon Sep 17 00:00:00 2001 From: Speck Pratt Date: Mon, 9 Mar 2026 01:08:28 -0400 Subject: [PATCH] Add mobileWallLayout plugin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Forces full-width single-column layout on the Markers and Images (wall mode) pages for mobile devices (≤960px wide). Works around react-photo-gallery's inline position:absolute offsets that make items too small to browse comfortably on phones. Co-Authored-By: Claude Sonnet 4.6 --- plugins/mobileWallLayout/README.md | 26 ++++++ plugins/mobileWallLayout/mobileWallLayout.js | 86 +++++++++++++++++++ plugins/mobileWallLayout/mobileWallLayout.yml | 9 ++ 3 files changed, 121 insertions(+) create mode 100644 plugins/mobileWallLayout/README.md create mode 100644 plugins/mobileWallLayout/mobileWallLayout.js create mode 100644 plugins/mobileWallLayout/mobileWallLayout.yml diff --git a/plugins/mobileWallLayout/README.md b/plugins/mobileWallLayout/README.md new file mode 100644 index 00000000..0a1a3e99 --- /dev/null +++ b/plugins/mobileWallLayout/README.md @@ -0,0 +1,26 @@ +# Mobile Wall Layout + +Makes the wall-mode gallery render as a single full-width column on mobile +devices, on the **Markers** (`/scenes/markers`) and **Images** (`/images`) pages. + +By default, Stash's wall mode uses `react-photo-gallery`, which calculates +`position: absolute` offsets for a multi-column brick layout. On small screens +this produces items that are too small to comfortably tap and browse. This +plugin overrides those offsets so each item spans the full width of the screen, +making marker previews and images easy to scroll through on a phone. + +## Behaviour + +- Applies only when `window.innerWidth ≤ 960px` — covers all current phones + including large flagships in landscape (e.g. iPhone 16 Pro Max: 932px, + Galaxy S24 Ultra: 915px), while excluding tablets (iPad mini landscape: 1024px). +- Activates and deactivates automatically as you navigate between pages. +- Re-evaluates on orientation change (portrait ↔ landscape). +- Has no effect on desktop or tablet viewports. + +## Implementation note + +The fix injects a `