Bento, the office suite that fits in a file
TypeScript mit-licenseofficeoffice-365office-suiteoffice-toolsoffice365open-sourcepowerpointself-hostedsingle-page-appslidesslideshareslideshowslideshow-galleryslideshow-makerslideshows
spaces: calendar span is Agenda (gantt keeps Timeline); calendars prefer Due (#798)
nyblnet407adffcfb1a
diff --git a/docs/DECISIONS.md b/docs/DECISIONS.mdindex 3ad28fe5..008b69a4 100644--- a/docs/DECISIONS.md+++ b/docs/DECISIONS.md@@ -11686,3 +11686,36 @@ in dash's styles.css comment.Also settled the same day: a stored `bento-lang` is validated before `Intl`sees it (dash/src/i18n.ts `intlLocale`), because the key is shared across everyfile on the origin and a bad value used to stop boot.++## 2026-10-20 — calendar span renamed Agenda (gantt keeps Timeline); calendars prefer Due — maintainer, 2026-10-20++Two rulings on the bento/spaces calendar layout, made by the maintainer.++- **The calendar's second shape is "Agenda" on screen.** It was "Timeline",+ the word the gantt layout also uses, so the view head could show two+ different pictures under one name. Only the words changed: the span button+ reads "Agenda" and its tooltip "Show an agenda"; the gantt layout keeps+ "Timeline" everywhere (layout button, Insert menu, "Show as a timeline").+- **The stored value stays `span: "timeline"`.** Files written since the+ calendar shipped carry it, the format is additive, and renaming the value+ would open every one of those views as a month grid. Do not "tidy" it to+ `"agenda"`; a reader that wants the new name gets it from the label, never+ from the file. `CAL_SPANS` in `spaces/src/calendar.ts` says so beside it.+- **A calendar prefers Due.** The date a page sits on is: its journal date;+ else `due`, when the schema declares it as a date field and the page carries+ a real ISO value; else the other date fields in schema order; else "No+ date". A task with both a Start and a Due belongs on the day it is due —+ that is what a calendar of work is opened to answer. `DEFAULT_FIELDS` is+ NOT reordered: the property strip still shows Start before Due. The order+ lives in one function, `dateOrderOf`, which both `dateOf` and the hint above+ the grid read, so the sentence cannot drift from the behaviour.++## 2026-10-20 — Designs: system font stacks or embedded fonts, never web fonts — maintainer, 2026-10-20++Fonts in a bento/spaces design are system font stacks (`FONT_STACKS`) or fonts+an author embeds in the file (`asset:`). No bundled or downloaded web fonts —+maintainer, 2026-10-20. This is already how `spaces/src/designs.ts` validates+fonts: `validFont` accepts a `FONT_STACKS` name, or an `asset:` key that+resolves to a `data:` font in the document's own assets, and drops anything+else to the base design's font. It is recorded so that a later change does not+add a web-font fetch.diff --git a/docs/spaces-agents.md b/docs/spaces-agents.mdindex 2e3a948d..258b9bc4 100644--- a/docs/spaces-agents.md+++ b/docs/spaces-agents.md@@ -480,10 +480,13 @@ written before layouts existed carries, and a stored `"board"` is a bytedifference that says nothing.A **calendar** lays the view's pages out by date, and has two shapes: a month-grid (`span` absent) and a chronological timeline (`span: "timeline"`, newest-first). Which date a page sits on is a **fixed rule, not a setting** — its-`journal` date if it has one, otherwise the first `date`-typed field in the-schema it carries a real `YYYY-MM-DD` value for. A page the rule finds no date+grid (`span` absent) and a chronological agenda, newest first. The agenda is+stored as `span: "timeline"` — write that value; the UI calls it "Agenda", but+the stored name predates the label and does not change. Which date a page sits+on is a **fixed rule, not a setting** — its `journal` date if it has one,+otherwise its `due` date (when the schema declares `due` as a date field),+otherwise the first other `date`-typed field, in schema order, that it carries+a real `YYYY-MM-DD` value for. A page the rule finds no datefor is listed under "No date" rather than dropped, and a value that isdigit-shaped but not a real day (`2026-13-99`) counts as no date rather thanbeing rolled into some other day. Month names, weekday names and the first daydiff --git a/scripts/test-spaces-chrome.ts b/scripts/test-spaces-chrome.tsindex 6c79770a..593df3d8 100644--- a/scripts/test-spaces-chrome.ts+++ b/scripts/test-spaces-chrome.ts@@ -1275,6 +1275,49 @@ async function browser(chrome: string, html: string): Promise<void> {const s = await shape(host)ok(!!s && s.chips.includes('launch=#launch') && s.raw, `after blur, ${what}: the chip is redrawn and the [^1] token is still raw`)}++ // ——— CALENDAR "AGENDA" vs GANTT "TIMELINE" (maintainer, 2026-10-20) ———+ // The calendar's second shape was labelled "Timeline", the same word as the+ // gantt layout. Its button now reads "Agenda"; the gantt keeps "Timeline";+ // and the toggle still STORES `span: 'timeline'`, because that is the+ // format every existing file carries. Measured in the rendered head and in+ // the committed block, after a trusted click.+ console.log('\n calendar agenda vs gantt timeline\n')+ await open(false)+ const CA_PAGE = 'capage', CA_CAL = 'cacal', CA_GANTT = 'cagantt'+ const caLoaded = await js<boolean>(`(() => {+ const d = JSON.parse(JSON.stringify(window.bento.doc))+ d.pages = [{ id: ${JSON.stringify(CA_PAGE)}, title: 'Calendar and timeline', blocks: [+ { id: ${JSON.stringify(CA_CAL)}, type: 'view', layout: 'calendar', html: 'Cal' },+ { id: ${JSON.stringify(CA_GANTT)}, type: 'view', layout: 'gantt', html: 'Plan' },+ ] }]+ return window.bento.loadDoc(JSON.stringify(d))+ })()`)+ await sleep(400)+ ok(caLoaded, 'the calendar × gantt fixture loads through window.bento.loadDoc')+ const viewHead = (id: string) => js<any>(`(() => { const v = document.querySelector('.sp-view[data-block-id="${id}"]'); if (!v) return null;+ const s = v.querySelector('[data-view-span]'), l = v.querySelector('[data-view-layout]');+ return { span: s ? { text: s.textContent, title: s.title } : null, layout: l?.textContent ?? null } })()`)+ const calBlock = () => js<any>(`(() => window.bento.doc.pages.find(p => p.id === ${JSON.stringify(CA_PAGE)})?.blocks.find(b => b.id === ${JSON.stringify(CA_CAL)}))()`)+ const g = await viewHead(CA_GANTT)+ ok(g?.layout === 'Timeline' && g?.span === null,+ `the gantt layout is still labelled "Timeline", with no span button (${JSON.stringify(g)})`)+ const m0 = await viewHead(CA_CAL)+ ok(m0?.layout === 'Calendar' && m0?.span?.text === 'Month' && m0?.span?.title === 'Show an agenda',+ `a fresh calendar reads "Month" and offers "Show an agenda" (${JSON.stringify(m0)})`)+ await tap(`document.querySelector('.sp-view[data-block-id="${CA_CAL}"] [data-view-span]')`)+ await sleep(300)+ const m1 = await viewHead(CA_CAL)+ ok(m1?.span?.text === 'Agenda' && m1?.span?.title === 'Show a month at a time',+ `after one click the span button reads "Agenda", never "Timeline" (${JSON.stringify(m1)})`)+ const cb = await calBlock()+ ok(cb?.span === 'timeline',+ `…and the block STORES span: 'timeline', the unchanged format value (${JSON.stringify(cb?.span)})`)+ await tap(`document.querySelector('.sp-view[data-block-id="${CA_CAL}"] [data-view-span]')`)+ await sleep(300)+ const cb2 = await calBlock()+ ok(cb2 && !('span' in cb2) && (await viewHead(CA_CAL))?.span?.text === 'Month',+ `a second click returns to the month grid and removes the key (${JSON.stringify(cb2?.span)})`)ws.close()} finally {try { child.kill('SIGKILL') } catch { /* gone */ }diff --git a/scripts/test-spaces-model.ts b/scripts/test-spaces-model.tsindex 7bdd98a9..8cdb830b 100644--- a/scripts/test-spaces-model.ts+++ b/scripts/test-spaces-model.ts@@ -45,9 +45,9 @@ import {viewRows, unknownSourceKeys,} from '../spaces/src/fields.ts'import {- CAL_SPANS, spanOf, nextSpan, dateOf, dateFieldsOf, splitByDate, dateHint,+ CAL_SPANS, spanOf, nextSpan, spanButton, dateOf, dateFieldsOf, dateOrderOf, splitByDate, dateHint,monthGrid, monthOf, monthLabel, stepMonth, daysApart, defaultMonth,- firstWeekday, weekdayNames, timelineDays,+ firstWeekday, weekdayNames, agendaDays,} from '../spaces/src/calendar.ts'import {unknownFilterOps, clauseCount, clauseSummary, windowRange, opsFor,@@ -3996,12 +3996,42 @@ function fsTable(f: string): string {}ok(spanOf('quarter') === 'month', 'a span from a NEWER build falls back to the month grid')+ // --- AGENDA, not Timeline (maintainer, 2026-10-20) -----------------------+ // The calendar's second shape is called "Agenda" on screen because the gantt+ // layout is "Timeline". The STORED value stays 'timeline': files already+ // carry it, and renaming it would open every one of them as a month grid.+ ok(spanButton('timeline').label === 'Agenda',+ `the span button reads "Agenda" in the calendar's second shape (got ${JSON.stringify(spanButton('timeline').label)})`)+ ok(spanButton('timeline').title === 'Show a month at a time',+ '…and its tooltip says what the click shows next, the month grid')+ ok(spanButton(undefined).label === 'Month' && spanButton(undefined).title === 'Show an agenda',+ 'the month grid\'s button reads "Month" and offers "Show an agenda"')+ ok(!/timeline/i.test(spanButton('timeline').label + spanButton('timeline').title + spanButton('month').title),+ 'no word of the span button says "timeline" — that name is the gantt layout\'s')+ ok(nextSpan(undefined) === 'timeline' && CAL_SPANS.includes('timeline' as never),+ 'toggling to the agenda still STORES span: \'timeline\' — the format did not change')+// --- WHICH DATE ----------------------------------------------------------const cdoc = calDoc()ok(dateOf(cdoc, crow('a', '2026-08-06')) === '2026-08-06','a journal entry is dated by its journal date')ok(dateOf(cdoc, crow('b', undefined, { due: '2026-08-09' })) === '2026-08-09',- '…a page without one falls to the first date FIELD it carries a value for')+ '…a page with only a Due sits on its DUE day')+ // A CALENDAR PREFERS DUE (maintainer, 2026-10-20). DEFAULT_FIELDS lists+ // Start before Due and still does — the property strip keeps that order —+ // so schema order alone would put a task with both on its START day.+ ok(dateFieldsOf(cdoc).map((f) => f.key).join() === 'start,due',+ 'the fixture is the real trap: the default schema declares Start BEFORE Due')+ ok(dateOf(cdoc, crow('sd', undefined, { start: '2026-08-03', due: '2026-08-14' })) === '2026-08-14',+ 'a page with BOTH a Start and a Due sits on its DUE day, not its start')+ ok(dateOf(cdoc, crow('so', undefined, { start: '2026-08-03' })) === '2026-08-03',+ '…a page with only a Start sits on its START day')+ ok(dateOf(cdoc, crow('sj', '2026-08-01', { start: '2026-08-03', due: '2026-08-14' })) === '2026-08-01',+ '…a journal page sits on its JOURNAL date, ahead of Due and Start')+ ok(dateOf(cdoc, crow('sx', undefined, { start: '2026-08-03', due: '2026-13-99' })) === '2026-08-03',+ '…and an INVALID Due beside a valid Start falls through to the START day')+ ok(dateOrderOf(cdoc).map((f) => f.key).join() === 'due,start',+ 'the calendar reads Due first, then Start')ok(dateOf(cdoc, crow('c', '2026-08-06', { due: '2027-01-01' })) === '2026-08-06','…and the journal date wins when a page has both')ok(dateOf(cdoc, crow('e')) === '', 'a page with neither has NO date rather than a guessed one')@@ -4022,6 +4052,17 @@ function fsTable(f: string): string {ok(dateOf(two, crow('h', undefined, { due: '', pub: '2026-03-04' })) === '2026-03-04','an EMPTY date field is skipped for the next one, not treated as the answer')ok(dateFieldsOf(two).length === 2, 'the hint names every date field the schema declares')+ // Due is preferred wherever the schema puts it; the OTHER date fields keep+ // schema order behind it+ const three = calDoc([+ { key: 'pub', label: 'Published', vt: 'date' },+ { key: 'start', label: 'Start', vt: 'date' },+ { key: 'due', label: 'Due', vt: 'date' },+ ])+ ok(dateOrderOf(three).map((f) => f.key).join() === 'due,pub,start',+ 'Due moves to the front from anywhere in the schema; the rest keep schema order')+ ok(dateOf(three, crow('i', undefined, { pub: '2026-03-04', due: '2026-05-06' })) === '2026-05-06',+ '…so a page with a Published and a Due sits on its Due')}// --- NOTHING IS DROPPED --------------------------------------------------@@ -4209,12 +4250,12 @@ function fsTable(f: string): string {ok(defaultMonth(['nonsense', '2019-04-02'], '2026-08-20') === '2019-04','a junk value in the list is ignored rather than deciding the month')- // --- THE TIMELINE --------------------------------------------------------+ // --- THE AGENDA ----------------------------------------------------------{const rows = [crow('a', '2026-01-02'), crow('b', '2026-08-06'), crow('c', '2026-03-04')]- const days = timelineDays(splitByDate(cdoc, rows).days)+ const days = agendaDays(splitByDate(cdoc, rows).days)ok(days.join(',') === '2026-08-06,2026-03-04,2026-01-02',- 'the timeline reads NEWEST FIRST, whatever order the pages are in')+ 'the agenda reads NEWEST FIRST, whatever order the pages are in')}// --- THE HINT ------------------------------------------------------------@@ -4222,6 +4263,8 @@ function fsTable(f: string): string {// it goes through t() as a literal with an interpolated list — a sentence// assembled from fragments does not survive the eight catalogs.ok(/Due/.test(dateHint(calDoc())), 'the view says out loud which date it used')+ ok(dateHint(calDoc()) === 'Dated by the journal date, then Due, Start.',+ `the hint states the REAL order, Due before Start (got ${JSON.stringify(dateHint(calDoc()))})`)ok(dateHint(calDoc([{ key: 'x', label: 'X', vt: 'text' }])) === 'Dated by the journal date.','…and says so differently when the schema declares no date field at all')ok(dateHint(calDoc([{ key: 'due', vt: 'date' }])).includes('due'),diff --git a/spaces/CHANGELOG.md b/spaces/CHANGELOG.mdindex e8b64e29..7237db9d 100644--- a/spaces/CHANGELOG.md+++ b/spaces/CHANGELOG.md@@ -1396,6 +1396,15 @@ Versions follow `0.MINOR.PATCH` while pre-1.0.closing now never changes the desktop layout, and widening the windowbrings back the layout you last chose there. `[`, `]` and the panelchevrons at desktop width are remembered as before.+- **The calendar's second shape is called Agenda, and calendars go by Due.**+ The calendar's Month button now switches to **Agenda**. It used to say+ "Timeline", the same name as the timeline layout, which is a different+ picture. Files are unchanged: an agenda is still saved as+ `span: "timeline"`, so existing views open exactly as before. A page with+ both a Start and a Due date now sits on its Due day. A page with only a+ Start still sits on its Start day, and a journal entry still sits on its own+ date. The line above the grid states the order, for example "Dated by the+ journal date, then Due, Start."## [0.1.0] — 2026-08-03diff --git a/spaces/src/calendar.ts b/spaces/src/calendar.tsindex 4a38ac9e..8ae06dfb 100644--- a/spaces/src/calendar.ts+++ b/spaces/src/calendar.ts@@ -2,10 +2,10 @@// Copyright (c) 2026 The Bento authors// The CALENDAR layout: a view laid out by date.//-// ONE ENTRY IN THE CYCLE, TWO SHAPES BEHIND IT. A month grid and a timeline are+// ONE ENTRY IN THE CYCLE, TWO SHAPES BEHIND IT. A month grid and an agenda are// genuinely different pictures — a grid answers "what is this week like" and// fails completely on data spread over years (thirty-six mostly-empty months to-// page through), while a timeline answers "what happened, in order" and cannot+// page through), while an agenda answers "what happened, in order" and cannot// show you a shape of a month at all. Both are needed, because this app holds// both kinds of dated page: journals are dense and daily, a reading list's// dates are sparse and span years.@@ -14,7 +14,7 @@// different questions; these two answer ONE question ("when?") at two// densities. And the layout control is a CYCLE, whose cost is linear: a sixth// shape makes getting back to the board from the middle worse than the shape is-// worth. So the cycle gains one entry, `calendar`, and the month/timeline+// worth. So the cycle gains one entry, `calendar`, and the month/agenda// choice is a second control that appears only while you are in it — exactly// how `groupBy` already works, a board-only parameter with its own button that// the renderer hides for every other shape.@@ -23,16 +23,23 @@//// 1. `page.journal`, when it is a real ISO date. The page IS a day; nothing// about that is ambiguous.-// 2. otherwise the first `date`-typed field IN SCHEMA ORDER that this page-// carries a real ISO value for. Not "the first date field" — a page with-// an empty Due and a filled Published is dated by Published, or the rule-// would drop it for carrying the wrong empty box.-// 3. otherwise it has NO DATE, and it is shown saying so. Never dropped: a+// 2. otherwise `due`, when the schema declares it as a date field and this+// page carries a real ISO value for it. A CALENDAR PREFERS DUE (maintainer,+// 2026-10-20): a task with both a Start and a Due belongs on the day it is+// due — that is the question a calendar of work is opened to answer. The+// property strip still shows Start before Due; DEFAULT_FIELDS is not+// reordered for this, the calendar alone reads Due first.+// 3. otherwise the remaining `date`-typed fields IN SCHEMA ORDER, the first+// this page carries a real ISO value for. Not "the first date field" — a+// page with an empty Due and a filled Published is dated by Published, or+// the rule would drop it for carrying the wrong empty box.+// 4. otherwise it has NO DATE, and it is shown saying so. Never dropped: a// view that silently holds fewer pages than its own count is the failure// this whole file exists to avoid.//// The rule is not configurable and the UI says what it is, in words, above the-// grid. A `dateBy` key would be a permanent format field bought to express a+// grid — and that sentence is built from `dateOrderOf`, the SAME list `dateOf`+// walks, so the words cannot drift from the behaviour. A `dateBy` key would be a permanent format field bought to express a// preference nobody has yet asked for.//// TIMEZONES. Every date here is built from COMPONENTS in the reader's own@@ -65,8 +72,16 @@ import { t } from './i18n.ts'/*** The shapes the calendar layout can take, and the order its button cycles.*+ * THE SECOND SHAPE IS CALLED "AGENDA" AND STORED AS `'timeline'`. The UI was+ * renamed (maintainer, 2026-10-20) because the gantt layout is also labelled+ * "Timeline", and two buttons with one word for two pictures is a guess for+ * the reader. The STORED value did not change and never will: files written+ * since the calendar shipped carry `span: "timeline"`, the format is additive,+ * and a rename of the value would make every one of them open as a month grid.+ * Only the label and tooltip (`spanButton`) say "agenda".+ ** `month` is the ABSENT key, exactly as `board` is for the layout itself: a- * view toggled to the timeline and back is byte-identical to one nobody+ * view toggled to the agenda and back is byte-identical to one nobody* touched. A STRING rather than a boolean because `week` and `year` are the* obvious next two, and widening a boolean afterwards cannot be done at all.*/@@ -88,18 +103,47 @@ export function spanOf(raw: unknown): CalSpan {return (CAL_SPANS as readonly string[]).includes(s) ? (s as CalSpan) : 'month'}-/** The next shape: month → timeline → month. */+/** The next shape: month → agenda (stored `'timeline'`) → month. */export function nextSpan(raw: unknown): CalSpan {const here = spanOf(raw)return CAL_SPANS[(CAL_SPANS.indexOf(here) + 1) % CAL_SPANS.length]}+/**+ * The span button's words: what shape this is, and what a click shows next.+ *+ * Here rather than inline in render.ts so the rig can read them without a DOM.+ * LITERALS inside the function, never a module-level table: the extractor+ * sweeps `t()` literals, and a `t()` in a module const is frozen at import,+ * before the reader's locale is known. "Agenda", not "Timeline" — that word+ * belongs to the gantt layout (see CAL_SPANS).+ */+export function spanButton(raw: unknown): { label: string; title: string } {+ return spanOf(raw) === 'timeline'+ ? { label: t('Agenda'), title: t('Show a month at a time') }+ : { label: t('Month'), title: t('Show an agenda') }+}+// ---- which date ------------------------------------------------------------/** Every `date`-typed field the schema declares, in its declared order. */export const dateFieldsOf = (doc: SpacesDoc): FieldSpec[] =>fieldsOf(doc).filter((f) => f.vt === 'date')+/**+ * The date fields a calendar reads, IN THE ORDER IT READS THEM: `due` first+ * when the schema declares it as a date, then every other date field in schema+ * order. The journal date is ahead of all of them and is not a field.+ *+ * ONE function for both `dateOf` and `dateHint`, so the sentence above the grid+ * is the rule rather than a description of it that could fall out of step.+ */+export function dateOrderOf(doc: SpacesDoc): FieldSpec[] {+ const all = dateFieldsOf(doc)+ const due = all.filter((f) => f.key === 'due')+ return [...due, ...all.filter((f) => f.key !== 'due')]+}+/*** The date this row sits on — `''` when it has none.*@@ -112,7 +156,7 @@ export const dateFieldsOf = (doc: SpacesDoc): FieldSpec[] =>export function dateOf(doc: SpacesDoc, row: IssueRow): string {const j = row.page.journalif (typeof j === 'string' && isISO(j)) return j- for (const f of dateFieldsOf(doc)) {+ for (const f of dateOrderOf(doc)) {const v = row.values.get(f.key)if (typeof v === 'string' && isISO(v)) return v}@@ -316,7 +360,7 @@ export function monthGrid(ym: string, loc?: string): CalCell[] {}/**- * The days a timeline lists, NEWEST FIRST.+ * The days an agenda lists, NEWEST FIRST.** One direction, chosen rather than configured. Newest-first is the order this* app already reads dated pages in (`journalsOf`), the dominant dated content@@ -324,7 +368,7 @@ export function monthGrid(ym: string, loc?: string): CalCell[] {* recent one — a five-year journal opened oldest-first is five years of* scrolling to reach today.*/-export const timelineDays = (days: Map<string, IssueRow[]>): string[] =>+export const agendaDays = (days: Map<string, IssueRow[]>): string[] =>[...days.keys()].sort((a, b) => b.localeCompare(a))// ---- what the header says --------------------------------------------------@@ -339,7 +383,7 @@ export const timelineDays = (days: Map<string, IssueRow[]>): string[] =>* across the eight catalogs.*/export function dateHint(doc: SpacesDoc): string {- const fields = dateFieldsOf(doc)+ const fields = dateOrderOf(doc)if (!fields.length) return t('Dated by the journal date.')return t('Dated by the journal date, then {fields}.', {fields: fields.map((f) => (typeof f.label === 'string' && f.label ? f.label : f.key)).join(', '),@@ -374,7 +418,7 @@ export interface CalendarCtx {locale?: string/** false in reading view, on paper, and in a locked space */editable?: boolean- /** the view's own card builder, so a timeline entry is the same card a list draws */+ /** the view's own card builder, so an agenda entry is the same card a list draws */card: (row: IssueRow) => HTMLElement/** for the rigs — what "today" is, so a fixture is not a different test tomorrow */today?: string@@ -415,7 +459,8 @@ export function renderCalendar(host: HTMLElement, ctx: CalendarCtx): void {const draw = (): void => {body.replaceChildren()- if (ctx.span === 'timeline') drawTimeline(body, ctx, split)+ // 'timeline' is the STORED name of the agenda shape — see CAL_SPANS+ if (ctx.span === 'timeline') drawAgenda(body, ctx, split)else drawMonth(body, ctx, split, today, draw)drawUndated(body, ctx, split)}@@ -481,10 +526,10 @@ function drawMonth(body.appendChild(grid)}-function drawTimeline(body: HTMLElement, ctx: CalendarCtx, split: DateSplit): void {+function drawAgenda(body: HTMLElement, ctx: CalendarCtx, split: DateSplit): void {const line = document.createElement('div')line.className = 'sp-cal-line'- for (const iso of timelineDays(split.days)) {+ for (const iso of agendaDays(split.days)) {const day = document.createElement('div')day.className = 'sp-cal-day'const h = document.createElement('div')diff --git a/spaces/src/editor.ts b/spaces/src/editor.tsindex 411b190c..534a9b6e 100644--- a/spaces/src/editor.ts+++ b/spaces/src/editor.ts@@ -2126,12 +2126,13 @@ export class Editor {}/**- * MONTH ⇄ TIMELINE, the calendar's own second shape.+ * MONTH ⇄ AGENDA, the calendar's own second shape (stored as `span:+ * 'timeline'` — the agenda's on-disk name; see calendar.ts CAL_SPANS).** A parameter of one layout, like `groupBy` — not a sixth entry in the layout* cycle, whose cost is one click for everybody every time they pass it. Same* writer discipline as every other view key: `month` is the DEFAULT, so it is- * stored as an ABSENT key and a view toggled to the timeline and back is+ * stored as an ABSENT key and a view toggled to the agenda and back is* byte-identical to one nobody touched.*/private toggleViewSpan(blockId: string): void {diff --git a/spaces/src/i18n/de.ts b/spaces/src/i18n/de.tsindex b5639db4..7c4a3fa0 100644--- a/spaces/src/i18n/de.ts+++ b/spaces/src/i18n/de.ts@@ -695,8 +695,9 @@ export const de: Catalog = {"Calendar": "Kalender","Show as a calendar": "Als Kalender anzeigen","Month": "Monat",+ "Agenda": "Agenda","Show a month at a time": "Einen Monat auf einmal anzeigen",- "Show a timeline": "Als Zeitstrahl anzeigen",+ "Show an agenda": "Als Agenda anzeigen","Dated by the journal date.": "Datiert nach dem Journaldatum.","Dated by the journal date, then {fields}.": "Datiert nach dem Journaldatum, dann {fields}.","Previous month": "Vorheriger Monat",diff --git a/spaces/src/i18n/es.ts b/spaces/src/i18n/es.tsindex 278e41db..ee4f57a9 100644--- a/spaces/src/i18n/es.ts+++ b/spaces/src/i18n/es.ts@@ -695,8 +695,9 @@ export const es: Catalog = {"Calendar": "Calendario","Show as a calendar": "Ver como calendario","Month": "Mes",+ "Agenda": "Agenda","Show a month at a time": "Mostrar un mes cada vez",- "Show a timeline": "Mostrar una cronología",+ "Show an agenda": "Mostrar como agenda","Dated by the journal date.": "Fechado por la fecha del diario.","Dated by the journal date, then {fields}.": "Fechado por la fecha del diario, luego {fields}.","Previous month": "Mes anterior",diff --git a/spaces/src/i18n/fr.ts b/spaces/src/i18n/fr.tsindex 75c35c81..3d788cc5 100644--- a/spaces/src/i18n/fr.ts+++ b/spaces/src/i18n/fr.ts@@ -695,8 +695,9 @@ export const fr: Catalog = {"Calendar": "Calendrier","Show as a calendar": "Afficher en calendrier","Month": "Mois",+ "Agenda": "Agenda","Show a month at a time": "Afficher un mois à la fois",- "Show a timeline": "Afficher une chronologie",+ "Show an agenda": "Afficher sous forme d’agenda","Dated by the journal date.": "Daté par la date du journal.","Dated by the journal date, then {fields}.": "Daté par la date du journal, puis {fields}.","Previous month": "Mois précédent",diff --git a/spaces/src/i18n/it.ts b/spaces/src/i18n/it.tsindex da6011e7..3c280ff7 100644--- a/spaces/src/i18n/it.ts+++ b/spaces/src/i18n/it.ts@@ -695,8 +695,9 @@ export const it: Catalog = {"Calendar": "Calendario","Show as a calendar": "Mostra come calendario","Month": "Mese",+ "Agenda": "Agenda","Show a month at a time": "Mostra un mese alla volta",- "Show a timeline": "Mostra una cronologia",+ "Show an agenda": "Mostra come agenda","Dated by the journal date.": "Datato in base alla data del diario.","Dated by the journal date, then {fields}.": "Datato in base alla data del diario, poi {fields}.","Previous month": "Mese precedente",diff --git a/spaces/src/i18n/ja.ts b/spaces/src/i18n/ja.tsindex bcf719bc..56a03f12 100644--- a/spaces/src/i18n/ja.ts+++ b/spaces/src/i18n/ja.ts@@ -695,8 +695,9 @@ export const ja: Catalog = {"Calendar": "カレンダー","Show as a calendar": "カレンダーで表示","Month": "月",+ "Agenda": "予定一覧","Show a month at a time": "1か月ずつ表示",- "Show a timeline": "タイムラインで表示",+ "Show an agenda": "予定一覧で表示","Dated by the journal date.": "ジャーナルの日付で並べています。","Dated by the journal date, then {fields}.": "ジャーナルの日付、次に {fields} で並べています。","Previous month": "前の月",diff --git a/spaces/src/i18n/packed.ts b/spaces/src/i18n/packed.tsindex 41456841..99679214 100644--- a/spaces/src/i18n/packed.ts+++ b/spaces/src/i18n/packed.ts@@ -82,6 +82,7 @@ export const PACKED: Record<string, ReadonlyArray<string | 0>> = {"Added {name}": ["{name} を追加しました","已添加{name}","已新增{name}","Se añadió {name}","{name} ajoutée","{name} hinzugefügt","{name} aggiunta","{name} adicionada"],"Address of a video or audio file": ["動画または音声ファイルのアドレス","视频或音频文件的地址","影片或音訊檔案的位址","Dirección de un archivo de vídeo o audio","Adresse d’un fichier vidéo ou audio","Adresse einer Video- oder Audiodatei","Indirizzo di un file video o audio","Endereço de um arquivo de vídeo ou áudio"],"Adds status, priority, assignee, estimate": ["ステータス・優先度・担当者・見積もりを追加します","添加状态、优先级、负责人和估算","新增狀態、優先順序、負責人與估算","Añade estado, prioridad, responsable y estimación","Ajoute statut, priorité, responsable et estimation","Fügt Status, Priorität, Bearbeiter:in und Schätzung hinzu","Aggiunge stato, priorità, assegnatario e stima","Adiciona status, prioridade, responsável e estimativa"],+ "Agenda": ["予定一覧","日程","日程","Agenda","Agenda","Agenda","Agenda","Agenda"],"All text. Nothing is embedded, so this file is as small as a space gets.": ["すべてテキストです。埋め込みはないので、このファイルはスペースとして最小の大きさです。","全是文字。没有嵌入任何内容,所以这个文件已是空间能达到的最小体积。","全是文字。沒有嵌入任何內容,所以這個檔案已是空間能達到的最小體積。","Todo es texto. No hay nada incrustado, así que este archivo es lo más pequeño que puede ser un espacio.","Que du texte. Rien n’est intégré, donc ce fichier est aussi léger qu’un espace peut l’être.","Nur Text. Nichts ist eingebettet, also ist diese Datei so klein, wie ein Space nur sein kann.","Solo testo. Non c’è nulla di incorporato, quindi questo file è il più piccolo possibile per uno spazio.","Só texto. Nada está incorporado, então este arquivo é o menor que um espaço pode ser."],"Almanac": ["アルマナック","年鉴","年鑑","Almanaque","Almanach","Almanach","Almanacco","Almanaque"],"Already an issue": ["すでにイシューです","已经是事项","已經是項目","Ya es una incidencia","Déjà un ticket","Ist bereits ein Issue","È già una issue","Já é uma tarefa"],@@ -638,7 +639,7 @@ export const PACKED: Record<string, ReadonlyArray<string | 0>> = {"Shortcuts & tips": ["ショートカットとヒント","快捷键与提示","快速鍵與提示","Atajos y consejos","Raccourcis et astuces","Tastenkürzel & Tipps","Scorciatoie e suggerimenti","Atalhos e dicas"],"Shortcuts & tips (?)": ["ショートカットとヒント(?)","快捷键与提示(?)","快速鍵與提示(?)","Atajos y consejos (?)","Raccourcis et astuces (?)","Tastenkürzel & Tipps (?)","Scorciatoie e suggerimenti (?)","Atalhos e dicas (?)"],"Show a month at a time": ["1か月ずつ表示","按月显示","按月顯示","Mostrar un mes cada vez","Afficher un mois à la fois","Einen Monat auf einmal anzeigen","Mostra un mese alla volta","Mostrar um mês de cada vez"],- "Show a timeline": ["タイムラインで表示","以时间线显示","以時間軸顯示","Mostrar una cronología","Afficher une chronologie","Als Zeitstrahl anzeigen","Mostra una cronologia","Mostrar uma linha do tempo"],+ "Show an agenda": ["予定一覧で表示","以日程列表显示","以日程列表顯示","Mostrar como agenda","Afficher sous forme d’agenda","Als Agenda anzeigen","Mostra come agenda","Mostrar como agenda"],"Show as a board": ["ボードで表示","以看板显示","以看板顯示","Mostrar como tablero","Afficher en tableau","Als Board anzeigen","Mostra come bacheca","Mostrar como quadro"],"Show as a calendar": ["カレンダーで表示","以日历显示","以日曆顯示","Ver como calendario","Afficher en calendrier","Als Kalender anzeigen","Mostra come calendario","Mostrar como calendário"],"Show as a gallery": ["ギャラリーで表示","以图库显示","以圖庫顯示","Mostrar como galería","Afficher en galerie","Als Galerie anzeigen","Mostra come galleria","Mostrar como galeria"],diff --git a/spaces/src/i18n/pt.ts b/spaces/src/i18n/pt.tsindex daa15320..46a6a8ff 100644--- a/spaces/src/i18n/pt.ts+++ b/spaces/src/i18n/pt.ts@@ -702,8 +702,9 @@ export const pt: Catalog = {"Calendar": "Calendário","Show as a calendar": "Mostrar como calendário","Month": "Mês",+ "Agenda": "Agenda","Show a month at a time": "Mostrar um mês de cada vez",- "Show a timeline": "Mostrar uma linha do tempo",+ "Show an agenda": "Mostrar como agenda","Dated by the journal date.": "Datado pela data do diário.","Dated by the journal date, then {fields}.": "Datado pela data do diário, depois {fields}.","Previous month": "Mês anterior",diff --git a/spaces/src/i18n/zh-Hans.ts b/spaces/src/i18n/zh-Hans.tsindex e97e069d..a42dd559 100644--- a/spaces/src/i18n/zh-Hans.ts+++ b/spaces/src/i18n/zh-Hans.ts@@ -695,8 +695,9 @@ export const zh_Hans: Catalog = {"Calendar": "日历","Show as a calendar": "以日历显示","Month": "月",+ "Agenda": "日程","Show a month at a time": "按月显示",- "Show a timeline": "以时间线显示",+ "Show an agenda": "以日程列表显示","Dated by the journal date.": "按日志日期排列。","Dated by the journal date, then {fields}.": "按日志日期排列,其次是 {fields}。","Previous month": "上一月",diff --git a/spaces/src/i18n/zh-Hant.ts b/spaces/src/i18n/zh-Hant.tsindex bdfa1e07..bc5be36d 100644--- a/spaces/src/i18n/zh-Hant.ts+++ b/spaces/src/i18n/zh-Hant.ts@@ -695,8 +695,9 @@ export const zh_Hant: Catalog = {"Calendar": "日曆","Show as a calendar": "以日曆顯示","Month": "月",+ "Agenda": "日程","Show a month at a time": "按月顯示",- "Show a timeline": "以時間軸顯示",+ "Show an agenda": "以日程列表顯示","Dated by the journal date.": "依日誌日期排列。","Dated by the journal date, then {fields}.": "依日誌日期排列,其次是 {fields}。","Previous month": "上一月",diff --git a/spaces/src/render.ts b/spaces/src/render.tsindex e831d8fd..b0432af9 100644--- a/spaces/src/render.ts+++ b/spaces/src/render.ts@@ -29,7 +29,7 @@ import { todayISO } from './journal.ts'// imports it from outside slides, so this is a settled cross-app path rather// than a new one — and it is read-only: kernel/src is a serialized zone.import { chartSnapshotSvg } from '../../kernel/src/charts.ts'-import { renderCalendar, spanOf, nextSpan } from './calendar.ts'+import { renderCalendar, spanOf, nextSpan, spanButton } from './calendar.ts'import { unknownFilterOps } from './query.ts'import { answer, feed, freshContext, type CalcCtx } from './calc.ts'import { ICONS, type IconName } from './icons'@@ -1403,10 +1403,13 @@ function renderView(host: HTMLElement, b: Block, doc: SpacesDoc, opts: RenderOpt// parameter of ONE layout gets its own control, shown only while that// layout is on, rather than a sixth entry in a cycle everybody has to click// through. Whole sentences again, for the reason three lines up.+ // The words come from calendar.ts `spanButton`: the second shape is+ // "Agenda" on screen and `span: 'timeline'` in the file, because "Timeline"+ // is the gantt layout's name (LAYOUT_LABEL above) and the stored value is+ // format.+ const spanWords = spanButton(calSpan)const spanB = here === 'calendar'- ? btn('viewSpan',- spanOf(calSpan) === 'timeline' ? t('Timeline') : t('Month'),- spanOf(calSpan) === 'timeline' ? t('Show a month at a time') : t('Show a timeline'))+ ? btn('viewSpan', spanWords.label, spanWords.title): undefinedif (spanB) spanB.dataset.next = nextSpan(calSpan)