Back to five home columns
This reverts commit 146c735. V wants more rows, not more columns.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NYASJ6JNxhYwNNJK7ypK2V
This commit is contained in:
4 files changed
+8
-8
No files matched your search
+2
-2
@@ -115,7 +115,7 @@ const BASE = process.env.BASE || "http://localhost:8000";
|
||||
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 * 60 + 8, "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")));
|
||||
@@ -132,7 +132,7 @@ const BASE = process.env.BASE || "http://localhost:8000";
|
||||
await p.mouse.move(first.x + first.width / 2, first.y + first.height / 2, { steps: 8 }); await settle();
|
||||
await p.mouse.up(); await settle();
|
||||
assert.equal((await order())[0], "W", "dragged to the front");
|
||||
// the apps flow into the cells beside it: a 2x2 widget leaves room for all four
|
||||
// the apps flow into the cells beside it: a 2x2 widget in 5 columns leaves room for all four
|
||||
const beside = await p.$eval(".widget-slot", (w) => {
|
||||
const r = w.getBoundingClientRect();
|
||||
return [...document.querySelectorAll(".slots .tile")].filter((t) => {
|
||||
|
||||
+2
-2
@@ -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 + 8 + 34) // 68
|
||||
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 (60px rows, 8px 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:
|
||||
|
||||
Binary file not shown.
+4
-4
@@ -36,10 +36,10 @@ 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(6, minmax(0, 1fr)); grid-auto-rows: 3.75rem; row-gap: .5rem;
|
||||
.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(7, minmax(0, 1fr)); } }
|
||||
.slots { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
|
||||
.tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: .4rem;
|
||||
padding: .35rem .15rem; border-radius: calc(var(--radius) + 4px); cursor: pointer; }
|
||||
.tile:active { background: rgb(255 255 255 / .12); }
|
||||
@@ -49,8 +49,8 @@ body { margin: 0; min-height: 100vh; color: #fff; -webkit-tap-highlight-color: t
|
||||
.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: .25rem; padding: .2rem .1rem; }
|
||||
.slots .icon { width: 2.25rem; height: 2.25rem; }
|
||||
.slots .name { font-size: .64rem; }
|
||||
.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). */
|
||||
|
||||
Reference in new issue
Block a user