From 68c8cf6aa3ea562c02f752bc77187ea97d154a0a Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 22 Oct 2026 06:22:49 +0000 Subject: [PATCH] Fit more rows on one screen: 64px rows, 8px gaps, tighter top Home rows shrink to 64px with 8px gaps and 40px icons, and the space above and below the Windows panel is trimmed, so about two more rows of apps fit on a phone screen. widget_rows and the resize test follow the new rows. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01NYASJ6JNxhYwNNJK7ypK2V --- tests/e2e.cjs | 4 ++-- web/app.py | 4 ++-- web/app.wasm | Bin 14142 -> 14142 bytes web/style.css | 14 +++++++------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/e2e.cjs b/tests/e2e.cjs index 845b9ec..fe6d257 100644 --- a/tests/e2e.cjs +++ b/tests/e2e.cjs @@ -111,11 +111,11 @@ const BASE = process.env.BASE || "http://localhost:8000"; await p.mouse.move(hd.x + hd.width / 2, hd.y + hd.height / 2); await p.mouse.down(); const ws = await p.locator(".widget-slot").boundingBox(); - await p.mouse.move(ws.x + tile.width * 2.1, ws.y + 175, { steps: 8 }); await settle(); + await p.mouse.move(ws.x + tile.width * 2.1, ws.y + 140, { steps: 8 }); await settle(); await p.mouse.up(); await settle(); const [w1, h1] = await size(); assert.ok(w1 < w0 && Math.abs(w1 - (2 * tile.width + 8)) < 3, `two columns wide: ${w1} (tile ${tile.width})`); - assert.equal(h1, 2 * 72 + 12, "snapped to two whole rows of tiles"); + assert.equal(h1, 2 * 64 + 8, "snapped to two whole rows of tiles"); assert.ok(await p.$(".widget-slot.resizing"), "letting go of a handle keeps the handles"); await p.click(".resize-bar >> text=Done"); await settle(); assert.ok(!(await p.$(".resize-handle"))); diff --git a/web/app.py b/web/app.py index 76f836f..d9ddaa4 100644 --- a/web/app.py +++ b/web/app.py @@ -629,7 +629,7 @@ def view_resize_bar() -> None: def widget_rows(h: i32) -> i32: """Rows of app tiles nearest to a widget height in CSS px, at least one.""" - k: i32 = (h + 12 + 42) // 84 + k: i32 = (h + 8 + 36) // 72 if k < 1: k = 1 return k @@ -644,7 +644,7 @@ def view_home_slot(i: i32) -> None: cls_if("lifted", i == lifted) cls_if("resizing", i == resizing) attr_num("data-slot", i) - # Its height spans whole rows of app tiles (72px rows, 12px gaps; style.css). + # Its height spans whole rows of app tiles (64px rows, 8px gaps; style.css). s_set(scratch, "grid-row:span ") s_add_num(scratch, widget_rows(hh[i])) if hw[i] > 0: diff --git a/web/app.wasm b/web/app.wasm index 099ad3606a0394da9b007fe94f33fa6c65eedceb..1b41519b73b24e294b456286e677eca11162861a 100644 GIT binary patch delta 20 bcmdm&w=ZvloC-TfmZM6R-Dw4tgQpyI} diff --git a/web/style.css b/web/style.css index 9a650af..94e4f0b 100644 --- a/web/style.css +++ b/web/style.css @@ -15,17 +15,17 @@ body { margin: 0; min-height: 100vh; color: #fff; -webkit-tap-highlight-color: t /* ---- home */ .home { min-height: 100vh; box-sizing: border-box; - padding: calc(var(--top) + 2.5rem) 16px calc(var(--bottom) + 2rem); } + padding: calc(var(--top) + 2rem) 16px calc(var(--bottom) + 1.5rem); } .pull { position: fixed; top: calc(var(--top) + .4rem); left: 50%; transform: translateX(-50%); width: 3rem; height: 1.25rem; padding: 0; border: 0; background: none; cursor: pointer; } .pull::before { content: ""; display: block; width: 2.25rem; height: .3rem; margin: auto; border-radius: 999px; background: rgb(255 255 255 / .45); } -.panel { display: flex; gap: .5rem; margin: 0 auto 2rem; padding: .5rem; max-width: 22rem; +.panel { display: flex; gap: .5rem; margin: 0 auto 1rem; padding: .4rem; max-width: 22rem; border-radius: 1.25rem; background: rgb(255 255 255 / .12); border: 1px solid rgb(255 255 255 / .16); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); } .panel-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: .6rem; - min-height: 3rem; padding: .5rem 1rem; border: 0; border-radius: .9rem; + min-height: 2.5rem; padding: .4rem 1rem; border: 0; border-radius: .9rem; background: rgb(255 255 255 / .1); color: #fff; font: inherit; font-weight: 500; cursor: pointer; text-shadow: 0 1px 4px rgb(0 0 0 / .35); } .panel-btn:hover, .panel-btn:active { background: rgb(255 255 255 / .22); } @@ -40,7 +40,7 @@ body { margin: 0; min-height: 100vh; color: #fff; -webkit-tap-highlight-color: t all one height, so a widget spans whole rows of app tiles, and apps fill the cells beside a widget rather than leaving holes (dense packing). Keep the row height and row gap in sync with widget_rows in app.py. */ -.slots { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: 4.5rem; row-gap: .75rem; +.slots { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: 4rem; row-gap: .5rem; grid-auto-flow: row dense; } @media (min-width: 480px) { .apps { grid-template-columns: repeat(5, minmax(0, 1fr)); } .slots { grid-template-columns: repeat(6, minmax(0, 1fr)); } } @@ -52,9 +52,9 @@ body { margin: 0; min-height: 100vh; color: #fff; -webkit-tap-highlight-color: t .icon.missing { border-radius: 999px; background: rgb(255 255 255 / .18); object-position: -999px 0; } .name { max-width: 100%; font-size: .75rem; line-height: 1.2; text-align: center; text-shadow: var(--shadow-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } -.slots .tile { gap: .3rem; padding: .25rem .1rem; } -.slots .icon { width: 2.75rem; height: 2.75rem; } -.slots .name { font-size: .7rem; } +.slots .tile { gap: .25rem; padding: .2rem .1rem; } +.slots .icon { width: 2.5rem; height: 2.5rem; } +.slots .name { font-size: .68rem; } /* A widget takes whole rows. On a phone the native widget view covers the slot; the label only shows while the slot is not live (or in a desktop browser). */