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.

Every screen works in a narrow window, down to 480×400

Yashwanth Kamireddie40d6439c2b6
diff --git a/.uiverify/compact.mjs b/.uiverify/compact.mjs
new file mode 100644
index 0000000..b223e1e
--- /dev/null
+++ b/.uiverify/compact.mjs
@@ -0,0 +1,101 @@
+// A narrow window, as iPadOS and iPhone lay one out: the sidebar steps aside for the content
+// and comes back over it on request, and each two-column screen shows one column at a time —
+// the list, or what was opened from it, with a way back.
+//
+// At 480 wide the old layout left the content 260px beside a 216px sidebar: notes read three
+// words to a line, Drive cut every name to five letters, and a month cell said "3 more" over
+// the next day.
+import { engine } from "./engine.mjs";
+import { SERVICES, installStub } from "./stub.mjs";
+
+const b = await engine.launch();
+const ctx = await b.newContext({ viewport: { width: 480, height: 400 } });
+await ctx.addInitScript(installStub, { screen: "library", services: SERVICES, twoFactor: null,
+ calendarFixture: true, notesFixture: true, contactsFixture: true, driveFixture: true, remindersFixture: true });
+const page = await ctx.newPage();
+await page.goto("http://localhost:4173", { waitUntil: "networkidle" });
+await page.waitForTimeout(400);
+
+let failures = 0;
+const ok = (pass, yes, no) => { console.log(pass ? `PASS ${yes}` : `FAIL ${no}`); if (!pass) failures++; };
+const visible = (selector) => page.evaluate((sel) => {
+ const el = document.querySelector(sel);
+ if (!el) return false;
+ const r = el.getBoundingClientRect();
+ const cs = getComputedStyle(el);
+ return r.width > 0 && r.height > 0 && cs.visibility !== "hidden" && r.right > 0 && r.left < window.innerWidth;
+}, selector);
+const toggle = page.getByRole("button", { name: "Show Sidebar" });
+
+// The shell.
+const content = await page.evaluate(() => document.querySelector("main.content").getBoundingClientRect().width);
+ok(!(await visible(".sidebar")) && content > 440, `the content has the window [${Math.round(content)}px of 480]`,
+ `the sidebar still takes room: content is ${Math.round(content)}px wide`);
+ok((await toggle.count()) === 1 && (await toggle.isVisible()), "a button brings the sidebar back", "there is no way to the sidebar");
+
+/** Open a screen the way a person would in a narrow window. */
+async function go(name) {
+ await toggle.click();
+ await page.waitForTimeout(320);
+ await page.locator(".nav-item", { hasText: name }).click();
+ await page.waitForTimeout(400);
+}
+if ((await toggle.count()) === 1) {
+ await toggle.click();
+ await page.waitForTimeout(320);
+ ok(await visible(".sidebar"), "and it slides over the content", "the sidebar did not open");
+ await page.locator(".nav-item", { hasText: "Notes" }).click();
+ await page.waitForTimeout(400);
+ ok(!(await visible(".sidebar")), "picking a screen puts it away", "the sidebar stayed over the content");
+
+ // Notes: the list, then the note — titled — then back.
+ ok((await visible(".notes-list")) && !(await visible(".note-body")), "Notes shows its list alone",
+ "Notes shows list and note squeezed side by side");
+ await page.locator(".note-row", { hasText: "Curtains" }).click();
+ await page.waitForTimeout(300);
+ const title = await page.evaluate(() => {
+ const t = document.querySelector(".note-title");
+ return t ? { value: t.value, height: t.getBoundingClientRect().height } : null;
+ });
+ ok(!(await visible(".notes-list")) && (await visible(".note-body")), "a note opens in its place",
+ "the note did not take the list's place");
+ ok(title?.value === "Curtains" && title.height > 20, `with its title showing [${title?.value}, ${Math.round(title?.height ?? 0)}px]`,
+ `its title is not shown: ${JSON.stringify(title)}`);
+ await page.locator(".note-body .compact-back").click();
+ await page.waitForTimeout(300);
+ ok(await visible(".notes-list"), "and back returns to the list", "back did not return to the list");
+
+ // Reminders.
+ await go("Reminders");
+ ok((await visible(".rx-side")) && !(await visible(".rx-main")), "Reminders shows its lists alone",
+ "Reminders shows lists and reminders side by side");
+ await page.locator(".rx-tile").first().click();
+ await page.waitForTimeout(300);
+ ok(!(await visible(".rx-side")) && (await visible(".rx-main")), "a list opens in their place", "the list did not open in place");
+ await page.locator(".rx-main .compact-back").click();
+ await page.waitForTimeout(300);
+ ok(await visible(".rx-side"), "and back returns to the lists", "back did not return to the lists");
+
+ // Contacts.
+ await go("Contacts");
+ ok((await visible(".contacts-list")) && !(await visible(".contact-detail")), "Contacts shows its list alone",
+ "Contacts shows list and card side by side");
+ await page.locator(".contact-row").first().click();
+ await page.waitForTimeout(300);
+ ok(!(await visible(".contacts-list")) && (await visible(".contact-detail")), "a person opens in its place",
+ "the card did not open in place");
+
+ // A month too narrow for titles draws dots, not "N more" spilling over the next day.
+ await go("Calendar");
+ await page.getByRole("button", { name: "Month", exact: true }).click();
+ await page.waitForTimeout(400);
+ const month = await page.evaluate(() => ({
+ dots: document.querySelectorAll(".cx-items.is-dots .cx-item").length,
+ more: [...document.querySelectorAll(".cx-more")].filter((m) => m.getBoundingClientRect().height > 0).length,
+ }));
+ ok(month.dots > 0 && month.more === 0, `a narrow month shows its days' items as dots [${month.dots}]`,
+ `a narrow month: ${JSON.stringify(month)}`);
+}
+
+await b.close();
+process.exitCode = failures === 0 ? 0 : 1;
diff --git a/.uiverify/sizes.mjs b/.uiverify/sizes.mjs
index 1bb32e3..0c832a5 100644
--- a/.uiverify/sizes.mjs
+++ b/.uiverify/sizes.mjs
@@ -6,11 +6,16 @@
// so each is opened at a small, an ordinary and a very large size, and in Calendar each of
// its four views too.
import { engine as chromium } from "./engine.mjs";
-import { SERVICES, installStub } from "./stub.mjs";
+import { SERVICES, installStub, openScreen } from "./stub.mjs";
+// The smallest the window may be made, half of a 1080p screen, a small laptop, the owner's
+// own maximised window, and a large display.
const SIZES = [
+ { width: 480, height: 400 },
{ width: 800, height: 600 },
+ { width: 960, height: 1040 },
{ width: 1280, height: 800 },
+ { width: 1920, height: 1040 },
{ width: 2560, height: 1440 },
];
const SCREENS = ["Reminders", "Notes", "iCloud Drive", "Calendar", "Contacts"];
@@ -75,9 +80,9 @@ for (const size of SIZES) {
});
const page = await ctx.newPage();
await page.goto("http://localhost:4173", { waitUntil: "networkidle" });
- await page.waitForSelector(".sidebar .nav-item");
+ await page.waitForSelector(".sidebar .nav-item", { state: "attached" });
for (const screen of SCREENS) {
- await page.locator(".nav-item", { hasText: screen }).click();
+ await openScreen(page, screen);
await page.waitForTimeout(350);
const views = screen === "Calendar" ? CALENDAR_VIEWS : [null];
for (const view of views) {
diff --git a/.uiverify/stub.mjs b/.uiverify/stub.mjs
index 68db17e..e067bf1 100644
--- a/.uiverify/stub.mjs
+++ b/.uiverify/stub.mjs
@@ -193,3 +193,16 @@ export function installStub({ screen, services, twoFactor, calendarFixture, note
},
};
}
+
+/**
+ * Open a screen from the sidebar the way a person would — in a narrow window the sidebar is
+ * put away, so it is brought back first.
+ */
+export async function openScreen(page, name) {
+ const toggle = page.getByRole("button", { name: "Show Sidebar" });
+ if (await toggle.isVisible()) {
+ await toggle.click();
+ await page.waitForTimeout(320);
+ }
+ await page.locator(".nav-item", { hasText: name }).click();
+}
diff --git a/check.sh b/check.sh
index d98b71c..810645f 100755
--- a/check.sh
+++ b/check.sh
@@ -41,6 +41,7 @@ step "a long note" node .uiverify/notes-long.mjs
step "uploading" node .uiverify/drive-upload.mjs
step "calendar grids" node .uiverify/calendar.mjs
step "every size" node .uiverify/sizes.mjs
+step "narrow windows" node .uiverify/compact.mjs
# The same screens in WebKit, the engine Quince draws in. Chromium above catches most things;
# this catches what only WebKit does — pointer capture, blur on removal, its own layout.
@@ -52,6 +53,7 @@ step "webkit: notes" bash -c 'ENGINE=webkit node .uiverify/notes-compose.mjs
step "webkit: drive" env ENGINE=webkit node .uiverify/drive-upload.mjs
step "webkit: calendar" env ENGINE=webkit node .uiverify/calendar.mjs
step "webkit: sizes" env ENGINE=webkit node .uiverify/sizes.mjs
+step "webkit: narrow" env ENGINE=webkit node .uiverify/compact.mjs
printf '\n'
if [ "$fail" -eq 0 ]; then printf '\033[32mAll checks passed.\033[0m\n'; else printf '\033[31mSome checks failed.\033[0m\n'; fi
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index 0884396..116a457 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -13,8 +13,8 @@
"title": "Quince",
"width": 1040,
"height": 720,
- "minWidth": 880,
- "minHeight": 600,
+ "minWidth": 480,
+ "minHeight": 400,
"resizable": true,
"center": true,
"theme": null
diff --git a/src/screens/ContactsView.tsx b/src/screens/ContactsView.tsx
index fac027c..a891fb1 100644
--- a/src/screens/ContactsView.tsx
+++ b/src/screens/ContactsView.tsx
@@ -1,4 +1,5 @@
import { useCallback, useEffect, useMemo, useState } from "react";
+import { ChevronLeft } from "lucide-react";
import {
api,
displayName,
@@ -82,6 +83,8 @@ export function ContactsView() {
const [contacts, setContacts] = useState<Contact[]>([]);
const [search, setSearch] = useState("");
const [openGuid, setOpenGuid] = useState<string | null>(null);
+ /** In a narrow window, the person picked rather than the list — as on iPhone. */
+ const [detail, setDetail] = useState(false);
const [loaded, setLoaded] = useState(false);
const [error, setError] = useState<string | null>(null);
const { revision } = useSync();
@@ -175,7 +178,8 @@ export function ContactsView() {
);
return (
- <div className="contacts">
+ // A contact being written is always what shows; it has its own Cancel.
+ <div className={`contacts${detail || draft ? " is-detail" : ""}`}>
<section className="contacts-list" aria-label="Contacts">
<header className="cal-bar">
<div className="cal-nav">
@@ -206,7 +210,10 @@ export function ContactsView() {
<button
className="contact-row"
aria-current={openGuid === contact.guid}
- onClick={() => setOpenGuid(contact.guid)}
+ onClick={() => {
+ setOpenGuid(contact.guid);
+ setDetail(true);
+ }}
>
<Avatar contact={contact} />
<span className="contact-row-name">{displayName(contact)}</span>
@@ -221,6 +228,12 @@ export function ContactsView() {
</section>
<article className="contact-detail" aria-label="Contact">
+ {!draft && (
+ <button className="compact-back" onClick={() => setDetail(false)}>
+ <ChevronLeft size={18} strokeWidth={2.25} aria-hidden="true" />
+ <span>Contacts</span>
+ </button>
+ )}
{draft ? (
<form
className="contact-form"
diff --git a/src/screens/Library.tsx b/src/screens/Library.tsx
index c28a0d9..87385fd 100644
--- a/src/screens/Library.tsx
+++ b/src/screens/Library.tsx
@@ -1,5 +1,6 @@
import { useEffect, useRef, useState } from "react";
import { listen } from "@tauri-apps/api/event";
+import { PanelLeft } from "lucide-react";
import { api, messageOf, OPEN_REMINDER } from "../lib/ipc";
import { SyncProvider } from "../lib/sync";
import { SyncStatus } from "../components/SyncStatus";
@@ -33,6 +34,8 @@ export function Library({ onSignOut }: { onSignOut: () => void }) {
const [selected, setSelected] = useState<string | null>(null);
const [error, setError] = useState<string | null>(null);
const [ready, setReady] = useState(false);
+ /** In a narrow window the sidebar slides over the content, and only when asked for. */
+ const [sidebarOpen, setSidebarOpen] = useState(false);
useEffect(() => {
api
@@ -54,6 +57,7 @@ export function Library({ onSignOut }: { onSignOut: () => void }) {
const choose = (key: string) => {
setSelected(key);
+ setSidebarOpen(false);
try {
window.localStorage.setItem(LAST_KEY, key);
} catch {
@@ -61,6 +65,13 @@ export function Library({ onSignOut }: { onSignOut: () => void }) {
}
};
+ useEffect(() => {
+ if (!sidebarOpen) return undefined;
+ const onKey = (e: KeyboardEvent) => e.key === "Escape" && setSidebarOpen(false);
+ window.addEventListener("keydown", onKey);
+ return () => window.removeEventListener("keydown", onKey);
+ }, [sidebarOpen]);
+
// Clicking a reminder's alert brings the window back on Reminders.
useEffect(() => {
const stop = listen<string>(OPEN_REMINDER, () => {
@@ -111,7 +122,18 @@ export function Library({ onSignOut }: { onSignOut: () => void }) {
return (
<SyncProvider>
- <div className="library enter-library">
+ <div className={`library enter-library${sidebarOpen ? " is-sidebar-open" : ""}`}>
+ {/* Only in a narrow window, where the sidebar gives its room to the content. */}
+ <button
+ className="sidebar-toggle"
+ aria-label={sidebarOpen ? "Hide Sidebar" : "Show Sidebar"}
+ aria-expanded={sidebarOpen}
+ title={sidebarOpen ? "Hide Sidebar" : "Show Sidebar"}
+ onClick={() => setSidebarOpen((open) => !open)}
+ >
+ <PanelLeft size={17} strokeWidth={2} aria-hidden="true" />
+ </button>
+ <div className="sidebar-scrim" aria-hidden="true" onClick={() => setSidebarOpen(false)} />
<nav className="sidebar" aria-label="Your iCloud">
<h2>Your iCloud</h2>
{services.map(item)}
diff --git a/src/screens/NotesView.tsx b/src/screens/NotesView.tsx
index 8e2e59c..b14b916 100644
--- a/src/screens/NotesView.tsx
+++ b/src/screens/NotesView.tsx
@@ -1,6 +1,6 @@
import { Fragment, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
import { flushSync } from "react-dom";
-import { Folder, FolderOpen, Pin, PinOff, SquarePen, Trash2 } from "lucide-react";
+import { ChevronLeft, Folder, FolderOpen, Pin, PinOff, SquarePen, Trash2 } from "lucide-react";
import { LongTextarea } from "../components/LongTextarea";
import { editorDate, groupNotes, joinTitle, listDate, splitTitle } from "./notes/model";
import { api, messageOf, nestFolders, type Note, type NoteFolder } from "../lib/ipc";
@@ -17,6 +17,11 @@ export function NotesView() {
const [folder, setFolder] = useState<string>(ALL);
const [notes, setNotes] = useState<Note[]>([]);
const [openGuid, setOpenGuid] = useState<string | null>(null);
+ /**
+ * In a narrow window only one column shows, as on iPhone: the list, or — once a note is
+ * picked or begun — that note, with a way back. A wide window shows both and ignores this.
+ */
+ const [detail, setDetail] = useState(false);
const [loaded, setLoaded] = useState(false);
const [error, setError] = useState<string | null>(null);
const { revision } = useSync();
@@ -305,6 +310,7 @@ export function NotesView() {
async (guid: string) => {
if (composing) await commitComposing();
setOpenGuid(guid);
+ setDetail(true);
},
[composing, commitComposing]
);
@@ -316,6 +322,7 @@ export function NotesView() {
await flush();
setComposing({ folderGuid: folder === ALL ? null : folder, body: "" });
setOpenGuid(null);
+ setDetail(true);
// Straight into the new note, as Apple's New Note does.
window.requestAnimationFrame(() => editor.current?.focus());
}, [commitComposing, flush, folder, setComposing]);
@@ -396,7 +403,12 @@ export function NotesView() {
if (!el) return;
el.style.height = "0px";
el.style.height = `${el.scrollHeight}px`;
- }, [titleLine, openGuid, composing]);
+ // `detail` too: in a narrow window the note is hidden until opened, and a hidden title
+ // measures nothing — it came up zero lines tall, and the note had no title.
+ }, [titleLine, openGuid, composing, detail]);
+
+ // Another folder is another list, and a narrow window shows that list, not a note from the last.
+ useEffect(() => setDetail(false), [folder]);
const sections = useMemo(() => groupNotes(notes), [notes]);
const heading = searching
@@ -407,7 +419,7 @@ export function NotesView() {
const saveFailed = error !== null;
return (
- <div className="notes">
+ <div className={`notes${detail ? " is-detail" : ""}`}>
<aside className="notes-folders" aria-label="Note folders">
<p className="notes-side-heading">iCloud</p>
<button className="notes-folder" aria-current={folder === ALL} onClick={() => setFolder(ALL)}>
@@ -521,6 +533,17 @@ export function NotesView() {
<article className="note-body" aria-label="Note">
{(composing || open) && (
<div className="note-bar">
+ <button
+ className="compact-back"
+ onClick={() => {
+ // Leaving the note takes what was typed with it, as leaving any note does.
+ void (composingRef.current ? commitComposing() : flush());
+ setDetail(false);
+ }}
+ >
+ <ChevronLeft size={18} strokeWidth={2.25} aria-hidden="true" />
+ <span>{heading}</span>
+ </button>
<p className="note-when">
{busy || (!saveFailed && (dirty || composing?.body.trim()))
? "Saving…"
diff --git a/src/screens/RemindersView.tsx b/src/screens/RemindersView.tsx
index 2d8b9ff..399692a 100644
--- a/src/screens/RemindersView.tsx
+++ b/src/screens/RemindersView.tsx
@@ -1,4 +1,5 @@
import { Fragment, useCallback, useEffect, useMemo, useState } from "react";
+import { ChevronLeft } from "lucide-react";
import {
api,
MOST_AT_ONCE,
@@ -233,6 +234,11 @@ export function RemindersView() {
/** What is typed in the search field. While it holds anything, the pane is the results. */
const [query, setQuery] = useState("");
const searching = query.trim().length > 0;
+ /**
+ * In a narrow window one column shows at a time, as on iPhone: the lists, or the list that
+ * was picked, with a way back. Searching shows the results under the search field.
+ */
+ const [detail, setDetail] = useState(false);
const readItems = useCallback(async (): Promise<Reminder[]> => {
// Search reaches every list, as Apple's does, whatever is open in the sidebar.
@@ -706,6 +712,7 @@ export function RemindersView() {
onClick={() => {
setQuery("");
setSelection({ type: "list", guid: list.guid });
+ setDetail(true);
}}
onDoubleClick={() => setRenaming(list.guid)}
>
@@ -761,6 +768,7 @@ export function RemindersView() {
onClick={() => {
setQuery("");
choose();
+ setDetail(true);
}}
>
<span className="rx-tile-glyph">
@@ -801,7 +809,10 @@ export function RemindersView() {
);
return (
- <div className="rx" style={{ "--accent": accent } as React.CSSProperties}>
+ <div
+ className={`rx${detail && !searching ? " is-detail" : ""}${searching ? " is-searching" : ""}`}
+ style={{ "--accent": accent } as React.CSSProperties}
+ >
<aside className="rx-side" aria-label="Reminder lists">
<label className="rx-search">
<Glyph name="search" />
@@ -891,6 +902,10 @@ export function RemindersView() {
</aside>
<section className="rx-main">
+ <button className="compact-back" onClick={() => setDetail(false)}>
+ <ChevronLeft size={18} strokeWidth={2.25} aria-hidden="true" />
+ <span>Lists</span>
+ </button>
<header className="rx-head">
<h1>{searching ? `Results for “${query.trim()}”` : heading}</h1>
<span className="rx-head-count" aria-label={`${outstanding} to do`}>
diff --git a/src/screens/calendar/CalendarView.tsx b/src/screens/calendar/CalendarView.tsx
index 5e43646..1b620d2 100644
--- a/src/screens/calendar/CalendarView.tsx
+++ b/src/screens/calendar/CalendarView.tsx
@@ -41,6 +41,11 @@ type View = (typeof VIEWS)[number]["key"];
const HOUR = 48;
/** A bar in the all-day row, and the gap under it. */
const LANE = 20;
+/** Narrower than this, a month cell draws its items as dots. */
+const DOT_CELL = 72;
+/** The most dots one row of a narrow cell holds; past that the day is simply busy. */
+const MOST_DOTS = 4;
+
/** What a month cell shows before it says "N more". */
const MONTH_ROWS = 4;
@@ -682,13 +687,18 @@ function MonthView({
// room for two, a large one for eight, and a fixed guess spilt items out of the cell.
const grid = useRef<HTMLDivElement | null>(null);
const [rows, setRows] = useState(MONTH_ROWS);
+ // A cell too narrow for any title shows its day's items as dots, as Calendar does on a
+ // small screen; a title cut to two letters and "3 more" squeezed below it said nothing.
+ const [dots, setDots] = useState(false);
useLayoutEffect(() => {
const el = grid.current;
if (!el) return undefined;
const measure = () => {
const week = el.firstElementChild as HTMLElement | null;
const height = week?.getBoundingClientRect().height ?? 0;
+ const width = (week?.firstElementChild as HTMLElement | null)?.getBoundingClientRect().width ?? 0;
setRows(Math.max(1, Math.floor((height - 28) / 18)));
+ setDots(width > 0 && width < DOT_CELL);
};
measure();
const observer = new ResizeObserver(measure);
@@ -716,7 +726,12 @@ function MonthView({
const lanesHere = Math.max(0, ...spans.filter((s) => s.from <= i && s.to >= i).map((s) => s.lane + 1));
const room = Math.max(0, rows - lanesHere);
// What fits, and when it does not, one line fewer so "N more" has a line too.
- const visible = list.length > room ? list.slice(0, Math.max(0, room - 1)) : list;
+ // As dots, a row of them fits in any cell.
+ const visible = dots
+ ? list.slice(0, MOST_DOTS)
+ : list.length > room
+ ? list.slice(0, Math.max(0, room - 1))
+ : list;
const more = list.length - visible.length;
const isSelected = sameDay(day, selected);
return (
@@ -745,13 +760,16 @@ function MonthView({
? day.toLocaleDateString(undefined, { month: "short", day: "numeric" })
: day.getDate()}
</span>
- <ul className="cx-items" style={{ marginTop: `${lanesHere * LANE}px` }}>
+ <ul className={`cx-items${dots ? " is-dots" : ""}`} style={{ marginTop: `${lanesHere * LANE}px` }}>
{visible.map((item) =>
item.kind === "event" ? (
<li key={item.event.guid}>
<button
className="cx-item"
style={{ "--cal": tint(calendars.get(item.event.calendarGuid)) } as React.CSSProperties}
+ // Named in full, for the dot that is all a narrow cell shows.
+ aria-label={`${item.event.title}, ${clock(item.event.startsAt)}`}
+ title={dots ? `${item.event.title} · ${clock(item.event.startsAt)}` : undefined}
onClick={(e) => onOpen(item.event, { x: e.clientX, y: e.clientY })}
>
<span className="cx-dot" aria-hidden="true" />
@@ -761,7 +779,10 @@ function MonthView({
</li>
) : (
<li key={item.reminder.guid}>
- <span className={`cx-item is-reminder${item.reminder.completedAt ? " is-done" : ""}`}>
+ <span
+ className={`cx-item is-reminder${item.reminder.completedAt ? " is-done" : ""}`}
+ title={dots ? `${item.reminder.title} · ${clock(item.at)}` : undefined}
+ >
<span className="cx-ring" aria-hidden="true" />
<span className="cx-item-title">{item.reminder.title}</span>
<span className="cx-item-time">{clock(item.at)}</span>
diff --git a/src/styles/app.css b/src/styles/app.css
index d36c6fb..c77c8d9 100644
--- a/src/styles/app.css
+++ b/src/styles/app.css
@@ -440,6 +440,80 @@
overflow-y: auto;
padding: 28px 34px 28px 248px;
}
+.sidebar-toggle, .sidebar-scrim, .compact-back { display: none; }
+
+/*
+ * A narrow window, as iPadOS does it: the sidebar steps aside and the content takes the whole
+ * width, with a button at the top left to bring the sidebar back over it. Picking a screen,
+ * Escape or a click outside puts it away again.
+ */
+@media (max-width: 720px) {
+ /* Outranks each screen's own `.content:has(...)` padding. */
+ .library > main.content { padding: 54px 16px 16px; }
+ .sidebar {
+ z-index: 30;
+ /* Over content, so nearly opaque: a list read through another list is two lists. */
+ background: color-mix(in srgb, var(--bg) 94%, transparent);
+ /* Room at the top for the button that opened it, which stays where it was. */
+ padding-top: 52px;
+ box-shadow: var(--glass-specular), 0 0 0 0.5px var(--glass-edge), var(--shadow-sheet);
+ transform: translateX(calc(-100% - 16px));
+ visibility: hidden;
+ transition: transform 260ms var(--ease), visibility 0s linear 260ms;
+ }
+ .is-sidebar-open .sidebar {
+ transform: none;
+ visibility: visible;
+ transition: transform 260ms var(--ease), visibility 0s;
+ }
+ .sidebar-toggle {
+ position: absolute;
+ z-index: 35;
+ top: 12px;
+ left: 12px;
+ display: grid;
+ place-items: center;
+ width: 32px;
+ height: 32px;
+ padding: 0;
+ border: 0;
+ border-radius: 50%;
+ background: var(--glass);
+ -webkit-backdrop-filter: var(--glass-blur);
+ backdrop-filter: var(--glass-blur);
+ box-shadow: var(--glass-specular), 0 0 0 0.5px var(--glass-edge);
+ color: var(--text);
+ cursor: default;
+ }
+ .sidebar-toggle:focus-visible { outline: 3px solid var(--gold-ring); }
+ /* Back to the list a detail was opened from, in the accent, as iOS writes it. */
+ .compact-back {
+ display: inline-flex;
+ align-items: center;
+ gap: 1px;
+ min-width: 0;
+ max-width: 55%;
+ height: 28px;
+ margin-left: -6px;
+ padding: 0 6px 0 0;
+ border: 0;
+ border-radius: 7px;
+ background: none;
+ color: var(--gold);
+ font: inherit;
+ font-size: var(--t-15);
+ cursor: default;
+ }
+ .compact-back span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+ .compact-back:focus-visible { outline: 3px solid var(--gold-ring); }
+ .is-sidebar-open .sidebar-scrim {
+ position: absolute;
+ z-index: 25;
+ inset: 0;
+ display: block;
+ background: rgba(0, 0, 0, 0.35);
+ }
+}
.content h1 { margin: 0 0 6px; font-size: var(--t-28); font-weight: 600; letter-spacing: -0.022em; }
/*
* Prose only — a paragraph nobody has given a job to.
@@ -652,6 +726,15 @@
height: 100%;
min-height: 0;
}
+/* One column at a time in a narrow window: the list, or the person picked from it. */
+@media (max-width: 720px) {
+ .contacts { grid-template-columns: minmax(0, 1fr); }
+ .contacts.is-detail .contacts-list,
+ .contacts:not(.is-detail) .contact-detail { display: none; }
+ .contacts .compact-back { margin-bottom: 8px; }
+ /* Scoped, to outrank the card's own padding further down. */
+ .contacts .contact-detail { padding: 0 0 24px; }
+}
.contacts-list {
display: flex;
@@ -975,6 +1058,43 @@
.content:has(.drive) { display: flex; flex-direction: column; overflow: hidden; }
+/*
+ * A narrow window, as Files on iPhone sets a row: the name gets the width, with its size and
+ * date beneath it, and the row's actions float over its far end when it is pointed at rather
+ * than holding a strip of the width empty when it is not.
+ */
+@media (max-width: 720px) {
+ .drive-row { position: relative; }
+ .drive-row-hit {
+ grid-template-columns: 28px auto minmax(0, 1fr);
+ grid-template-areas: "badge name name" "badge size date";
+ /* Spacing on the cells rather than the grid, so a row with no size (an app's folder)
+ starts its date where the name starts instead of a gap further on. */
+ column-gap: 0;
+ row-gap: 1px;
+ padding: 7px 8px;
+ }
+ .drive-row-hit > .drive-badge { margin-right: 10px; }
+ .drive-row-hit > .drive-meta:nth-of-type(3):not(:empty) { margin-right: 4px; }
+ .drive-row-hit > .drive-badge { grid-area: badge; }
+ .drive-row-hit > .drive-name { grid-area: name; }
+ .drive-row-hit > .drive-meta:nth-of-type(3) { grid-area: size; }
+ .drive-row-hit > .drive-meta:last-child { grid-area: date; }
+ .drive-row-hit > .drive-meta:nth-of-type(3):not(:empty)::after { content: " ·"; }
+ .drive-row-actions {
+ position: absolute;
+ top: 50%;
+ right: 4px;
+ padding: 2px;
+ border-radius: 8px;
+ background: var(--bg);
+ transform: translateY(-50%);
+ pointer-events: none;
+ }
+ .drive-row:hover .drive-row-actions,
+ .drive-row-actions:focus-within { pointer-events: auto; }
+}
+
/* ---- reminders: smart lists, inline editing, flags ------------------------------ */
/* Lines up with the list names beneath it, not with their icons — the heading used to sit
diff --git a/src/styles/calendar.css b/src/styles/calendar.css
index 3fae7cf..5bbf34b 100644
--- a/src/styles/calendar.css
+++ b/src/styles/calendar.css
@@ -276,6 +276,12 @@
.cx-item { grid-template-columns: 8px minmax(0, 1fr); }
.cx-item-time { display: none; }
}
+/* Dots, for a cell with no room for words: each item still opens on a click. */
+.cx-items.is-dots { display: flex; flex-wrap: wrap; gap: 3px; padding: 0 4px; }
+.cx-items.is-dots .cx-item { display: grid; place-items: center; width: 10px; height: 10px; padding: 0; border-radius: 50%; }
+.cx-items.is-dots .cx-item-title,
+.cx-items.is-dots .cx-item-time,
+.cx-items.is-dots .cx-more { display: none; }
.cx-item.is-reminder.is-done .cx-item-title { color: var(--text-3); text-decoration: line-through; }
.cx-more {
padding: 0 6px;
@@ -500,7 +506,7 @@
.cx .cx-title { font-size: 18px; }
.cx-title-full { display: none; }
.cx-title-brief { display: inline; }
- .cx-bar { gap: 10px 12px; padding-inline: 12px; }
+ .cx-bar { gap: 10px 12px; padding-inline: 0; }
.cx-bar .segment { padding-inline: 7px; }
.cx-tools { gap: 6px; }
}
diff --git a/src/styles/notes.css b/src/styles/notes.css
index e96c27b..237d93e 100644
--- a/src/styles/notes.css
+++ b/src/styles/notes.css
@@ -235,8 +235,14 @@ textarea.note-title::placeholder { color: var(--text-3); }
.notes-folders { display: none; }
.notes-folder-picker { display: block; }
}
-@media (max-width: 640px) {
- .notes { grid-template-columns: 1fr; grid-template-rows: minmax(0, 40%) minmax(0, 1fr); }
- .notes-list { border-right: 0; border-bottom: 1px solid var(--separator); padding-bottom: 8px; }
- .note-body { padding: 12px 0 0; }
+/* Narrower still, one column at a time, as on iPhone: the list, or the note it opened. */
+@media (max-width: 720px) {
+ .notes { grid-template-columns: minmax(0, 1fr); }
+ .notes-list { padding: 0; border-right: 0; }
+ .notes.is-detail .notes-list,
+ .notes:not(.is-detail) .note-body { display: none; }
+ .note-body { padding: 0; }
+ .note-bar { padding-right: 0; }
+ .note-when { text-align: right; }
+ .note-editor { padding-right: 0; }
}
diff --git a/src/styles/reminders.css b/src/styles/reminders.css
index 0cfdef1..cfe50c3 100644
--- a/src/styles/reminders.css
+++ b/src/styles/reminders.css
@@ -518,8 +518,16 @@
.rx-empty { margin: 28px 0 0; color: var(--text-3); font-size: var(--t-15); text-align: center; }
+/* One column at a time, as on iPhone: the lists, or the list picked from them. Searching
+ keeps the field and shows what it found beneath it. */
@media (max-width: 720px) {
- .rx { grid-template-columns: 1fr; }
- .rx-side { border-right: 0; border-bottom: 1px solid var(--separator); max-height: 45vh; padding-right: 2px; }
- .rx-main { padding-left: 2px; }
+ .rx { grid-template-columns: minmax(0, 1fr); }
+ .rx-side { border-right: 0; padding-right: 0; }
+ .rx-main { padding-left: 0; }
+ .rx.is-detail .rx-side,
+ .rx:not(.is-detail):not(.is-searching) .rx-main,
+ .rx.is-searching .rx-side > :not(.rx-search),
+ .rx.is-searching .compact-back { display: none; }
+ .rx.is-searching { grid-template-rows: auto minmax(0, 1fr); }
+ .rx .compact-back { align-self: flex-start; margin-bottom: 6px; }
}