Skip to content

Native iCloud apps for Windows and Linux, built in Rust. Notes, Reminders, Calendar, Contacts, Drive and Photos, offline and in sync with your iPhone.

Reminders sidebar: even inset, equal tiles, and properly drawn icons

Yashwanth Kamireddi791a807eae87
diff --git a/.uiverify/assert.mjs b/.uiverify/assert.mjs
index 7454d89..3899186 100644
--- a/.uiverify/assert.mjs
+++ b/.uiverify/assert.mjs
@@ -280,6 +280,58 @@ let failures = 0;
}
+// ── The Reminders sidebar sits evenly, and every tile holds its text ───────────────────
+// Reported from a real window: more room on one side of the column than the other, tiles of
+// different sizes once lists were pinned beside the built-in ones, and names running out of
+// their tiles. Measured at a narrow window, with six tiles, where all three showed.
+{
+ const page = await b.newPage({ viewport: { width: 900, height: 760 } });
+ await page.addInitScript(() => {
+ const list = (guid, title, pinned, colour) => ({ guid, title, colour, ctag: null, sortOrder: 0,
+ enabled: true, emblem: "fitness", groupGuid: null, pinned, sorting: "manual" });
+ window.__TAURI_INTERNALS__ = {
+ transformCallback: (cb) => cb,
+ invoke: async (cmd) => {
+ if (cmd === "auth_status") return { hasStoredSession: true, signedIn: true };
+ if (cmd === "auth_resume") return true;
+ if (cmd === "account_services") return ["reminders"];
+ if (cmd === "reminder_lists")
+ return [list("A", "Daily", true, "#FFCC00"), list("B", "Everything for the house move", true, "#FF8D28"),
+ list("C", "GYM", false, "#0088FF")];
+ if (cmd === "reminder_groups") return [];
+ if (cmd === "reminder_counts")
+ return { today: 5, scheduled: 12345, flagged: 0, all: 99999, lists: [["A", 3], ["B", 1000], ["C", 1]] };
+ if (cmd === "sync_all" || cmd === "sync_status") return { services: [], asOf: 1, tookMs: 0 };
+ if (cmd === "plugin:event|listen") return 0;
+ return [];
+ },
+ };
+ });
+ await page.goto("http://localhost:4173", { waitUntil: "networkidle" });
+ await page.waitForSelector(".rx-tile");
+ const m = await page.evaluate(() => {
+ const side = document.querySelector(".rx-side").getBoundingClientRect();
+ const search = document.querySelector(".rx-search").getBoundingClientRect();
+ const border = parseFloat(getComputedStyle(document.querySelector(".rx-side")).borderRightWidth);
+ const tiles = [...document.querySelectorAll(".rx-tile")];
+ const sizes = tiles.map((t) => { const r = t.getBoundingClientRect(); return `${r.width.toFixed(1)}x${r.height.toFixed(1)}`; });
+ const clipped = tiles.flatMap((t) => [...t.querySelectorAll(".rx-tile-name, .rx-tile-count")])
+ .filter((el) => el.getBoundingClientRect().right > el.closest(".rx-tile").getBoundingClientRect().right + 0.5)
+ .map((el) => el.textContent);
+ return { left: search.left - side.left, right: side.right - border - search.right, sizes, count: tiles.length, clipped };
+ });
+ const even = Math.abs(m.left - m.right) <= 1;
+ console.log(even ? `PASS the Reminders sidebar has the same inset on both sides [${m.left.toFixed(1)} / ${m.right.toFixed(1)}]`
+ : `FAIL the Reminders sidebar is lopsided [left ${m.left.toFixed(1)}, right ${m.right.toFixed(1)}]`);
+ if (!even) failures++;
+ const same = m.count === 6 && new Set(m.sizes).size === 1;
+ console.log(same ? `PASS six tiles, all one size [${m.sizes[0]}]` : `FAIL tiles differ ${JSON.stringify(m.sizes)}`);
+ if (!same) failures++;
+ console.log(m.clipped.length === 0 ? "PASS no tile's text runs out of it" : `FAIL text runs out of its tile: ${JSON.stringify(m.clipped)}`);
+ if (m.clipped.length) failures++;
+ await page.close();
+}
+
// ── Drive: a name already in the folder is refused before iCloud is asked ─────────────
// iCloud declines a second thing of the same name with a bare "UNKNOWN", which read as the
// folder having been made and then lost. Finder refuses it up front and says why; so does this.
diff --git a/.uiverify/look.mjs b/.uiverify/look.mjs
new file mode 100644
index 0000000..aa51fa6
--- /dev/null
+++ b/.uiverify/look.mjs
@@ -0,0 +1,42 @@
+// Screenshots of Reminders drawn from real account data, light and dark, for looking at.
+//
+// cargo run -p quince-probe --example ui_fixture -- <end-of-today> > fixture.json
+// node .uiverify/look.mjs fixture.json <out-dir>
+//
+// The fixture holds someone's reminders, so it is written outside the repository and never
+// committed; this only reads it.
+import { chromium } from "playwright";
+import fs from "node:fs";
+
+const [fixturePath, out] = process.argv.slice(2);
+const fx = JSON.parse(fs.readFileSync(fixturePath, "utf8"));
+const b = await chromium.launch();
+for (const scheme of ["dark", "light"]) {
+ const ctx = await b.newContext({ viewport: { width: 1280, height: 820 }, colorScheme: scheme, deviceScaleFactor: 2 });
+ await ctx.addInitScript((fx) => {
+ window.__TAURI_INTERNALS__ = {
+ transformCallback: (cb) => cb,
+ invoke: async (cmd, args) => {
+ if (cmd === "auth_status") return { hasStoredSession: true, signedIn: true };
+ if (cmd === "auth_resume") return true;
+ if (cmd === "account_services") return ["reminders", "notes", "calendar", "contacts", "drivews"];
+ if (cmd === "reminder_lists") return fx.lists;
+ if (cmd === "reminder_groups") return fx.groups;
+ if (cmd === "reminder_counts") return fx.counts;
+ if (cmd === "reminders_smart") return fx.smart[args.kind] ?? [];
+ if (cmd === "reminders_in") return fx.byList[args.listGuid] ?? [];
+ if (cmd === "reminder_sections") return fx.sections[args.listGuid] ?? [];
+ if (cmd === "sync_all" || cmd === "sync_status") return { services: [], asOf: 1, tookMs: 0 };
+ if (cmd === "plugin:event|listen") return 0;
+ return [];
+ },
+ };
+ }, fx);
+ const p = await ctx.newPage();
+ await p.goto("http://localhost:4173", { waitUntil: "networkidle" });
+ await p.locator(".nav-item", { hasText: "Reminders" }).click();
+ await p.waitForTimeout(500);
+ await p.screenshot({ path: `${out}/reminders-${scheme}.png` });
+ await ctx.close();
+}
+await b.close();
diff --git a/package-lock.json b/package-lock.json
index 6e6ab65..f2b23f8 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10,6 +10,7 @@
"dependencies": {
"@tauri-apps/api": "^2",
"@tauri-apps/plugin-dialog": "^2.7.3",
+ "lucide-react": "^1.48.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
@@ -1846,6 +1847,15 @@
"yallist": "^3.0.2"
}
},
+ "node_modules/lucide-react": {
+ "version": "1.48.0",
+ "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-1.48.0.tgz",
+ "integrity": "sha512-R0CIKY/fXiC6y9xRBADgsK+VW2p/pcTJOMhLZf1T+uG+vJUvyUR02nGOgmIIC7MPkiNK4Ox8QDnbqF8rJYWPZQ==",
+ "license": "ISC",
+ "peerDependencies": {
+ "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0"
+ }
+ },
"node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
diff --git a/package.json b/package.json
index 46038cc..e8c08a8 100644
--- a/package.json
+++ b/package.json
@@ -12,6 +12,7 @@
"dependencies": {
"@tauri-apps/api": "^2",
"@tauri-apps/plugin-dialog": "^2.7.3",
+ "lucide-react": "^1.48.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
diff --git a/src/components/Glyph.tsx b/src/components/Glyph.tsx
index 7f9ef22..0f96cc4 100644
--- a/src/components/Glyph.tsx
+++ b/src/components/Glyph.tsx
@@ -1,11 +1,23 @@
-/**
- * The small icons the Reminders sidebar marks its built-in views with.
- *
- * Drawn rather than typed: the glyphs here used to be a mix of emoji and dingbat
- * characters — a literal 📅 next to a ☀ next to a ≡ — which every font renders at a
- * different weight, size and baseline, so the row of them never lined up and never looked
- * like it came from the same hand. These are one stroke weight on one grid.
- */
+import {
+ BookOpen,
+ Calendar,
+ CalendarDays,
+ ChevronRight,
+ Dumbbell,
+ Flag,
+ Folder,
+ House,
+ Inbox,
+ Info,
+ Lightbulb,
+ List,
+ Plus,
+ Search,
+ Sun,
+ type LucideIcon,
+} from "lucide-react";
+
+/** The icons the app's screens mark things with, by what they mean rather than how drawn. */
export type GlyphName =
| "today"
| "scheduled"
@@ -24,100 +36,29 @@ export type GlyphName =
| "chevron"
| "search";
-const PATHS: Record<GlyphName, React.ReactNode> = {
- // A calendar page with the day marked — what Today means.
- today: (
- <>
- <rect x="2.5" y="3.5" width="11" height="10" rx="2.2" />
- <path d="M2.5 6.5h11" />
- <circle cx="8" cy="10" r="1.6" fill="currentColor" stroke="none" />
- </>
- ),
- // The same page, with days on it rather than one.
- scheduled: (
- <>
- <rect x="2.5" y="3.5" width="11" height="10" rx="2.2" />
- <path d="M2.5 6.5h11M5.5 2.5v2M10.5 2.5v2" />
- <path d="M5.2 9.3h1.4M9.4 9.3h1.4M5.2 11.4h1.4M9.4 11.4h1.4" />
- </>
- ),
- // Everything, as a list.
- all: (
- <>
- <path d="M5.5 4.6h8M5.5 8h8M5.5 11.4h8" />
- <circle cx="2.9" cy="4.6" r="0.9" fill="currentColor" stroke="none" />
- <circle cx="2.9" cy="8" r="0.9" fill="currentColor" stroke="none" />
- <circle cx="2.9" cy="11.4" r="0.9" fill="currentColor" stroke="none" />
- </>
- ),
- flagged: (
- <>
- <path d="M4.2 13.5V3.2" />
- <path d="M4.2 3.6h7.2l-1.7 2.6 1.7 2.6H4.2z" fill="currentColor" stroke="none" />
- </>
- ),
- // A list you made yourself, in its own colour.
- list: <circle cx="8" cy="8" r="4.4" fill="currentColor" stroke="none" />,
- // The glyph a list gets when it has chosen none: Apple's bulleted list.
- bullets: (
- <>
- <path d="M6.2 4.8h6.3M6.2 8h6.3M6.2 11.2h6.3" />
- <circle cx="3.8" cy="4.8" r="0.95" fill="currentColor" stroke="none" />
- <circle cx="3.8" cy="8" r="0.95" fill="currentColor" stroke="none" />
- <circle cx="3.8" cy="11.2" r="0.95" fill="currentColor" stroke="none" />
- </>
- ),
- fitness: (
- <>
- <path d="M5.5 8h5" />
- <rect x="3.2" y="5" width="2.3" height="6" rx="0.8" />
- <rect x="10.5" y="5" width="2.3" height="6" rx="0.8" />
- <path d="M1.9 6.8v2.4M14.1 6.8v2.4" />
- </>
- ),
- education: (
- <>
- <path d="M8 4.6c-1.6-1-3.6-1.2-5.3-.7v8.2c1.7-.5 3.7-.3 5.3.7 1.6-1 3.6-1.2 5.3-.7V3.9c-1.7-.5-3.7-.3-5.3.7z" />
- <path d="M8 4.6v8.2" />
- </>
- ),
- home: (
- <>
- <path d="M2.6 7.4 8 3l5.4 4.4" />
- <path d="M4.2 6.3v6.4h7.6V6.3" />
- <path d="M6.8 12.7V9.6h2.4v3.1" />
- </>
- ),
- idea: (
- <>
- <path d="M5.9 10.4c-.9-.7-1.6-1.8-1.6-3.1a3.7 3.7 0 0 1 7.4 0c0 1.3-.7 2.4-1.6 3.1v1.2H5.9z" />
- <path d="M6.3 13.4h3.4" />
- </>
- ),
- sun: (
- <>
- <circle cx="8" cy="8" r="2.6" />
- <path d="M8 1.9v1.5M8 12.6v1.5M1.9 8h1.5M12.6 8h1.5M3.7 3.7l1 1M11.3 11.3l1 1M3.7 12.3l1-1M11.3 4.7l1-1" />
- </>
- ),
- folder: (
- <path d="M2.4 4.6c0-.6.5-1.1 1.1-1.1h2.6l1.4 1.5h5c.6 0 1.1.5 1.1 1.1v5.8c0 .6-.5 1.1-1.1 1.1h-9c-.6 0-1.1-.5-1.1-1.1z" />
- ),
- plus: <path d="M8 3.5v9M3.5 8h9" />,
- info: (
- <>
- <circle cx="8" cy="8" r="5.6" />
- <path d="M8 7.4v3.6" />
- <circle cx="8" cy="5.2" r="0.8" fill="currentColor" stroke="none" />
- </>
- ),
- chevron: <path d="M6 4.5 9.5 8 6 11.5" />,
- search: (
- <>
- <circle cx="7" cy="7" r="4" />
- <path d="m10 10 3 3" />
- </>
- ),
+
+/**
+ * Each glyph from one professionally drawn set, on one grid and one stroke — the nearest
+ * open equivalents of the SF Symbols Apple's apps use, which cannot be shipped outside
+ * Apple's platforms. The hand-drawn paths these replaced read as rough beside Apple's.
+ */
+const ICONS: Record<GlyphName, { icon: LucideIcon; filled?: boolean }> = {
+ today: { icon: Calendar },
+ scheduled: { icon: CalendarDays },
+ all: { icon: Inbox },
+ flagged: { icon: Flag, filled: true },
+ list: { icon: List },
+ bullets: { icon: List },
+ fitness: { icon: Dumbbell },
+ education: { icon: BookOpen },
+ home: { icon: House },
+ idea: { icon: Lightbulb },
+ sun: { icon: Sun },
+ folder: { icon: Folder },
+ plus: { icon: Plus },
+ info: { icon: Info },
+ chevron: { icon: ChevronRight },
+ search: { icon: Search },
};
/**
@@ -155,21 +96,16 @@ export function emblemGlyph(emblem: string | null | undefined): GlyphName {
}
export function Glyph({ name, className }: { name: GlyphName; className?: string }) {
+ const { icon: Icon, filled } = ICONS[name];
return (
- <svg
+ <Icon
className={className}
- viewBox="0 0 16 16"
- width="16"
- height="16"
- fill="none"
- stroke="currentColor"
- strokeWidth="1.4"
- strokeLinecap="round"
- strokeLinejoin="round"
+ size={16}
+ strokeWidth={2.1}
+ absoluteStrokeWidth={false}
+ fill={filled ? "currentColor" : "none"}
aria-hidden="true"
focusable="false"
- >
- {PATHS[name]}
- </svg>
+ />
);
}
diff --git a/src/styles/reminders.css b/src/styles/reminders.css
index 7e4b63b..0cfdef1 100644
--- a/src/styles/reminders.css
+++ b/src/styles/reminders.css
@@ -39,7 +39,9 @@
gap: 2px;
min-height: 0;
overflow-y: auto;
- padding: 2px 12px 16px 2px;
+ /* The same inset on both sides, so the search field, tiles and lists sit centred in the
+ column rather than hard against its left edge. */
+ padding: 2px 12px 16px;
border-right: 1px solid var(--separator);
}
@@ -72,14 +74,17 @@
colour and everything on it turns white — which is how Apple marks the open one. */
.rx-tiles {
display: grid;
- grid-template-columns: 1fr 1fr;
+ /* minmax(0, …): a long name or a four-digit count shrinks inside its tile rather than
+ widening its column, so every tile stays the same size. */
+ grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
gap: 8px;
margin-bottom: 14px;
}
.rx-tile {
+ min-width: 0;
display: grid;
- grid-template-columns: auto 1fr;
+ grid-template-columns: auto minmax(0, 1fr);
grid-template-rows: auto auto;
align-items: center;
row-gap: 6px;
@@ -108,6 +113,9 @@
.rx-tile-count {
justify-self: end;
+ max-width: 100%;
+ overflow: hidden;
+ text-overflow: ellipsis;
font-size: 21px;
font-weight: 700;
line-height: 1;