Skip to content

armgit / bento

Public Imported from GitHub
0

Bento, the office suite that fits in a file

spaces: a timeline and a workload chart, as view layouts (#443)

nyblnet332b6a4a4a3e
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a1a10909..484a5157 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -210,6 +210,18 @@ jobs:
TZ=$tz node scripts/test-spaces-journal.ts
done
+ - name: Spaces timeline and workload rig (several timezones)
+ # A chart is a picture of data that came out of a file somebody mailed
+ # you, and every way it can be wrong is a way it stays silent about it:
+ # a bar in the wrong month still looks like a bar. Half of what this rig
+ # asserts is a date, so it runs in five timezones for the reasons
+ # journal.ts records — including a half-hour DST offset.
+ run: |
+ for tz in UTC Europe/Berlin America/Los_Angeles Pacific/Kiritimati Australia/Lord_Howe; do
+ echo "--- $tz"
+ TZ=$tz node scripts/test-spaces-gantt.ts
+ done
+
- name: Magic notes evaluator (several timezones)
# Two failure modes, and the second is what would make the feature worse
# than not having it: a WRONG answer (silent, confident, in somebody's
diff --git a/docs/DECISIONS.md b/docs/DECISIONS.md
index b3be1601..501053e7 100644
--- a/docs/DECISIONS.md
+++ b/docs/DECISIONS.md
@@ -6695,6 +6695,82 @@ chance to run and it is cheap. Reconciliation for this cycle: 41 commits, 40
mapped, 1 correctly absent, run by bento-team-slides.
+
+## 2026-09-10 — a chart in bento/spaces is a `view` LAYOUT, not a `chart` block
+
+Two shapes landed together — a timeline (`layout:"gantt"`) and a workload chart
+(`layout:"workload"`) — and the question they forced is where a chart lives in
+this app at all. Nothing in the format held one before. The answer binds every
+chart that comes after, so it is written here rather than only in the source.
+
+**They are layouts.** Three reasons, in the order they should be weighed.
+
+1. **The input vocabulary already exists and cannot be duplicated cheaply.**
+ Both shapes need `source` (which pages), `filter` (which of them), `sort` (in
+ what order) and `groupBy` (bucketed how). A `chart` block would have to grow
+ four keys carrying those same four meanings. The format is permanent and
+ there is no server, so that is not a duplication that gets tidied later — it
+ is two vocabularies for one question, in every file ever saved. `fields.ts`
+ already refuses to grow a second ordering mechanism beside `sort` for exactly
+ this reason.
+
+2. **The degradation is measurably better, and it was measured.** `layoutOf()`
+ maps an unrecognised layout to `board`. A shell built from the previous
+ release, shown `{"type":"view","layout":"gantt"}`, renders a board of the
+ same pages, keeps `layout:"gantt"` through a save, and keeps the new `start`
+ prop blocks too — checked in a browser against a real `origin/main` build,
+ not inferred. A `chart` block would have fallen to the unknown-type path and
+ rendered its `html`: one line of text where a schedule was.
+
+3. **The honest counter-argument loses on scope, and is recorded so it can be
+ re-opened.** A Gantt genuinely is a layout of pages — one page, one bar. A
+ workload chart genuinely is an AGGREGATE: it has fewer marks than rows, and
+ no mark is a page. If those two had wanted different homes the right answer
+ would have been to say so. They do not, because the aggregation is a property
+ of the OUTPUT while every input key keeps the meaning it already had —
+ `groupBy` is "the field the buckets come from", which is what it means on a
+ board too. A board with summed columns is what a workload chart is.
+
+**What this decision does NOT cover, and what should be a block.** A chart of
+data that is not pages — a `table` block's numbers, say. It has no `source`, no
+`filter` and no rows, and shares nothing with a view but the engine. When that
+arrives it should be its own block type, and this entry is not a precedent
+against it.
+
+**The engine is the kernel's, read-only.** `kernel/src/charts.ts`, imported the
+way dash already imports it from outside slides. Measured cost of pulling the
+engine into the spaces shell: **+6.2KB** compressed for charts-lite and anim.ts
+together, against a shell of ~278KB.
+
+**Six is the ceiling for the one cycling layout button.** One control and one
+word beats a menu at three or four shapes; at six, five clicks to cross the ring
+is already the worse trade. A seventh shape should convert that control into a
+picker rather than extend the cycle.
+
+### Two consequences of adding `start` to the default schema
+
+**Absent `start` is the installed base, not an edge case.** The tracker shipped
+with `due` and nothing else, so every issue in every file already written has a
+due date and no start. Drawing those as zero-width bars would render every
+existing tracker as a column of hairlines. They draw as a **milestone diamond**
+at the one date the author gave — a date with no duration, which is what the
+file says. The symmetric case (a start with no due) is a diamond too.
+
+**A picture of somebody else's numbers must not be quietly wrong.** Each
+bad-data case is decided, not left to arithmetic: a due date before the start is
+drawn between the two dates that are really in the file and FLAGGED, never
+silently swapped (a swap draws a confident schedule nobody typed, and looks
+correct); a malformed date is an absent date; a negative or non-numeric estimate
+is excluded from the sum AND counted, because a −3 absorbed into a bar makes
+somebody look lighter than the work they hold; and an oversized view draws a
+capped, deterministically ordered chart that says how many rows it did not draw.
+
+**Dates are integer day numbers computed arithmetically (days-from-civil), with
+no `Date` constructed for any comparison.** The rig runs under five timezones,
+and that matrix earned its keep in this change: a sabotage replacing the
+arithmetic with `new Date(y, m-1, d)` passed every assertion under `TZ=UTC` and
+failed under `TZ=Pacific/Kiritimati`. A one-timezone run cannot see that class
+of bug at all, from the inside.
## 2026-09-09 — a calendar is ONE layout with two shapes, and its date is a rule
bento/spaces gained a fifth view layout, `calendar`. Three choices in it are
diff --git a/docs/spaces-agents.md b/docs/spaces-agents.md
index f0808c4c..54c27524 100644
--- a/docs/spaces-agents.md
+++ b/docs/spaces-agents.md
@@ -133,6 +133,7 @@ unique ids the first time.
| `embed` | `page`, `anchor`, `html` | a live view of another page, or one section of it — see **Embeds** |
| `link` | `url`, `title`, `desc`, `site`, `icon`, `image`, `html` | a card linking OUT of the space — see **Link cards** |
| `prop` | `key`, `value`, `html` | one field value — see **The issue tracker** |
+| `view` | `layout`, `groupBy`, `source`, `filter`, `sort`, `html` | a board, list, table, gallery, timeline or workload chart of this space's pages |
| `view` | `layout`, `span`, `groupBy`, `html` | a board, list, table, gallery or calendar of this space's pages |
| `view` | `layout`, `groupBy`, `sort`, `source`, `filter`, `html` | a board or list of this space's issues |
@@ -417,6 +418,7 @@ document-level** — `doc.fields`, absent means the built-in seven.
{ "key": "assignee", "label": "Assignee", "vt": "person" },
{ "key": "estimate", "label": "Estimate", "vt": "number" },
{ "key": "labels", "label": "Labels", "vt": "labels" },
+ { "key": "start", "label": "Start", "vt": "date" },
{ "key": "due", "label": "Due", "vt": "date" },
{ "key": "project", "label": "Project", "vt": "text" }
],
@@ -452,6 +454,25 @@ list**: `{ "type": "view", "layout": "board", "groupBy": "status",
"html": "Issues by status" }`. Put it on a page of its own — a page carrying a
view is laid out wide.
+`layout` is one of `board` (the default, and the ABSENT key — never write
+`"board"`), `list`, `table`, `gallery`, `gantt` and `workload`. **A chart is a
+layout here, not a block type**, so every shape reads the same four keys and a
+build that predates a shape draws a board of the same pages rather than a
+fallback line of text.
+
+- **`gantt`** draws one bar per page, from its `start` date to its `due` date,
+ with today marked and overdue work outlined. A page with only ONE of the two
+ dates gets a **milestone diamond** at the date it has — which is what every
+ issue written before `start` existed looks like, so do not add a made-up
+ `start` to "fix" one. A page with neither is left out and counted.
+- **`workload`** adds up the first `vt:"number"` field in the schema per bucket
+ and draws a bar chart. The bucket is `groupBy`; absent, it is the first
+ `vt:"person"` field. A negative or non-numeric estimate is excluded and
+ reported rather than summed — do not write one expecting it to subtract.
+
+Both honour `source` and `filter`, so "the workload for this project" is
+`{ "layout": "workload", "source": { "under": "<page id>" }, "filter": { "open": true } }`
+and needs no key of its own.
`layout` is one of `list`, `table`, `gallery`, `calendar` — **or absent, which
means a board.** Never write `"layout": "board"`: absence is what every view
written before layouts existed carries, and a stored `"board"` is a byte
diff --git a/scripts/test-spaces-gantt.ts b/scripts/test-spaces-gantt.ts
new file mode 100644
index 00000000..5600b8fb
--- /dev/null
+++ b/scripts/test-spaces-gantt.ts
@@ -0,0 +1,467 @@
+#!/usr/bin/env node
+// SPDX-License-Identifier: MIT
+// Copyright (c) 2026 The Bento authors
+// The timeline and the workload chart — the arithmetic, not the markup.
+//
+// node scripts/test-spaces-gantt.ts
+// TZ=Pacific/Kiritimati node scripts/test-spaces-gantt.ts
+// TZ=Pacific/Niue node scripts/test-spaces-gantt.ts
+//
+// WHY THESE ASSERTIONS ARE ABOUT NUMBERS. A chart is a picture of data that
+// came out of a file somebody mailed you, and every way it can be wrong is a
+// way it stays SILENT about being wrong: a bar in the wrong month still looks
+// like a bar, a bucket that lost a negative estimate still looks like a bucket,
+// and a view that quietly drew 300 of 10,000 rows looks exactly like one that
+// drew all of them. A source grep sails straight past every one of those. So
+// each check below builds a document, runs the model, and asserts on the
+// GEOMETRY or the TOTAL it produced.
+//
+// WHY THE TIMEZONE MATRIX. `new Date('2026-01-01')` is UTC midnight by spec and
+// therefore the previous day for every reader west of Greenwich; `+ 86400000`
+// is not a day on the two DST boundaries each year. Kiritimati is UTC+14 and
+// Niue is UTC−11 — the two ends of the inhabited range, and between them they
+// catch a date bug in either direction. test-spaces-journal.ts exists for the
+// same reason and CI runs it the same way.
+
+import {
+ dayNumber, isoFromDay, asDate, ganttFields, ganttModel, GANTT_MAX_BARS,
+} from '../spaces/src/gantt.ts'
+import {
+ workloadModel, workloadOption, quantity, sumField, bucketField, WORKLOAD_MAX_BARS,
+} from '../spaces/src/workload.ts'
+import { DEFAULT_FIELDS, viewRows, passesFilter, layoutOf, nextLayout, VIEW_LAYOUTS } from '../spaces/src/fields.ts'
+import type { IssueRow } from '../spaces/src/fields.ts'
+import type { SpacesDoc, Page } from '../spaces/src/model.ts'
+
+let failures = 0
+let checks = 0
+function ok(cond: boolean, msg: string) {
+ checks++
+ if (!cond) { failures++; console.log(` FAIL ${msg}`) }
+ else console.log(` ok ${msg}`)
+}
+
+const TZ = process.env.TZ ?? Intl.DateTimeFormat().resolvedOptions().timeZone
+console.log(`bento/spaces timeline + workload (TZ=${TZ})\n`)
+
+// A document with the default schema and no pages: everything below supplies
+// its own rows, because `viewRows` is already covered by the model rig and what
+// is under test here is what happens to the rows AFTER it.
+const doc = (fields = DEFAULT_FIELDS): SpacesDoc =>
+ ({ pages: [], fields } as unknown as SpacesDoc)
+
+let seq = 0
+const row = (values: Record<string, unknown>, title = `p${++seq}`): IssueRow => ({
+ page: { id: `id-${title}`, title, blocks: [] } as unknown as Page,
+ values: new Map(Object.entries(values)),
+})
+
+// ---- day numbers are arithmetic, in every timezone -------------------------
+{
+ ok(dayNumber('1970-01-01') === 0, 'the epoch is day zero')
+ ok(dayNumber('1970-01-02') - dayNumber('1970-01-01') === 1, 'consecutive days differ by one')
+ ok(dayNumber('2026-03-01') - dayNumber('2026-02-28') === 1, '2026 is not a leap year')
+ ok(dayNumber('2024-03-01') - dayNumber('2024-02-28') === 2, '2024 is')
+ ok(dayNumber('2000-03-01') - dayNumber('2000-02-28') === 2, 'and so is 2000, the century that is')
+ ok(dayNumber('1900-03-01') - dayNumber('1900-02-28') === 1, '…while 1900 is not, which is the rule a naive %4 gets wrong')
+
+ // THE CONTROL. This is what the obvious implementation would have produced,
+ // and in a UTC+14 or UTC−11 process it is off by a day. The assertion above
+ // does not construct a Date at all, so it cannot be.
+ const naive = Math.round((new Date('2026-03-01').getTime() - new Date('1970-01-01').getTime()) / 86400000)
+ console.log(` (Date-based day number for 2026-03-01: ${naive}; arithmetic: ${dayNumber('2026-03-01')})`)
+ ok(dayNumber('2026-03-01') === 20513, 'the arithmetic answer is the same number under every TZ')
+
+ // DST: America/Los_Angeles springs forward on 2026-03-08 and back on
+ // 2026-11-01. Those are the two days `+86_400_000` is not one day.
+ ok(dayNumber('2026-03-09') - dayNumber('2026-03-08') === 1, 'a 23-hour day is still one day')
+ ok(dayNumber('2026-11-02') - dayNumber('2026-11-01') === 1, 'and so is a 25-hour one')
+
+ for (const iso of ['1970-01-01', '2026-01-31', '2024-02-29', '1900-03-01', '2026-12-31']) {
+ ok(isoFromDay(dayNumber(iso)) === iso, `${iso} round-trips through day number and back`)
+ }
+}
+
+// ---- a value is a date, or it is absent ------------------------------------
+{
+ ok(asDate('2026-08-06') === '2026-08-06', 'a real ISO day is a date')
+ ok(asDate('2026-13-99') === undefined, 'a digit-shaped non-day is NOT a date — it would roll over into another month')
+ ok(asDate('2026-02-30') === undefined, '…nor is 30 February')
+ ok(asDate('soon') === undefined && asDate('') === undefined, 'prose is not a date')
+ ok(asDate(20260806) === undefined, 'a number is not a date')
+ ok(asDate({ y: 2026 }) === undefined && asDate(['2026-08-06']) === undefined,
+ 'an object out of a mailed file is not a date and does not throw')
+}
+
+// ---- the two date fields come from the schema ------------------------------
+{
+ const f = ganttFields(doc())
+ ok(f.start?.key === 'start' && f.end?.key === 'due', 'the defaults give start and due')
+
+ const own = doc([
+ { key: 'status', label: 'S', vt: 'select', options: [{ id: 'a', label: 'A', group: 'started' }] },
+ { key: 'kickoff', label: 'Kickoff', vt: 'date' },
+ { key: 'ship', label: 'Ship', vt: 'date' },
+ ] as never)
+ const g = ganttFields(own)
+ ok(g.start?.key === 'kickoff' && g.end?.key === 'ship',
+ 'a document that names its own date fields gets its own, in declared order')
+
+ const oneDate = doc([{ key: 'when', label: 'When', vt: 'date' }] as never)
+ const o = ganttFields(oneDate)
+ ok(o.end?.key === 'when' && o.start === undefined,
+ 'one date field is a milestone chart, not a broken Gantt')
+
+ ok(Object.keys(ganttFields(doc([{ key: 'name', label: 'N', vt: 'text' }] as never))).length === 0,
+ 'no date field at all is reported, not guessed at')
+ ok(ganttModel(doc([{ key: 'name', label: 'N', vt: 'text' }] as never), [row({})], '2026-08-06').noDateField,
+ '…and the model says so rather than drawing an empty grid')
+}
+
+// ---- a bar spans start..due, inclusive -------------------------------------
+{
+ const m = ganttModel(doc(), [
+ row({ start: '2026-01-01', due: '2026-01-10' }, 'ten'),
+ row({ start: '2026-01-01', due: '2026-01-01' }, 'one'),
+ ], '2026-01-05')
+ ok(m.days === 10, 'the span is ten days inclusive')
+ const ten = m.bars.find((b) => b.title === 'ten')!
+ const one = m.bars.find((b) => b.title === 'one')!
+ ok(ten.x === 0 && Math.abs(ten.w - 1) < 1e-9, 'the ten-day bar fills the chart')
+ ok(one.x === 0 && Math.abs(one.w - 0.1) < 1e-9,
+ `a ONE-day task is one day wide, not zero (w=${one.w})`)
+ ok(!one.milestone && !ten.milestone, 'both have two dates, so neither is a milestone')
+ ok(m.from === '2026-01-01' && m.to === '2026-01-10', 'the span is the union of the bars')
+}
+
+// ---- ABSENT START IS A MILESTONE, NOT A ZERO-WIDTH BAR ---------------------
+// The additivity rule, made visible: `start` did not exist before this build,
+// so every issue in every file already written is exactly this case.
+{
+ const m = ganttModel(doc(), [
+ row({ due: '2026-01-10' }, 'legacy'),
+ row({ start: '2026-01-01', due: '2026-01-10' }, 'dated'),
+ ], '2026-01-05')
+ const legacy = m.bars.find((b) => b.title === 'legacy')!
+ ok(legacy.milestone === true, 'an issue with only a due date is a MILESTONE')
+ ok(legacy.w === 0, '…with no width, because a date has no duration')
+ ok(legacy.x > 0.9 && legacy.x < 1,
+ `…positioned at its due date, at the centre of that day (x=${legacy.x})`)
+ ok(m.bars.every((b) => b.x >= 0 && b.x <= 1 && b.w >= 0 && b.x + b.w <= 1 + 1e-9),
+ 'nothing is drawn outside the chart')
+
+ // symmetric: a start with no due is a thing that began and has no deadline
+ const s = ganttModel(doc(), [row({ start: '2026-02-02' }, 'open-ended')], '2026-02-02')
+ ok(s.bars[0].milestone && s.bars[0].from === '2026-02-02',
+ 'a start with no due is a milestone too, at the start')
+}
+
+// ---- due BEFORE start: drawn, flagged, never swapped silently --------------
+{
+ const m = ganttModel(doc(), [row({ start: '2026-03-20', due: '2026-03-10' }, 'backwards')], '2026-03-15')
+ const b = m.bars[0]
+ ok(b.invalid === true, 'a due date before the start is FLAGGED')
+ ok(b.w > 0, `…and still drawn with a positive width (w=${b.w}), never a negative rectangle`)
+ ok(b.from === '2026-03-10' && b.to === '2026-03-20',
+ 'the bar spans the two dates that are actually in the file, earliest to latest')
+ ok(m.days === 11, 'and the span is real, not negative')
+}
+
+// ---- a malformed date is an ABSENT date ------------------------------------
+{
+ const m = ganttModel(doc(), [
+ row({ start: '2026-13-99', due: '2026-04-10' }, 'junk-start'),
+ row({ start: 'next tuesday', due: 'whenever' }, 'all-junk'),
+ ], '2026-04-05')
+ ok(m.bars.length === 1 && m.bars[0].title === 'junk-start',
+ 'a page whose dates are both nonsense is not drawn')
+ ok(m.bars[0].milestone === true,
+ 'a nonsense start is treated as absent — a milestone, not a bar from year 2026 month 13')
+ ok(m.undated === 1, 'and the page that was left out is COUNTED, not swallowed')
+}
+
+// ---- today is marked, and only when it is really there ---------------------
+{
+ const inside = ganttModel(doc(), [row({ start: '2026-01-01', due: '2026-01-31' })], '2026-01-16')
+ ok(inside.todayX !== null && inside.todayX! > 0.4 && inside.todayX! < 0.6,
+ `today in the middle of the span is marked in the middle (x=${inside.todayX})`)
+
+ const after = ganttModel(doc(), [row({ start: '2019-01-01', due: '2019-01-31' })], '2026-01-16')
+ ok(after.todayX === null,
+ 'today outside the span is NOT clamped to the edge — a line at the edge would read as "the project ends today"')
+ ok(after.days === 31, '…and the span is not stretched seven years to reach it')
+
+ const edge = ganttModel(doc(), [row({ start: '2026-01-01', due: '2026-01-31' })], '2026-01-31')
+ ok(edge.todayX !== null, 'the last day of the span IS in the span')
+}
+
+// ---- overdue is about the end AND the phase --------------------------------
+{
+ const m = ganttModel(doc(), [
+ row({ status: 'doing', start: '2026-01-01', due: '2026-01-10' }, 'late'),
+ row({ status: 'done', start: '2026-01-01', due: '2026-01-10' }, 'shipped'),
+ row({ status: 'cancelled', start: '2026-01-01', due: '2026-01-10' }, 'dropped'),
+ row({ status: 'from-a-newer-build', start: '2026-01-01', due: '2026-01-10' }, 'unknown'),
+ row({ status: 'doing', start: '2026-01-01', due: '2026-12-31' }, 'ongoing'),
+ ], '2026-06-01')
+ const by = (t2: string) => m.bars.find((b) => b.title === t2)!
+ ok(by('late').overdue === true, 'an open issue past its due date is overdue')
+ ok(by('shipped').overdue === false, 'a DONE issue past its due date is not overdue, it is done')
+ ok(by('dropped').overdue === false, '…nor is a cancelled one')
+ ok(by('unknown').overdue === true,
+ 'a status this build cannot read counts as OPEN — hiding work because the status is newer is the silent loss')
+ ok(by('ongoing').overdue === false, 'a due date in the future is not overdue')
+}
+
+// ---- ten thousand pages: no throw, a capped chart, an honest count ----------
+{
+ const many: IssueRow[] = []
+ for (let i = 0; i < 10_000; i++) {
+ many.push(row({ start: `2026-01-${String((i % 28) + 1).padStart(2, '0')}`, due: '2026-12-31' }, `t${i}`))
+ }
+ const t0 = Date.now()
+ const m = ganttModel(doc(), many, '2026-06-01')
+ const ms = Date.now() - t0
+ ok(m.bars.length === GANTT_MAX_BARS, `10,000 rows draw ${GANTT_MAX_BARS} bars, not 10,000`)
+ ok(m.dropped === 10_000 - GANTT_MAX_BARS,
+ `…and the ${m.dropped} that were cut are COUNTED — a chart that is silently a subset is the misleading picture`)
+ ok(ms < 2000, `and it is not slow (${ms}ms)`)
+ ok(m.bars.every((b) => Number.isFinite(b.x) && Number.isFinite(b.w)),
+ 'every coordinate is a finite number')
+}
+
+// ---- a span cannot divide by zero ------------------------------------------
+{
+ const m = ganttModel(doc(), [row({ due: '2026-05-05' })], '2026-05-05')
+ ok(m.days === 1, 'a single-day span is one day, never zero')
+ ok(Number.isFinite(m.bars[0].x) && Number.isFinite(m.todayX ?? 0), 'so nothing is Infinity or NaN')
+}
+
+// ---- gridlines: a handful, in the reader's language, never hand-written ----
+{
+ const short = ganttModel(doc(), [row({ start: '2026-01-01', due: '2026-01-20' })], '2026-01-10')
+ ok(short.ticks.length >= 2 && short.ticks.length <= 6, `a three-week span gets ${short.ticks.length} ticks`)
+
+ const year = ganttModel(doc(), [row({ start: '2026-01-01', due: '2026-12-31' })], '2026-06-01')
+ ok(year.ticks.length === 12, `a calendar year gets one tick per month (${year.ticks.length})`)
+ ok(year.ticks[0].iso === '2026-01-01', 'the first is the first of January')
+
+ // Nine thousand years: nothing in the format forbids it, and one gridline per
+ // year would be nine thousand <line> elements.
+ const epic = ganttModel(doc(), [row({ start: '0001-01-01', due: '9999-12-31' })], '2026-06-01')
+ ok(epic.ticks.length <= 13, `a ten-thousand-year span still gets a readable axis (${epic.ticks.length} ticks)`)
+ ok(epic.ticks.every((tk) => tk.x >= 0 && tk.x <= 1), 'and every tick is inside the chart')
+
+ // The labels come from Intl. Under a C/POSIX-ish locale Intl still answers in
+ // English; what is asserted is that a label EXISTS and is not the raw ISO
+ // string, which is what the fallback would give.
+ ok(year.ticks.every((tk) => tk.label && tk.label !== tk.iso),
+ 'every tick is labelled by Intl, not by a hand-written month map')
+}
+
+// ---- WORKLOAD: what a number is, and what it is not ------------------------
+{
+ ok('n' in quantity(3) && (quantity(3) as { n: number }).n === 3, '3 is three')
+ ok('n' in quantity('4') && (quantity('4') as { n: number }).n === 4, '"4" is four')
+ ok('n' in quantity(0), 'zero is a number, not an absence')
+ ok('unset' in quantity(undefined) && 'unset' in quantity('') && 'unset' in quantity(null),
+ 'an unestimated issue is UNSET, which is ordinary')
+ ok('bad' in quantity(-3), 'a NEGATIVE estimate is not summed — it would make somebody lighter than the work they hold')
+ ok('bad' in quantity('about a week'), 'prose is not a quantity')
+ ok('bad' in quantity(Infinity) && 'bad' in quantity(NaN),
+ 'Infinity flattens every other bar and NaN poisons the whole sum — neither is summed')
+ ok('bad' in quantity([7]), 'an array coerces to 7 and is still not a quantity')
+}
+
+{
+ const uLabel = 'Unassigned'
+ const other = (n: number) => `Other (${n})`
+ const m = workloadModel(doc(), [
+ row({ assignee: 'Ada', estimate: 3 }),
+ row({ assignee: 'Ada', estimate: 5 }),
+ row({ assignee: 'Bo', estimate: 2 }),
+ row({ assignee: 'Bo' }),
+ row({ estimate: 4 }),
+ ], undefined, uLabel, other)
+ ok(m.sum?.key === 'estimate', 'the field being summed is derived from the schema')
+ ok(m.by?.key === 'assignee', 'and the bucket field is the person field')
+ const ada = m.bars.find((b) => b.label === 'Ada')!
+ ok(ada.total === 8, `Ada holds 8 (${ada.total})`)
+ ok(m.bars[0].label === 'Ada', 'the biggest bar is first')
+
+ // TIES ARE BROKEN BY THE LABEL, and this needs its own check: without the
+ // tie-break the bars come out in Map insertion order, which is PAGE order —
+ // so two people holding the same amount would swap places whenever an
+ // unrelated page moved, and a chart that had not changed would look as though
+ // it had. A sabotage of the tie-break passed every other assertion here.
+ const tied = (order: string[]) => workloadModel(doc(),
+ order.map((who) => row({ assignee: who, estimate: 4 })),
+ undefined, uLabel, other).bars.map((b) => b.label).join(',')
+ ok(tied(['Zoe', 'Ada', 'Mo']) === 'Ada,Mo,Zoe', `equal totals sort by label (${tied(['Zoe', 'Ada', 'Mo'])})`)
+ ok(tied(['Mo', 'Zoe', 'Ada']) === tied(['Zoe', 'Ada', 'Mo']),
+ 'and the same three in a different page order give the SAME chart')
+ const bo = m.bars.find((b) => b.label === 'Bo')!
+ ok(bo.total === 2 && bo.count === 2 && bo.blank === 1,
+ 'an unestimated issue counts toward the person and adds nothing to the bar')
+ ok(m.bars.find((b) => b.label === uLabel)?.total === 4,
+ 'work nobody is holding is its own bar, not a hole')
+ ok(m.total === 14 && m.bars.reduce((s, b) => s + b.total, 0) === 14,
+ 'the bars add up to the document')
+}
+
+// ---- a negative estimate is excluded AND reported --------------------------
+{
+ const m = workloadModel(doc(), [
+ row({ assignee: 'Ada', estimate: 5 }),
+ row({ assignee: 'Ada', estimate: -3 }),
+ ], undefined, 'Unassigned', (n) => `Other (${n})`)
+ ok(m.bars[0].total === 5, `a −3 does not reduce the bar to 2 (${m.bars[0].total})`)
+ ok(m.ignored === 1, '…and it is COUNTED, so the view can say the number is short')
+ ok(Number.isFinite(m.total), 'the total is a real number')
+}
+
+{
+ const m = workloadModel(doc(), [
+ row({ assignee: 'Ada', estimate: 5 }),
+ row({ assignee: 'Ada', estimate: NaN }),
+ row({ assignee: 'Bo', estimate: Infinity }),
+ ], undefined, 'Unassigned', (n) => `Other (${n})`)
+ ok(m.bars.every((b) => Number.isFinite(b.total)), 'no bar is NaN or Infinity')
+ ok(m.bars.find((b) => b.label === 'Bo')!.total === 0, 'an Infinity bar is zero, not the whole chart')
+ ok(m.ignored === 2, 'both were reported')
+}
+
+// ---- the tail is folded, never dropped -------------------------------------
+{
+ const rows: IssueRow[] = []
+ for (let i = 0; i < 100; i++) rows.push(row({ assignee: `person-${i}`, estimate: 1 }))
+ const m = workloadModel(doc(), rows, undefined, 'Unassigned', (n) => `Other (${n})`)
+ ok(m.bars.length === WORKLOAD_MAX_BARS, `100 people give ${WORKLOAD_MAX_BARS} bars`)
+ ok(m.folded === 100 - (WORKLOAD_MAX_BARS - 1), `${m.folded} of them are folded into one`)
+ ok(m.bars[m.bars.length - 1].other === true, 'the last bar is the fold, and says so')
+ ok(m.bars.reduce((s, b) => s + b.total, 0) === 100,
+ 'THE BARS STILL ADD UP TO 100 — a chart whose visible bars do not sum to the total it claims is the failure')
+ ok(m.total === 100, 'and the model agrees')
+}
+
+// ---- a prototype key out of a mailed file cannot poison the tally ----------
+{
+ const m = workloadModel(doc(), [
+ row({ assignee: '__proto__', estimate: 2 }),
+ row({ assignee: 'constructor', estimate: 3 }),
+ row({ assignee: 'toString', estimate: 4 }),
+ ], undefined, 'Unassigned', (n) => `Other (${n})`)
+ ok(m.bars.length === 3, 'three buckets, one per name — no prototype key is swallowed or duplicated')
+ ok(m.bars.every((b) => Number.isFinite(b.total)) && m.total === 9,
+ `and the tally is exact (${m.total})`)
+ ok(m.bars.find((b) => b.label === 'toString')?.total === 4,
+ 'a bucket called "toString" holds a number, not a native function')
+}
+
+// ---- ten thousand pages, again ---------------------------------------------
+{
+ const rows: IssueRow[] = []
+ for (let i = 0; i < 10_000; i++) rows.push(row({ assignee: `p${i % 7}`, estimate: 2 }))
+ const t0 = Date.now()
+ const m = workloadModel(doc(), rows, undefined, 'Unassigned', (n) => `Other (${n})`)
+ const ms = Date.now() - t0
+ ok(m.bars.length === 7 && m.total === 20_000, `10,000 rows collapse to 7 bars totalling ${m.total}`)
+ ok(ms < 2000, `and it is not slow (${ms}ms)`)
+}
+
+// ---- a space with no number field says so ----------------------------------
+{
+ const recipes = doc([
+ { key: 'cuisine', label: 'Cuisine', vt: 'text' },
+ { key: 'cook', label: 'Cook', vt: 'person' },
+ ] as never)
+ ok(sumField(recipes) === undefined, 'a space of recipes has nothing to add up')
+ const m = workloadModel(recipes, [row({ cook: 'Ada' })], undefined, 'Unassigned', (n) => `Other (${n})`)
+ ok(!m.sum && m.bars.length === 0, '…and the model reports it rather than drawing an empty grid')
+ ok(bucketField(recipes)?.key === 'cook', 'but the bucket field is still found')
+}
+
+// ---- bucketing by something other than a person ----------------------------
+{
+ const m = workloadModel(doc(), [
+ row({ status: 'doing', estimate: 3 }),
+ row({ status: 'doing', estimate: 2 }),
+ row({ status: 'done', estimate: 8 }),
+ ], 'status', 'Unassigned', (n) => `Other (${n})`)
+ ok(m.by?.key === 'status', 'a stored groupBy is honoured, in every layout')
+ ok(m.bars.find((b) => b.label === 'In progress')?.total === 5,
+ 'a select bucket is labelled by its OPTION, not by the id the model stores')
+ ok(m.bars.find((b) => b.label === 'In progress')?.color === '#F7A600',
+ '…and carries the option colour')
+}
+
+// ---- the chart option is plain JSON ----------------------------------------
+{
+ const m = workloadModel(doc(), [row({ assignee: 'Ada', estimate: 3 })], undefined, 'Unassigned', (n) => `Other (${n})`)
+ const opt = workloadOption(m, '#5B8DEF')
+ ok(JSON.parse(JSON.stringify(opt)) !== null, 'the option survives a JSON round trip')
+ ok(JSON.stringify(opt).indexOf('function') < 0, 'and holds no functions — charts-lite takes template strings, never callbacks')
+ const series = (opt as { series: Array<{ data: unknown[] }> }).series[0]
+ ok(series.data.every((v) => typeof v === 'number'),
+ 'bar data is PLAIN NUMBERS — charts-lite coerces an item object to 0 for a bar series')
+ const cats = (opt as { xAxis: { data: string[] } }).xAxis.data
+ ok(cats.length === series.data.length, 'one category per value')
+
+ const long = workloadModel(doc(), [row({ assignee: 'A very long name indeed', estimate: 1 })],
+ undefined, 'Unassigned', (n) => `Other (${n})`)
+ ok(long.bars[0].label === 'A very long name indeed' && long.bars[0].short.length <= 14,
+ 'the axis label is cut and the full name is kept beside it')
+}
+
+// ---- the layout cycle still holds ------------------------------------------
+{
+ ok(layoutOf('gantt') === 'gantt' && layoutOf('workload') === 'workload',
+ 'the two new shapes resolve to themselves')
+ ok(layoutOf('mosaic') === 'board' && layoutOf('toString') === 'board',
+ 'AN OLDER BUILD MEETING layout:"gantt" DRAWS A BOARD — this is the additivity claim, and it is what layoutOf already did')
+ let at: string = 'board'
+ for (let i = 0; i < VIEW_LAYOUTS.length; i++) at = nextLayout(at)
+ ok(at === 'board', `${VIEW_LAYOUTS.length} steps come back to the board`)
+ ok(new Set(VIEW_LAYOUTS.map((l) => nextLayout(l))).size === VIEW_LAYOUTS.length,
+ 'and no two shapes lead to the same place')
+}
+
+// ---- the view's own source and filter reach the chart ----------------------
+// "Workload for this project" has to be expressible, and it is expressible
+// because the chart takes the rows the view already derived — no second
+// selector language, which is the whole argument for these being layouts.
+{
+ const pages: Page[] = [
+ { id: 'proj', title: 'Project', blocks: [] },
+ { id: 'a', title: 'A', parent: 'proj', blocks: [
+ { id: 'a1', type: 'prop', key: 'status', value: 'doing' },
+ { id: 'a2', type: 'prop', key: 'assignee', value: 'Ada' },
+ { id: 'a3', type: 'prop', key: 'estimate', value: 5 },
+ ] },
+ { id: 'b', title: 'B', parent: 'proj', blocks: [
+ { id: 'b1', type: 'prop', key: 'status', value: 'done' },
+ { id: 'b2', type: 'prop', key: 'assignee', value: 'Ada' },
+ { id: 'b3', type: 'prop', key: 'estimate', value: 100 },
+ ] },
+ { id: 'c', title: 'C', blocks: [
+ { id: 'c1', type: 'prop', key: 'status', value: 'doing' },
+ { id: 'c2', type: 'prop', key: 'assignee', value: 'Ada' },
+ { id: 'c3', type: 'prop', key: 'estimate', value: 7 },
+ ] },
+ ] as unknown as Page[]
+ const d = { pages, fields: DEFAULT_FIELDS } as unknown as SpacesDoc
+
+ const all = workloadModel(d, viewRows(d), undefined, 'Unassigned', (n) => `Other (${n})`)
+ ok(all.total === 112, `unscoped, Ada holds everything (${all.total})`)
+
+ const scoped = viewRows(d, { under: 'proj' })
+ const proj = workloadModel(d, scoped, undefined, 'Unassigned', (n) => `Other (${n})`)
+ ok(proj.total === 105, `"workload for this project" is the view's own source (${proj.total})`)
+
+ const open = workloadModel(d, scoped.filter((r) => passesFilter(d, r.values, { open: true })),
+ undefined, 'Unassigned', (n) => `Other (${n})`)
+ ok(open.total === 5, `…and "open only" narrows it further (${open.total}) with no new key anywhere`)
+}
+
+console.log(`\n${checks - failures}/${checks} checks passed`)
+if (failures) process.exit(1)
diff --git a/scripts/test-spaces-model.ts b/scripts/test-spaces-model.ts
index 79d0e1ea..2c503a46 100644
--- a/scripts/test-spaces-model.ts
+++ b/scripts/test-spaces-model.ts
@@ -647,6 +647,10 @@ for (const [label, input, err] of [
// precedent below, because `undefined` appears hundreds of times in editor.ts.
ok(nextLayout(VIEW_LAYOUTS[VIEW_LAYOUTS.length - 1]) === 'board',
'the shape after the last one is the board again')
+ // SEVEN, the maintainer's ceiling for the ring: calendar shipped first, the
+ // two charts follow it, and an eighth shape turns this control into a picker
+ ok(VIEW_LAYOUTS.join() === 'board,list,table,gallery,calendar,gantt,workload',
+ 'the ring is the seven allowed shapes, calendar then the two charts')
const toggleFn = ed.slice(ed.indexOf('private toggleViewLayout'),
ed.indexOf('private openViewGroup'))
ok(toggleFn.length > 0 && /'layout',\s*to === 'board' \? undefined :/.test(toggleFn),
diff --git a/scripts/test-spaces.mjs b/scripts/test-spaces.mjs
index 3fc21f8c..7f81ae2d 100755
--- a/scripts/test-spaces.mjs
+++ b/scripts/test-spaces.mjs
@@ -57,6 +57,10 @@ const RIGS = [
{ name: 'agent', file: 'scripts/test-spaces-agent.ts' },
{ name: 'journal', file: 'scripts/test-spaces-journal.ts', tzs: TZS_JOURNAL },
{ name: 'calc', file: 'scripts/test-spaces-calc.ts', tzs: TZS_CALC },
+ // Same reason as journal and calc: every number this rig asserts is a date
+ // or a sum derived from one, and a date bug that only shows east of UTC is
+ // exactly what a one-timezone run cannot see.
+ { name: 'gantt', file: 'scripts/test-spaces-gantt.ts', tzs: TZS_JOURNAL },
{ name: 'caret', file: 'scripts/test-spaces-caret.ts' },
{ name: 'undo', file: 'scripts/test-spaces-undo.ts', bundle: true },
{ name: 'invite', file: 'scripts/test-spaces-invite.ts', bundle: true },
diff --git a/spaces/CHANGELOG.md b/spaces/CHANGELOG.md
index b46ed8d7..355315b9 100644
--- a/spaces/CHANGELOG.md
+++ b/spaces/CHANGELOG.md
@@ -14,6 +14,43 @@ Versions follow `0.MINOR.PATCH` while pre-1.0.
## [Unreleased]
+- **A timeline and a workload chart, as view layouts.** The one layout control
+ cycles through two more shapes. `gantt` draws a bar per page from its start
+ date to its due date, with today marked and overdue work outlined; `workload`
+ adds up the estimates per assignee and draws a bar chart. Both read the view's
+ existing `source`, `filter`, `sort` and `groupBy`, so "the workload for this
+ project, open only" is expressible with no key of its own.
+
+ **They are layouts and not a new `chart` block**, and that choice is argued in
+ `spaces/src/gantt.ts` because every chart this app grows will inherit it. The
+ measurable half: a shell built from the previous release, shown a view block
+ with `layout:"gantt"`, renders a BOARD of the same pages, keeps the key
+ through a save, and keeps the new `start` values too — checked against a real
+ build, not asserted. A `chart` block would have fallen to the unknown-type
+ path and drawn one line of text where a schedule was.
+
+- **A `start` date field.** The tracker shipped with `Due` and nothing else,
+ which is enough for a deadline and not for a bar. It is optional and appears
+ when set, like `Due` and `Labels` — but it has a consequence worth stating:
+ every issue in every file already written has a due date and NO start, so
+ absent-start is the whole installed base rather than an edge case. Those draw
+ as a **milestone diamond** at the due date — a date with no duration, which is
+ what the file actually says — not as a zero-width bar.
+
+- **What the pictures refuse to do quietly.** A chart is a picture of numbers
+ out of a file somebody mailed you, so each wrong-data case is decided and
+ asserted rather than left to arithmetic: a due date before the start is drawn
+ between the two dates that are really there and FLAGGED, never silently
+ swapped; a malformed date is an absent date; a negative or non-numeric
+ estimate is excluded from the sum and counted, because a −3 absorbed into a
+ bar makes somebody look lighter than the work they hold; and a 10,000-page
+ view draws a capped, ordered chart that says how many it did not draw. Every
+ date is compared as an integer day number computed arithmetically, with no
+ `Date` involved, so the answer is the same in Kiritimati and in Niue.
+
+ Both charts print, and both survive into the file-manager thumbnail: colour
+ and geometry travel as presentation attributes inside the SVG rather than in
+ `styles.css`, which the still's own stylesheet is not.
- **`#tag` in the prose, and everything that follows from it.** Type `#recipe`
in a sentence and it renders as a clickable chip; the chip opens a tag sheet
listing every page carrying it. Tags reach ⌘K (a query starting with `#`
diff --git a/spaces/src/editor.ts b/spaces/src/editor.ts
index 4bb62f4b..1b779d2c 100644
--- a/spaces/src/editor.ts
+++ b/spaces/src/editor.ts
@@ -30,9 +30,10 @@ import { insertFamilies, insertSections, type InsertItem } from './inserts.ts'
import {
fieldByKey, fieldsOf, propHtml, propBlock, propBlockOf, isIssue, headerLength,
reorderPages, columnMoves, ISSUE_FIELDS, withField, freeFieldKey, fieldTypeLabel, FIELD_TYPES,
- cycleSort, nextLayout,
+ cycleSort, nextLayout, layoutOf,
type DropAim, type FieldSpec, type ViewFilter, type ViewSort,
} from './fields'
+import { bucketField } from './workload.ts'
import { nextSpan } from './calendar.ts'
import {
clausesOf, clauseSummary, isAny, opsFor, opLabel, numberOpLabel, windowLabel,
@@ -2022,8 +2023,8 @@ export class Editor {
private toggleViewLayout(blockId: string): void {
const b = this.store.block(blockId)
- // Board -> list -> table -> gallery -> board, from fields.ts — the ONE
- // place the cycle is written. It used to be written here and again in
+ // Board -> list -> table -> gallery -> calendar -> gantt -> workload ->
+ // board, from fields.ts — the ONE place the cycle is written. It used to be written here and again in
// render.ts, and when the prototype-lookup bug was found only this copy was
// hardened, so the button went on rendering
// `function toString() { [native code] }` as its label from the other one.
@@ -2054,22 +2055,36 @@ export class Editor {
/**
* Which field the columns come from.
*
- * Only fields with declared options are offered. A board's columns ARE the
- * option list — grouping by a free-text field would make one column per
- * distinct string, which is a pivot table wearing a board's clothes.
+ * Only fields with declared options are offered for a BOARD. A board's
+ * columns ARE the option list — grouping by a free-text field would make one
+ * column per distinct string, which is a pivot table wearing a board's
+ * clothes.
+ *
+ * A WORKLOAD CHART IS THAT PIVOT TABLE, DELIBERATELY, so it offers person and
+ * text fields too: "how much is each person holding" is exactly one bar per
+ * distinct string, and that is the whole shape. Same key, same writer, one
+ * extra line — which is what it costs when a chart is a layout rather than a
+ * second block type with a vocabulary of its own.
*/
private openViewGroup(blockId: string, anchor: HTMLElement): void {
const s = this.store
const b = s.block(blockId)
if (!b || s.readOnly || this.reading) return
- const now = String((b as { groupBy?: unknown }).groupBy ?? 'status')
- const groupable = fieldsOf(s.doc).filter((f) => f.options?.length)
+ const shape = layoutOf((b as { layout?: unknown }).layout)
+ const bars = shape === 'workload'
+ const now = String((b as { groupBy?: unknown }).groupBy
+ ?? (bars ? (bucketField(s.doc)?.key ?? '') : 'status'))
+ const groupable = fieldsOf(s.doc).filter((f) =>
+ f.options?.length || (bars && (f.vt === 'person' || f.vt === 'text')))
+ // The DEFAULT for this shape is what absence already means, so choosing it
+ // clears the key rather than writing it down — the rule filter, source and
+ // sort all follow, and what keeps a view that was fiddled with and put back
+ // byte-identical to one nobody touched.
+ const dflt = bars ? bucketField(s.doc)?.key : 'status'
this.menuAt(anchor, t('Group'), (m) => {
for (const f of groupable) {
row(m, { icon: ICONS.board, label: f.label, selected: f.key === now,
- // `status` is the default the renderer assumes, so choosing it clears
- // the key instead of writing what absence already means
- run: () => this.editView(blockId, 'groupBy', f.key === 'status' ? undefined : f.key) })
+ run: () => this.editView(blockId, 'groupBy', f.key === dflt ? undefined : f.key) })
}
if (!groupable.length) extra(m, el('div', 'sp-fgroup', t('No field here has options to group by')))
})
diff --git a/spaces/src/fields.ts b/spaces/src/fields.ts
index e23c9f3a..c3443561 100644
--- a/spaces/src/fields.ts
+++ b/spaces/src/fields.ts
@@ -124,6 +124,28 @@ export const DEFAULT_FIELDS: FieldSpec[] = [
{ key: 'assignee', label: 'Assignee', vt: 'person' },
{ key: 'estimate', label: 'Estimate', vt: 'number' },
{ key: 'labels', label: 'Labels', vt: 'labels' },
+ /**
+ * START and DUE, in that order, because a schedule has two ends.
+ *
+ * `start` is NEW — the tracker shipped with `due` and nothing else, which is
+ * enough for a deadline and not enough for a bar. Adding it is additive in
+ * the ordinary way (a page that has never carried one has no `prop` block for
+ * it, and absent still means unset), but it has one consequence worth naming
+ * out loud rather than discovering:
+ *
+ * EVERY ISSUE IN EVERY FILE ALREADY WRITTEN HAS A DUE DATE AND NO START.
+ *
+ * So "absent start" is not an edge case, it is the entire installed base, and
+ * a Gantt that drew it as a zero-width bar would render every existing
+ * tracker as a column of hairlines. It draws a MILESTONE DIAMOND at the due
+ * date instead — a date with no duration, which is what the file actually
+ * says. gantt.ts carries the rule at the site that implements it.
+ *
+ * Not in ISSUE_FIELDS: a new issue is seeded with status, priority, assignee
+ * and estimate, and dates appear when somebody sets one — the same as `due`
+ * has always behaved, and the same as `labels` and `project`.
+ */
+ { key: 'start', label: 'Start', vt: 'date' },
{ key: 'due', label: 'Due', vt: 'date' },
{ key: 'project', label: 'Project', vt: 'text' },
]
@@ -690,7 +712,22 @@ export function cycleSort(sort: unknown, key: string): ViewSort[] | undefined {
* and source already follow. `nextLayout` returns the word; the caller that
* WRITES is the one that turns 'board' back into a deletion.
*/
-export const VIEW_LAYOUTS = ['board', 'list', 'table', 'gallery', 'calendar'] as const
+/**
+ * `gantt` and `workload` join the cycle rather than becoming a second block
+ * type. The argument is in gantt.ts, at length, because every chart this app
+ * grows after them inherits it. The half that belongs HERE is the one this
+ * function already guarantees: `layoutOf` maps a word it does not know to
+ * `board`, so a build that predates these two meets `layout:"gantt"`, draws a
+ * board of the same pages, and writes the key back untouched.
+ *
+ * SEVEN IS THE CEILING FOR A CYCLE BUTTON. One control and one word beats a
+ * menu at three or four; this branch argued six was already the limit, and the
+ * maintainer ruled seven (calendar landed first, then these two). An EIGHTH
+ * shape converts this control into a picker rather than extending the ring.
+ * Written down here because the next person to add a layout will read this
+ * line and not the changelog.
+ */
+export const VIEW_LAYOUTS = ['board', 'list', 'table', 'gallery', 'calendar', 'gantt', 'workload'] as const
export type ViewLayout = (typeof VIEW_LAYOUTS)[number]
/**
@@ -708,7 +745,7 @@ export function layoutOf(raw: unknown): ViewLayout {
return (VIEW_LAYOUTS as readonly string[]).includes(s) ? (s as ViewLayout) : 'board'
}
-/** The next shape: board → list → table → gallery → calendar → board. */
+/** The next shape: board → list → table → gallery → calendar → gantt → workload → board. */
export function nextLayout(raw: unknown): ViewLayout {
const here = layoutOf(raw)
return VIEW_LAYOUTS[(VIEW_LAYOUTS.indexOf(here) + 1) % VIEW_LAYOUTS.length]
diff --git a/spaces/src/gantt.ts b/spaces/src/gantt.ts
new file mode 100644
index 00000000..a03b0a7d
--- /dev/null
+++ b/spaces/src/gantt.ts
@@ -0,0 +1,415 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) 2026 The Bento authors
+// A GANTT: one bar per page, from its start date to its due date.
+//
+// ── WHERE A CHART LIVES IN THIS APP, decided here because every chart that
+// comes after inherits it ──────────────────────────────────────────────
+//
+// There were two candidates: a new `chart` BLOCK, or another `view` LAYOUT.
+// Both of the shapes this file and workload.ts add are `view` layouts, and the
+// argument is not "views are close enough":
+//
+// 1. THE INPUT IS ALREADY SPELLED. Both shapes need exactly `source` (which
+// pages), `filter` (which of them), `sort` (in what order) and `groupBy`
+// (bucketed how). A `chart` block would have to grow four keys with those
+// same four meanings. The format is permanent, so that is not a duplicate
+// that can be tidied up later — it is two vocabularies for one question, in
+// every file ever saved, forever. fields.ts already refuses to grow a
+// second ordering mechanism beside `sort` for exactly this reason (see the
+// Page-column comment in render.ts).
+//
+// 2. AN OLDER BUILD DEGRADES WELL, and this is the half that is measurable.
+// `layoutOf()` maps a layout it does not know to 'board' — so a build that
+// predates this one meets `layout:'gantt'`, renders a BOARD of the same
+// pages, and round-trips the key untouched. That is shipped, tested
+// behaviour, not a hope. A `chart` block would fall to the unknown-type
+// path and render its `html` — one line of text where a schedule was.
+//
+// 3. THE COUNTER-ARGUMENT IS REAL AND IT LOSES ON SCOPE. A Gantt is honestly
+// a layout of pages (one page, one bar). A workload chart is honestly an
+// AGGREGATE — it has fewer bars than rows, and no bar is a page. If those
+// two wanted different homes the honest answer would be to say so. They do
+// not, because the aggregation is a property of the OUTPUT and every input
+// key means what it already meant: `groupBy` is "the field the buckets come
+// from", which is what it means on a board too. A board with summed columns
+// is what a workload chart is.
+//
+// What DOES want a `chart` block one day is a chart of data that is not
+// pages at all — a `table` block's numbers, say. That has no `source`, no
+// `filter` and no rows, so it shares nothing with a view but the engine.
+// When it arrives it should be its own block type. This decision is about
+// AGGREGATES OVER PAGES, and it does not reach further than that.
+//
+// ── WHAT IS DELIBERATELY NOT HERE ────────────────────────────────────────
+//
+// DEPENDENCIES AND CRITICAL PATH. Both need a typed page REFERENCE, and this
+// app has exactly one way to point at a page today (`#p/<id>` in prose) which
+// is not a field value. Inventing a second one here would be permanent and
+// would collide with the relation field being designed elsewhere. So: not
+// built, and no field invented.
+//
+// What is left FOR them, at no format cost: `GanttModel.bars` is a flat list
+// keyed by `pageId`, each carrying its own resolved `x`/`w` on a shared 0..1
+// axis. An arrow between two bars is a lookup of two ids in that list and two
+// numbers; a critical path is a walk over the same list. Neither needs this
+// module to change shape, and neither needs a key on the `view` block — the
+// edges will live on the PAGES, wherever the relation type puts them.
+//
+// ── DATES ────────────────────────────────────────────────────────────────
+//
+// Every date here is an ISO `YYYY-MM-DD` string and every comparison is on
+// INTEGER DAY NUMBERS computed arithmetically (`dayNumber`, days-from-civil).
+// No `Date` is constructed for arithmetic anywhere in this file. That is not
+// caution for its own sake — `new Date('2026-01-01')` is UTC midnight by spec
+// and therefore the PREVIOUS DAY for every reader west of Greenwich, and
+// `+ 86_400_000` is not a day on the two DST boundaries each year. journal.ts
+// carries the same discipline and its rig runs under five timezones.
+//
+// A `Date` IS built for one thing — asking Intl for a month name — and it is
+// built component-wise (`new Date(y, m - 1, d)`), which is local noon-ish and
+// cannot roll over.
+
+import type { SpacesDoc } from './model.ts'
+import {
+ fieldsOf, optionOf, fieldByKey, phaseField, isOpenPhase,
+ type FieldSpec, type IssueRow,
+} from './fields.ts'
+import { isISO } from './journal.ts'
+
+/**
+ * How many bars a Gantt will draw.
+ *
+ * A view is a query over a whole space, and a space is a file somebody mailed
+ * you: 10,000 pages is not a hypothetical, it is what an imported wiki looks
+ * like. 10,000 `<rect>`s is a locked tab, and a 10,000-row image is not a
+ * schedule anybody can read either — so the cap is a READABILITY limit that
+ * happens to also be a safety one.
+ *
+ * The rows are cut AFTER the view's own sort, so which 300 you get is the
+ * author's stated order and is stable across reloads and machines. The count
+ * that was dropped is reported rather than swallowed: a chart that is silently
+ * a subset is the misleading picture this whole file is trying not to draw.
+ */
+export const GANTT_MAX_BARS = 300
+
+/**
+ * Days from 1970-01-01, arithmetically. Howard Hinnant's days-from-civil.
+ *
+ * No `Date`, so no timezone, no DST and no UTC-midnight trap can reach it: this
+ * is integer arithmetic over the proleptic Gregorian calendar and gives the
+ * same answer in Kiritimati and in Niue. `dayNumber('1970-01-01') === 0`.
+ */
+export function dayNumber(iso: string): number {
+ const [y0, m, d] = iso.split('-').map(Number)
+ const y = m <= 2 ? y0 - 1 : y0
+ const era = Math.floor(y / 400)
+ const yoe = y - era * 400
+ const doy = Math.floor((153 * (m + (m > 2 ? -3 : 9)) + 2) / 5) + d - 1
+ const doe = yoe * 365 + Math.floor(yoe / 4) - Math.floor(yoe / 100) + doy
+ return era * 146097 + doe - 719468
+}
+
+/** The inverse of `dayNumber` — civil-from-days, same source, same arithmetic. */
+export function isoFromDay(n: number): string {
+ const z = Math.trunc(n) + 719468
+ const era = Math.floor(z / 146097)
+ const doe = z - era * 146097
+ const yoe = Math.floor((doe - Math.floor(doe / 1460) + Math.floor(doe / 36524) - Math.floor(doe / 146096)) / 365)
+ const doy = doe - (365 * yoe + Math.floor(yoe / 4) - Math.floor(yoe / 100))
+ const mp = Math.floor((5 * doy + 2) / 153)
+ const d = doy - Math.floor((153 * mp + 2) / 5) + 1
+ const m = mp + (mp < 10 ? 3 : -9)
+ const y = yoe + era * 400 + (m <= 2 ? 1 : 0)
+ return `${y}-${pad(m)}-${pad(d)}`
+}
+
+/**
+ * A field value read as a date, or nothing.
+ *
+ * `isISO` and not a shape test: `2026-13-99` is digit-shaped and is not a day,
+ * and every Date-based formatter rolls it over into some OTHER real day — so a
+ * nonsense value out of a mailed file would be drawn as a confident bar in the
+ * wrong month. Anything that is not a real ISO day is ABSENT, which is a state
+ * this chart already draws honestly.
+ */
+export function asDate(v: unknown): string | undefined {
+ if (typeof v !== 'string') return undefined
+ return isISO(v) ? v : undefined
+}
+
+/**
+ * The two date fields a schedule is drawn from.
+ *
+ * DERIVED FROM THE SCHEMA, never hardcoded — the same rule `phaseField`
+ * follows. A document that declares its own vocabulary has its own names for
+ * these, and a document that declares none gets `start` and `due` from
+ * DEFAULT_FIELDS. `start` is looked for by key first because that is what this
+ * build's defaults call it; falling back to declared ORDER is what makes a
+ * foreign schema work at all.
+ *
+ * Returns `end` alone when the schema has exactly one date field. That is not a
+ * degraded Gantt — it is a milestone chart, which is the correct picture of a
+ * list of deadlines.
+ */
+export function ganttFields(doc: SpacesDoc): { start?: FieldSpec; end?: FieldSpec } {
+ const dates = fieldsOf(doc).filter((f) => f?.vt === 'date')
+ if (!dates.length) return {}
+ const end = dates.find((f) => f.key === 'due') ?? dates[dates.length - 1]
+ const start = dates.find((f) => f.key === 'start') ?? dates.find((f) => f !== end)
+ return { start, end }
+}
+
+export interface GanttBar {
+ pageId: string
+ title: string
+ /** the left edge, ISO */
+ from: string
+ /** the right edge, ISO — inclusive, so a one-day task is one day wide */
+ to: string
+ /** no span: one date only, drawn as a diamond rather than a hairline bar */
+ milestone: boolean
+ /** the two dates are in the wrong order — drawn, and flagged. See below. */
+ invalid: boolean
+ /** finished after today, and the page's phase is still open */
+ overdue: boolean
+ /** the bucket colour, from the grouping field's option */
+ color?: string
+ /** 0..1 across the chart's span */
+ x: number
+ /** 0..1; zero for a milestone, which has a position and no width */
+ w: number
+}
+
+export interface GanttTick {
+ x: number
+ iso: string
+ label: string
+}
+
+export interface GanttModel {
+ bars: GanttBar[]
+ ticks: GanttTick[]
+ /** the span drawn, inclusive */
+ from: string
+ to: string
+ /** inclusive day count of the span; always >= 1 */
+ days: number
+ today: string
+ /** 0..1, or null when today is not in the span — see below */
+ todayX: number | null
+ /** rows carrying neither date: not drawn, counted */
+ undated: number
+ /** rows cut by GANTT_MAX_BARS */
+ dropped: number
+ /** the schema has no date field at all */
+ noDateField: boolean
+}
+
+const EMPTY: GanttModel = {
+ bars: [], ticks: [], from: '', to: '', days: 1, today: '',
+ todayX: null, undated: 0, dropped: 0, noDateField: false,
+}
+
+/**
+ * The schedule, as geometry.
+ *
+ * PURE, and separate from the drawing, for two reasons. The obvious one is that
+ * every number here can then be asserted in node under any `TZ` — a Gantt's
+ * bugs are arithmetic and a source grep would sail straight past all of them.
+ * The other is that print, the file-manager still and the editor must draw the
+ * SAME picture, and the only way to guarantee that is one model with one
+ * painter (render.ts) rather than a snapshot path that drifts.
+ *
+ * `today` is a parameter with no default. Nothing here may ask what day it is:
+ * a function that reads the clock cannot be tested, and "today" is the reader's
+ * own day (journal.ts `todayISO`), which is the caller's to know.
+ */
+export function ganttModel(
+ doc: SpacesDoc,
+ rows: IssueRow[],
+ today: string,
+ groupKey?: string,
+): GanttModel {
+ const { start: startF, end: endF } = ganttFields(doc)
+ if (!endF) return { ...EMPTY, today, noDateField: true }
+
+ const group = groupKey ? fieldByKey(doc, groupKey) : undefined
+ const phase = phaseField(doc)
+
+ interface Raw { pageId: string; title: string; a: string; b: string; milestone: boolean; invalid: boolean; open: boolean; color?: string }
+ const raw: Raw[] = []
+ let undated = 0
+
+ for (const r of rows) {
+ const s = startF ? asDate(r.values.get(startF.key)) : undefined
+ const e = asDate(r.values.get(endF.key))
+ if (!s && !e) { undated++; continue }
+
+ // ONE DATE IS A MILESTONE, NOT A ZERO-WIDTH BAR. This is the additivity
+ // rule showing through: `start` did not exist until this build, so every
+ // issue in every file already written has a due date and no start. Drawing
+ // those as hairlines would make every existing tracker look broken; drawing
+ // them as a bar from some invented start would be a schedule nobody typed.
+ // A diamond at the one date the author DID give is the only honest picture,
+ // and it is the standard one — a milestone is a date with no duration.
+ //
+ // It is symmetric on purpose: a start with no due is a thing that began and
+ // has no deadline, and a diamond says exactly that too.
+ if (!s || !e) {
+ const at = (s ?? e) as string
+ raw.push({
+ pageId: r.page.id, title: r.page.title, a: at, b: at,
+ milestone: true, invalid: false,
+ open: isOpenPhase(phase, r.values.get(phase?.key ?? '')),
+ color: optionOf(group, r.values.get(group?.key ?? ''))?.color,
+ })
+ continue
+ }
+
+ // DUE BEFORE START. Not swapped, not dropped, not zero-width.
+ //
+ // · Swapping draws a confident schedule the author never typed, and the
+ // picture would look correct, which is the worst of the three.
+ // · Dropping hides a page because its data is wrong — the reader then
+ // cannot see the row that needs fixing.
+ //
+ // So the bar spans the two dates that are actually in the file, earliest to
+ // latest, and carries `invalid` so the painter can mark it and say why.
+ const invalid = dayNumber(e) < dayNumber(s)
+ const a = invalid ? e : s
+ const b = invalid ? s : e
+ raw.push({
+ pageId: r.page.id, title: r.page.title, a, b,
+ milestone: false, invalid,
+ open: isOpenPhase(phase, r.values.get(phase?.key ?? '')),
+ color: optionOf(group, r.values.get(group?.key ?? ''))?.color,
+ })
+ }
+
+ const dropped = Math.max(0, raw.length - GANTT_MAX_BARS)
+ const kept = dropped ? raw.slice(0, GANTT_MAX_BARS) : raw
+ if (!kept.length) return { ...EMPTY, today, undated, dropped }
+
+ let lo = dayNumber(kept[0].a)
+ let hi = dayNumber(kept[0].b)
+ for (const k of kept) {
+ lo = Math.min(lo, dayNumber(k.a))
+ hi = Math.max(hi, dayNumber(k.b))
+ }
+ const from = isoFromDay(lo)
+ const to = isoFromDay(hi)
+ // INCLUSIVE: a chart of one single-day task is one day wide, not zero. Every
+ // x/w below is a fraction of this, so `days` can never be 0 and no division
+ // here can produce Infinity.
+ const days = hi - lo + 1
+
+ const bars: GanttBar[] = kept.map((k) => {
+ const a = dayNumber(k.a), b = dayNumber(k.b)
+ return {
+ pageId: k.pageId,
+ title: k.title,
+ from: k.a,
+ to: k.b,
+ milestone: k.milestone,
+ invalid: k.invalid,
+ // OVERDUE IS ABOUT THE END AND THE PHASE, both. A finished task whose due
+ // date has passed is not overdue, it is done; and `isOpenPhase` treats a
+ // status this build cannot read as open, so a newer status never hides
+ // work by accident (fields.ts).
+ overdue: b < dayNumber(today) && k.open,
+ color: k.color,
+ // a milestone sits at the CENTRE of its day, so the diamond is not half
+ // outside the chart when its date is the first or the last in the span
+ x: k.milestone ? (a - lo + 0.5) / days : (a - lo) / days,
+ w: k.milestone ? 0 : (b - a + 1) / days,
+ }
+ })
+
+ const todayN = dayNumber(today)
+ // TODAY IS MARKED ONLY WHEN IT IS IN THE SPAN, and the span is never stretched
+ // to reach it. A project finished in 2019 would otherwise be squashed into a
+ // sliver at the far left of seven blank years; clamping the marker to the edge
+ // would be worse still, because a line at the right-hand edge reads as "today
+ // is the last day of this project" rather than "today is not on this chart".
+ // Null, and the view says so in words.
+ const todayX = todayN >= lo && todayN <= hi ? (todayN - lo + 0.5) / days : null
+
+ return {
+ bars, ticks: ticksFor(from, to, lo, days), from, to, days,
+ today, todayX, undated, dropped, noDateField: false,
+ }
+}
+
+/**
+ * Where the gridlines go, and what they are called.
+ *
+ * Three tiers, chosen by how long the span is, so the axis has a handful of
+ * labels rather than three or three hundred. Every label comes from `Intl` —
+ * month and weekday names are NEVER a hand-written map here, because a map is
+ * English (or eight copies of English) and this app renders in the reader's own
+ * locale, from the same document (PLATFORM §8).
+ *
+ * The locale is deliberately NOT a parameter: `Intl.DateTimeFormat(undefined,…)`
+ * resolves the reader's own, which is the rule the journal's labels already
+ * follow. Language never enters the document.
+ */
+function ticksFor(from: string, to: string, lo: number, days: number): GanttTick[] {
+ const out: GanttTick[] = []
+ const push = (iso: string, opts: Intl.DateTimeFormatOptions) => {
+ const n = dayNumber(iso)
+ if (n < lo || n >= lo + days) return
+ out.push({ x: (n - lo) / days, iso, label: intlDay(iso, opts) })
+ }
+
+ if (days <= 35) {
+ // WEEKS, counted from the span's own first day rather than from a Monday.
+ // Which day a week starts on is a locale question with no answer that is
+ // right everywhere, and a gridline is not a calendar — the reader needs
+ // evenly spaced dates, not a claim about Mondays.
+ for (let n = lo; n < lo + days; n += 7) push(isoFromDay(n), { month: 'short', day: 'numeric' })
+ return out
+ }
+
+ const [fy, fm] = from.split('-').map(Number)
+ const [ty, tm] = to.split('-').map(Number)
+ const months = (ty - fy) * 12 + (tm - fm)
+ if (months <= 18) {
+ for (let y = fy, m = fm, guard = 0; (y < ty || (y === ty && m <= tm)) && guard < 24; guard++) {
+ // JANUARY CARRIES THE YEAR. A run of month names across a year boundary
+ // says "Nov Dec Jan Feb" and is ambiguous about which January; the year
+ // on the one label that needs it costs nothing and removes the question.
+ push(`${y}-${pad(m)}-01`, m === 1 ? { month: 'short', year: 'numeric' } : { month: 'short' })
+ m++
+ if (m > 12) { m = 1; y++ }
+ }
+ return out
+ }
+
+ // YEARS, thinned so the axis never grows without limit. A file can hold a
+ // page dated 0001-01-01 beside one dated 9999-12-31 — nothing in the format
+ // forbids it, and one gridline per year would then be ten thousand <line>
+ // elements for a picture with two bars in it.
+ const step = Math.max(1, Math.ceil((ty - fy + 1) / 12))
+ for (let y = fy; y <= ty; y += step) push(`${y}-01-01`, { year: 'numeric' })
+ return out
+}
+
+const pad = (n: number) => String(n).padStart(2, '0')
+
+/**
+ * A date in the reader's own language.
+ *
+ * The `Date` is built COMPONENT-WISE. `new Date('2026-03-01')` is UTC midnight
+ * by spec, so `Intl` formatting it in Los Angeles says "Feb 28" — a gridline
+ * labelled with the wrong month, in the half of the world this app is not
+ * written in. Falls back to the ISO string, which is wrong in nobody's language
+ * rather than misleading in one (journal.ts makes the same trade).
+ */
+export function intlDay(iso: string, opts: Intl.DateTimeFormatOptions): string {
+ const [y, m, d] = iso.split('-').map(Number)
+ try {
+ return new Intl.DateTimeFormat(undefined, opts).format(new Date(y, m - 1, d))
+ } catch {
+ return iso
+ }
+}
diff --git a/spaces/src/i18n/de.ts b/spaces/src/i18n/de.ts
index e54de13a..a04c8a2b 100644
--- a/spaces/src/i18n/de.ts
+++ b/spaces/src/i18n/de.ts
@@ -31,7 +31,9 @@ export const de: Catalog = {
"A space is never a dead end: the whole document is plain JSON in this file, and every page exports as Markdown.": "Ein Space ist nie eine Sackgasse: Das ganze Dokument ist reines JSON in dieser Datei, und jede Seite lässt sich als Markdown exportieren.",
"A space needs at least one page": "Ein Space braucht mindestens eine Seite",
"A still frame, shown before play — and what a printout or a file preview shows": "Ein Standbild, das vor dem Abspielen zu sehen ist — und das, was im Ausdruck und in der Dateivorschau erscheint",
+ "A timeline needs a date field. Add one and it appears here.": "Eine Zeitleiste braucht ein Datumsfeld. Füge eines hinzu und sie erscheint hier.",
"A typed value on this page": "Ein typisierter Wert auf dieser Seite",
+ "A workload chart adds up a number field. This space has none.": "Ein Auslastungsdiagramm summiert ein Zahlenfeld. Dieser Space hat keines.",
"About bento/spaces — version, updates, language, password": "Über bento/spaces — Version, Updates, Sprache, Passwort",
"About this space": "Über diesen Space",
"Access reset — only copies saved from now on can join": "Zugriff zurückgesetzt — nur ab jetzt gespeicherte Kopien können beitreten",
@@ -106,6 +108,7 @@ export const de: Catalog = {
"Choose a folder…": "Ordner wählen…",
"Choose a password. There is no way to recover it.": "Wähle ein Passwort. Es lässt sich nicht wiederherstellen.",
"Choose a space…": "Space auswählen…",
+ "Choose the field the bars come from": "Feld wählen, aus dem die Balken kommen",
"Choose the field the columns come from": "Feld wählen, aus dem die Spalten kommen",
"Choose the order": "Reihenfolge wählen",
"Choose which pages this view holds": "Wählen, welche Seiten diese Ansicht enthält",
@@ -319,6 +322,7 @@ export const de: Catalog = {
"No field here has options to group by": "Kein Feld hier hat Optionen zum Gruppieren",
"No issues match this filter.": "Keine Issues entsprechen diesem Filter.",
"No issues yet. Add a status field to any page and it appears here.": "Noch keine Issues. Gib einer Seite ein Status-Feld, dann erscheint sie hier.",
+ "No page here has a date yet.": "Noch keine Seite hier hat ein Datum.",
"No page matches": "Keine Seite passt",
"No pages yet": "Noch keine Seiten",
"No tags match": "Keine passenden Schlagwörter",
@@ -352,6 +356,8 @@ export const de: Catalog = {
"Open only": "Nur offene",
"Orange": "Orange",
"Other": "Sonstige",
+ "Other ({n})": "Sonstige ({n})",
+ "Other ways to save": "Weitere Speicheroptionen",
"Out of the sidebar, still searchable and linkable": "Weg aus der Seitenleiste, weiterhin auffindbar und verlinkbar",
"Owner": "Eigentümer",
"Page": "Seite",
@@ -462,6 +468,8 @@ export const de: Catalog = {
"Show as a board": "Als Board anzeigen",
"Show as a gallery": "Als Galerie anzeigen",
"Show as a list": "Als Liste anzeigen",
+ "Show as a timeline": "Als Zeitleiste anzeigen",
+ "Show as a workload chart": "Als Auslastungsdiagramm anzeigen",
"Show as a table": "Als Tabelle anzeigen",
"Show or hide properties": "Eigenschaften ein- oder ausblenden",
"Show or hide the page list": "Seitenliste ein- oder ausblenden",
@@ -558,10 +566,12 @@ export const de: Catalog = {
"This window is still running v{v}. If you overwrote the file that's open here, reload; otherwise open the file you saved.": "Dieses Fenster läuft noch mit v{v}. Wenn Sie die geöffnete Datei überschrieben haben, neu laden; andernfalls die gespeicherte Datei öffnen.",
"This window keeps running v{v} until you open the downloaded file.": "Dieses Fenster bleibt bei v{v}, bis Sie die heruntergeladene Datei öffnen.",
"Those files could not be read": "Diese Dateien konnten nicht gelesen werden",
+ "Timeline": "Zeitleiste",
"Tip": "Tipp",
"Title": "Titel",
"To-do": "Aufgabe",
"Today": "Heute",
+ "Today is outside this range": "Heute liegt außerhalb dieses Zeitraums",
"Today's journal": "Heutiges Journal",
"Toggle": "Klappblock",
"Toggle section": "Abschnitt auf- oder zuklappen",
@@ -570,6 +580,7 @@ export const de: Catalog = {
"Top level": "Oberste Ebene",
"Turn into…": "Umwandeln in…",
"Type / for blocks, [[ to link a page": "Tippe / für Blöcke, [[ für einen Seitenlink",
+ "Unassigned": "Nicht zugewiesen",
"Underline": "Unterstrichen",
"Underline — ⌘U": "Unterstrichen — ⌘U",
"Undo": "Rückgängig",
@@ -614,6 +625,7 @@ export const de: Catalog = {
"Width in the text column": "Breite in der Textspalte",
"Windows on this computer still sync; turn offline mode off in About to work with someone elsewhere.": "Fenster auf diesem Computer synchronisieren sich weiterhin; deaktiviere den Offline-Modus unter „Über“, um mit jemandem anderswo zu arbeiten.",
"Words": "Wörter",
+ "Workload": "Auslastung",
"Writing": "Schreiben",
"Write {{date}} anywhere and each new page gets its own date there.": "Schreibe irgendwo {{date}}, und jede neue Seite setzt dort ihr eigenes Datum ein.",
"Wrong password — try again": "Falsches Passwort — bitte erneut versuchen",
@@ -632,6 +644,7 @@ export const de: Catalog = {
"none": "keine",
"you": "du",
"you: {name} ✎": "Sie: {name} ✎",
+ "{a} to {b} — the end is before the start": "{a} bis {b} — das Ende liegt vor dem Anfang",
"{blocks} blocks · {words} words · {links} links in": "{blocks} Blöcke · {words} Wörter · {links} eingehende Links",
"{i} of {n}": "{i} von {n}",
"{name} joined": "{name} ist beigetreten",
@@ -650,10 +663,13 @@ export const de: Catalog = {
"{n} image(s) go with them; the rest stay here.": "{n} Bild(er) gehen mit; der Rest bleibt hier.",
"{n} image(s) point at the web. Nothing loads until a reader asks.": "{n} Bild(er) zeigen ins Web. Nichts wird geladen, bevor ein Leser darum bittet.",
"{n} image(s) were left as paths because embedding stopped there.": "{n} Bild(er) blieben als Pfad stehen, weil das Einbetten dort endete.",
- "{n} link to this page": "{n} Link auf diese Seite",
+ "{n} left out: not a number": "{n} ausgelassen: keine Zahl",
"{n} link(s) named pages that were not in that file, and are kept as text.": "{n} Link(s) nannten Seiten, die nicht in dieser Datei waren, und bleiben als Text erhalten.",
"{n} link(s) point outside them and are kept as text naming the page they meant.": "{n} Link(s) zeigen nach außen und bleiben als Text erhalten, der die gemeinte Seite nennt.",
"{n} link(s) to it will stop working.": "{n} Links darauf funktionieren nicht mehr.",
+ "{n} more grouped as Other": "{n} weitere unter „Sonstige“ zusammengefasst",
+ "{n} more not shown": "{n} weitere nicht angezeigt",
+ "{n} link to this page": "{n} Link auf diese Seite",
"{n} links to this page": "{n} Links auf diese Seite",
"{n} note name(s) appear more than once, so links naming them all went to the first.": "{n} Notiznamen kommen mehrfach vor — Links mit diesem Namen führen alle zur ersten.",
"{n} of {total} wikilink(s) resolved.": "{n} von {total} Wikilink(s) aufgelöst.",
@@ -664,6 +680,9 @@ export const de: Catalog = {
"{n} table(s) imported, with their column alignment.": "{n} Tabelle(n) importiert, samt Spaltenausrichtung.",
"{n} table(s) kept as text: there is no table block in this format yet.": "{n} Tabelle(n) als Text übernommen: Dieses Format hat noch keinen Tabellenblock.",
"{n} unresolved comment(s)": "{n} offene(r) Kommentar(e)",
+ "{n} with no date": "{n} ohne Datum",
+ "{n} with no estimate": "{n} ohne Schätzung",
+ "{n} with the end before the start": "{n} mit dem Ende vor dem Anfang",
"{n} word": "{n} Wort",
"{n} words": "{n} Wörter",
"{n}d ago": "vor {n} T",
@@ -676,7 +695,6 @@ export const de: Catalog = {
"⌘Z removes the imported pages again.": "Mit ⌘Z verschwinden die importierten Seiten wieder.",
"Calendar": "Kalender",
"Show as a calendar": "Als Kalender anzeigen",
- "Timeline": "Zeitleiste",
"Month": "Monat",
"Show a month at a time": "Einen Monat auf einmal anzeigen",
"Show a timeline": "Als Zeitstrahl anzeigen",
@@ -901,7 +919,6 @@ export const de: Catalog = {
"Add a view of the issues in this space — a board, a list, a table or a gallery": "Eine Ansicht der Issues in diesem Space hinzufügen — Board, Liste, Tabelle oder Galerie",
"Add a code block": "Einen Codeblock hinzufügen",
"Add another page’s content, kept in step with it": "Den Inhalt einer anderen Seite hinzufügen, mit ihr synchron gehalten",
- "Workload": "Auslastung",
"Chart": "Diagramm",
"Embed": "Einbettung",
"View": "Ansicht",
diff --git a/spaces/src/i18n/es.ts b/spaces/src/i18n/es.ts
index 214cf596..0bd1dfeb 100644
--- a/spaces/src/i18n/es.ts
+++ b/spaces/src/i18n/es.ts
@@ -31,7 +31,9 @@ export const es: Catalog = {
"A space is never a dead end: the whole document is plain JSON in this file, and every page exports as Markdown.": "Un espacio nunca es un callejón sin salida: todo el documento es JSON plano dentro de este archivo, y cada página se exporta como Markdown.",
"A space needs at least one page": "Un espacio necesita al menos una página",
"A still frame, shown before play — and what a printout or a file preview shows": "Un fotograma fijo, que se muestra antes de reproducir — y es lo que aparece al imprimir o en la vista previa del archivo",
+ "A timeline needs a date field. Add one and it appears here.": "Una línea de tiempo necesita un campo de fecha. Añade uno y aparecerá aquí.",
"A typed value on this page": "Un valor con tipo en esta página",
+ "A workload chart adds up a number field. This space has none.": "Un gráfico de carga suma un campo numérico. Este espacio no tiene ninguno.",
"About bento/spaces — version, updates, language, password": "Acerca de bento/spaces: versión, actualizaciones, idioma, contraseña",
"About this space": "Acerca de este espacio",
"Access reset — only copies saved from now on can join": "Acceso restablecido — solo las copias guardadas a partir de ahora podrán unirse",
@@ -106,6 +108,7 @@ export const es: Catalog = {
"Choose a folder…": "Elegir una carpeta…",
"Choose a password. There is no way to recover it.": "Elige una contraseña. No hay forma de recuperarla.",
"Choose a space…": "Elegir un espacio…",
+ "Choose the field the bars come from": "Elige el campo del que salen las barras",
"Choose the field the columns come from": "Elige el campo del que salen las columnas",
"Choose the order": "Elige el orden",
"Choose which pages this view holds": "Elige qué páginas contiene esta vista",
@@ -319,6 +322,7 @@ export const es: Catalog = {
"No field here has options to group by": "Ningún campo de aquí tiene opciones para agrupar",
"No issues match this filter.": "Ninguna incidencia coincide con este filtro.",
"No issues yet. Add a status field to any page and it appears here.": "Aún no hay incidencias. Añade un campo de estado a cualquier página y aparecerá aquí.",
+ "No page here has a date yet.": "Todavía ninguna página de aquí tiene fecha.",
"No page matches": "Ninguna página coincide",
"No pages yet": "Aún no hay páginas",
"No tags match": "Ninguna etiqueta coincide",
@@ -352,6 +356,8 @@ export const es: Catalog = {
"Open only": "Solo abiertas",
"Orange": "Naranja",
"Other": "Otras",
+ "Other ({n})": "Otros ({n})",
+ "Other ways to save": "Otras formas de guardar",
"Out of the sidebar, still searchable and linkable": "Fuera de la barra lateral, pero aún se puede buscar y enlazar",
"Owner": "Propietario",
"Page": "Página",
@@ -462,6 +468,8 @@ export const es: Catalog = {
"Show as a board": "Mostrar como tablero",
"Show as a gallery": "Mostrar como galería",
"Show as a list": "Mostrar como lista",
+ "Show as a timeline": "Mostrar como línea de tiempo",
+ "Show as a workload chart": "Mostrar como gráfico de carga",
"Show as a table": "Mostrar como tabla",
"Show or hide properties": "Mostrar u ocultar las propiedades",
"Show or hide the page list": "Mostrar u ocultar la lista de páginas",
@@ -558,10 +566,12 @@ export const es: Catalog = {
"This window is still running v{v}. If you overwrote the file that's open here, reload; otherwise open the file you saved.": "Esta ventana sigue en v{v}. Si sobrescribiste el archivo abierto aquí, recarga; si no, abre el archivo que guardaste.",
"This window keeps running v{v} until you open the downloaded file.": "Esta ventana seguirá en v{v} hasta que abras el archivo descargado.",
"Those files could not be read": "No se pudieron leer esos archivos",
+ "Timeline": "Línea de tiempo",
"Tip": "Consejo",
"Title": "Título",
"To-do": "Tarea",
"Today": "Hoy",
+ "Today is outside this range": "Hoy queda fuera de este rango",
"Today's journal": "Diario de hoy",
"Toggle": "Bloque plegable",
"Toggle section": "Mostrar u ocultar la sección",
@@ -570,6 +580,7 @@ export const es: Catalog = {
"Top level": "Nivel superior",
"Turn into…": "Convertir en…",
"Type / for blocks, [[ to link a page": "Escribe / para bloques, [[ para enlazar una página",
+ "Unassigned": "Sin asignar",
"Underline": "Subrayado",
"Underline — ⌘U": "Subrayado — ⌘U",
"Undo": "Deshacer",
@@ -614,6 +625,7 @@ export const es: Catalog = {
"Width in the text column": "Ancho en la columna de texto",
"Windows on this computer still sync; turn offline mode off in About to work with someone elsewhere.": "Las ventanas de este equipo siguen sincronizándose; desactiva el modo sin conexión en «Acerca de» para trabajar con alguien en otro lugar.",
"Words": "Palabras",
+ "Workload": "Carga de trabajo",
"Writing": "Escribir",
"Write {{date}} anywhere and each new page gets its own date there.": "Escribe {{date}} en cualquier sitio y cada página nueva pondrá ahí su propia fecha.",
"Wrong password — try again": "Contraseña incorrecta: inténtalo de nuevo",
@@ -632,6 +644,7 @@ export const es: Catalog = {
"none": "ninguna",
"you": "tú",
"you: {name} ✎": "tú: {name} ✎",
+ "{a} to {b} — the end is before the start": "{a} a {b} — el fin es anterior al inicio",
"{blocks} blocks · {words} words · {links} links in": "{blocks} bloques · {words} palabras · {links} enlaces entrantes",
"{i} of {n}": "{i} de {n}",
"{name} joined": "{name} se ha unido",
@@ -650,10 +663,13 @@ export const es: Catalog = {
"{n} image(s) go with them; the rest stay here.": "{n} imagen(es) van con ellas; el resto se queda aquí.",
"{n} image(s) point at the web. Nothing loads until a reader asks.": "{n} imagen(es) apuntan a la web. No se carga nada hasta que un lector lo pida.",
"{n} image(s) were left as paths because embedding stopped there.": "{n} imagen(es) quedaron como rutas porque la incrustación se detuvo ahí.",
- "{n} link to this page": "{n} enlace a esta página",
+ "{n} left out: not a number": "{n} excluidos: no son un número",
"{n} link(s) named pages that were not in that file, and are kept as text.": "{n} enlace(s) nombraban páginas que no estaban en ese archivo y se conservan como texto.",
"{n} link(s) point outside them and are kept as text naming the page they meant.": "{n} enlace(s) apuntan fuera y se conservan como texto que nombra la página a la que se referían.",
"{n} link(s) to it will stop working.": "{n} enlace(s) a ella dejarán de funcionar.",
+ "{n} more grouped as Other": "{n} más agrupados en Otros",
+ "{n} more not shown": "{n} más sin mostrar",
+ "{n} link to this page": "{n} enlace a esta página",
"{n} links to this page": "{n} enlaces a esta página",
"{n} note name(s) appear more than once, so links naming them all went to the first.": "{n} nombre(s) de nota se repiten, así que los enlaces con ese nombre fueron todos al primero.",
"{n} of {total} wikilink(s) resolved.": "{n} de {total} wikilink(s) resueltos.",
@@ -664,6 +680,9 @@ export const es: Catalog = {
"{n} table(s) imported, with their column alignment.": "{n} tabla(s) importada(s), con la alineación de sus columnas.",
"{n} table(s) kept as text: there is no table block in this format yet.": "{n} tabla(s) conservadas como texto: este formato aún no tiene bloque de tabla.",
"{n} unresolved comment(s)": "{n} comentario(s) sin resolver",
+ "{n} with no date": "{n} sin fecha",
+ "{n} with no estimate": "{n} sin estimación",
+ "{n} with the end before the start": "{n} con el fin antes del inicio",
"{n} word": "{n} palabra",
"{n} words": "{n} palabras",
"{n}d ago": "hace {n} d",
@@ -676,7 +695,6 @@ export const es: Catalog = {
"⌘Z removes the imported pages again.": "⌘Z vuelve a quitar las páginas importadas.",
"Calendar": "Calendario",
"Show as a calendar": "Ver como calendario",
- "Timeline": "Línea de tiempo",
"Month": "Mes",
"Show a month at a time": "Mostrar un mes cada vez",
"Show a timeline": "Mostrar una cronología",
@@ -901,7 +919,6 @@ export const es: Catalog = {
"Add a view of the issues in this space — a board, a list, a table or a gallery": "Añadir una vista de las incidencias de este espacio — un tablero, una lista, una tabla o una galería",
"Add a code block": "Añadir un bloque de código",
"Add another page’s content, kept in step with it": "Añadir el contenido de otra página, sincronizado con ella",
- "Workload": "Carga de trabajo",
"Chart": "Gráfico",
"Embed": "Incrustación",
"View": "Vista",
diff --git a/spaces/src/i18n/fr.ts b/spaces/src/i18n/fr.ts
index efd78161..02dddb5b 100644
--- a/spaces/src/i18n/fr.ts
+++ b/spaces/src/i18n/fr.ts
@@ -31,7 +31,9 @@ export const fr: Catalog = {
"A space is never a dead end: the whole document is plain JSON in this file, and every page exports as Markdown.": "Un espace n’est jamais une impasse : tout le document est du JSON brut dans ce fichier, et chaque page s’exporte en Markdown.",
"A space needs at least one page": "Un espace doit contenir au moins une page",
"A still frame, shown before play — and what a printout or a file preview shows": "Une image fixe, affichée avant la lecture — et c’est elle qui apparaît à l’impression et dans l’aperçu du fichier",
+ "A timeline needs a date field. Add one and it appears here.": "Une chronologie a besoin d’un champ de date. Ajoutez-en un et elle apparaîtra ici.",
"A typed value on this page": "Une valeur typée sur cette page",
+ "A workload chart adds up a number field. This space has none.": "Un graphique de charge additionne un champ numérique. Cet espace n’en a aucun.",
"About bento/spaces — version, updates, language, password": "À propos de bento/spaces — version, mises à jour, langue, mot de passe",
"About this space": "À propos de cet espace",
"Access reset — only copies saved from now on can join": "Accès réinitialisé — seules les copies enregistrées désormais pourront rejoindre",
@@ -106,6 +108,7 @@ export const fr: Catalog = {
"Choose a folder…": "Choisir un dossier…",
"Choose a password. There is no way to recover it.": "Choisissez un mot de passe. Il est impossible de le récupérer.",
"Choose a space…": "Choisir un espace…",
+ "Choose the field the bars come from": "Choisir le champ dont viennent les barres",
"Choose the field the columns come from": "Choisir le champ dont viennent les colonnes",
"Choose the order": "Choisir l’ordre",
"Choose which pages this view holds": "Choisir les pages que contient cette vue",
@@ -319,6 +322,7 @@ export const fr: Catalog = {
"No field here has options to group by": "Aucun champ ici n’a d’options pour grouper",
"No issues match this filter.": "Aucun ticket ne correspond à ce filtre.",
"No issues yet. Add a status field to any page and it appears here.": "Aucun ticket pour l’instant. Ajoutez un champ statut à une page et elle apparaîtra ici.",
+ "No page here has a date yet.": "Aucune page ici n’a encore de date.",
"No page matches": "Aucune page ne correspond",
"No pages yet": "Aucune page pour l’instant",
"No tags match": "Aucune étiquette ne correspond",
@@ -352,6 +356,8 @@ export const fr: Catalog = {
"Open only": "Ouverts seulement",
"Orange": "Orange",
"Other": "Autres",
+ "Other ({n})": "Autres ({n})",
+ "Other ways to save": "Autres façons d’enregistrer",
"Out of the sidebar, still searchable and linkable": "Hors de la barre latérale, toujours dans la recherche et les liens",
"Owner": "Propriétaire",
"Page": "Page",
@@ -462,6 +468,8 @@ export const fr: Catalog = {
"Show as a board": "Afficher en tableau",
"Show as a gallery": "Afficher en galerie",
"Show as a list": "Afficher en liste",
+ "Show as a timeline": "Afficher en chronologie",
+ "Show as a workload chart": "Afficher en graphique de charge",
"Show as a table": "Afficher en tableau",
"Show or hide properties": "Afficher ou masquer les propriétés",
"Show or hide the page list": "Afficher ou masquer la liste des pages",
@@ -558,10 +566,12 @@ export const fr: Catalog = {
"This window is still running v{v}. If you overwrote the file that's open here, reload; otherwise open the file you saved.": "Cette fenêtre tourne encore en v{v}. Si vous avez écrasé le fichier ouvert ici, rechargez ; sinon ouvrez le fichier enregistré.",
"This window keeps running v{v} until you open the downloaded file.": "Cette fenêtre reste en v{v} jusqu'à l'ouverture du fichier téléchargé.",
"Those files could not be read": "Ces fichiers n’ont pas pu être lus",
+ "Timeline": "Chronologie",
"Tip": "Astuce",
"Title": "Titre",
"To-do": "Tâche",
"Today": "Aujourd’hui",
+ "Today is outside this range": "Aujourd’hui est hors de cette plage",
"Today's journal": "Journal du jour",
"Toggle": "Bloc dépliant",
"Toggle section": "Afficher ou masquer la section",
@@ -570,6 +580,7 @@ export const fr: Catalog = {
"Top level": "Premier niveau",
"Turn into…": "Convertir en…",
"Type / for blocks, [[ to link a page": "Tapez / pour les blocs, [[ pour lier une page",
+ "Unassigned": "Non attribué",
"Underline": "Souligné",
"Underline — ⌘U": "Souligné — ⌘U",
"Undo": "Annuler",
@@ -614,6 +625,7 @@ export const fr: Catalog = {
"Width in the text column": "Largeur dans la colonne de texte",
"Windows on this computer still sync; turn offline mode off in About to work with someone elsewhere.": "Les fenêtres de cet ordinateur restent synchronisées ; désactivez le mode hors ligne dans « À propos » pour travailler avec quelqu’un ailleurs.",
"Words": "Mots",
+ "Workload": "Charge de travail",
"Writing": "Écrire",
"Write {{date}} anywhere and each new page gets its own date there.": "Écrivez {{date}} n’importe où et chaque nouvelle page y mettra sa propre date.",
"Wrong password — try again": "Mot de passe incorrect — réessayez",
@@ -632,6 +644,7 @@ export const fr: Catalog = {
"none": "aucun",
"you": "vous",
"you: {name} ✎": "vous : {name} ✎",
+ "{a} to {b} — the end is before the start": "{a} à {b} — la fin est avant le début",
"{blocks} blocks · {words} words · {links} links in": "{blocks} blocs · {words} mots · {links} liens entrants",
"{i} of {n}": "{i} sur {n}",
"{name} joined": "{name} a rejoint",
@@ -650,10 +663,13 @@ export const fr: Catalog = {
"{n} image(s) go with them; the rest stay here.": "{n} image(s) partent avec elles ; les autres restent ici.",
"{n} image(s) point at the web. Nothing loads until a reader asks.": "{n} image(s) pointent vers le web. Rien ne se charge tant qu’un lecteur ne le demande pas.",
"{n} image(s) were left as paths because embedding stopped there.": "{n} image(s) restent sous forme de chemin, l’intégration s’étant arrêtée là.",
- "{n} link to this page": "{n} lien vers cette page",
+ "{n} left out: not a number": "{n} écartés : pas un nombre",
"{n} link(s) named pages that were not in that file, and are kept as text.": "{n} lien(s) nommaient des pages absentes de ce fichier et sont conservés en texte.",
"{n} link(s) point outside them and are kept as text naming the page they meant.": "{n} lien(s) pointent en dehors et sont conservés en texte, avec le nom de la page visée.",
"{n} link(s) to it will stop working.": "{n} lien(s) vers elle ne fonctionneront plus.",
+ "{n} more grouped as Other": "{n} de plus regroupés dans Autres",
+ "{n} more not shown": "{n} de plus non affichés",
+ "{n} link to this page": "{n} lien vers cette page",
"{n} links to this page": "{n} liens vers cette page",
"{n} note name(s) appear more than once, so links naming them all went to the first.": "{n} nom(s) de note apparaissent plusieurs fois : les liens portant ce nom pointent tous vers le premier.",
"{n} of {total} wikilink(s) resolved.": "{n} wikilien(s) sur {total} résolus.",
@@ -664,6 +680,9 @@ export const fr: Catalog = {
"{n} table(s) imported, with their column alignment.": "{n} tableau(x) importé(s), avec l’alignement de leurs colonnes.",
"{n} table(s) kept as text: there is no table block in this format yet.": "{n} tableau(x) conservés en texte : ce format n’a pas encore de bloc tableau.",
"{n} unresolved comment(s)": "{n} commentaire(s) non résolu(s)",
+ "{n} with no date": "{n} sans date",
+ "{n} with no estimate": "{n} sans estimation",
+ "{n} with the end before the start": "{n} avec la fin avant le début",
"{n} word": "{n} mot",
"{n} words": "{n} mots",
"{n}d ago": "il y a {n} j",
@@ -676,7 +695,6 @@ export const fr: Catalog = {
"⌘Z removes the imported pages again.": "⌘Z supprime à nouveau les pages importées.",
"Calendar": "Calendrier",
"Show as a calendar": "Afficher en calendrier",
- "Timeline": "Chronologie",
"Month": "Mois",
"Show a month at a time": "Afficher un mois à la fois",
"Show a timeline": "Afficher une chronologie",
@@ -901,7 +919,6 @@ export const fr: Catalog = {
"Add a view of the issues in this space — a board, a list, a table or a gallery": "Ajouter une vue des tickets de cet espace — un tableau, une liste, une table ou une galerie",
"Add a code block": "Ajouter un bloc de code",
"Add another page’s content, kept in step with it": "Ajouter le contenu d’une autre page, tenu à jour avec elle",
- "Workload": "Charge de travail",
"Chart": "Graphique",
"Embed": "Intégration",
"View": "Vue",
diff --git a/spaces/src/i18n/it.ts b/spaces/src/i18n/it.ts
index f458313e..0585096a 100644
--- a/spaces/src/i18n/it.ts
+++ b/spaces/src/i18n/it.ts
@@ -31,7 +31,9 @@ export const it: Catalog = {
"A space is never a dead end: the whole document is plain JSON in this file, and every page exports as Markdown.": "Uno spazio non è mai un vicolo cieco: l’intero documento è JSON puro dentro questo file, e ogni pagina si esporta in Markdown.",
"A space needs at least one page": "Uno spazio deve avere almeno una pagina",
"A still frame, shown before play — and what a printout or a file preview shows": "Un fotogramma fisso, mostrato prima della riproduzione — ed è quello che compare in stampa e nell’anteprima del file",
+ "A timeline needs a date field. Add one and it appears here.": "Una timeline ha bisogno di un campo data. Aggiungine uno e apparirà qui.",
"A typed value on this page": "Un valore tipizzato su questa pagina",
+ "A workload chart adds up a number field. This space has none.": "Un grafico del carico somma un campo numerico. Questo spazio non ne ha.",
"About bento/spaces — version, updates, language, password": "Informazioni su bento/spaces — versione, aggiornamenti, lingua, password",
"About this space": "Informazioni su questo spazio",
"Access reset — only copies saved from now on can join": "Accesso reimpostato — solo le copie salvate d’ora in poi potranno unirsi",
@@ -106,6 +108,7 @@ export const it: Catalog = {
"Choose a folder…": "Scegli una cartella…",
"Choose a password. There is no way to recover it.": "Scegli una password. Non c’è modo di recuperarla.",
"Choose a space…": "Scegli uno spazio…",
+ "Choose the field the bars come from": "Scegli il campo da cui nascono le barre",
"Choose the field the columns come from": "Scegli il campo da cui nascono le colonne",
"Choose the order": "Scegli l’ordine",
"Choose which pages this view holds": "Scegli quali pagine contiene questa vista",
@@ -319,6 +322,7 @@ export const it: Catalog = {
"No field here has options to group by": "Nessun campo qui ha opzioni per raggruppare",
"No issues match this filter.": "Nessuna issue corrisponde a questo filtro.",
"No issues yet. Add a status field to any page and it appears here.": "Ancora nessuna issue. Aggiungi un campo stato a una pagina e comparirà qui.",
+ "No page here has a date yet.": "Nessuna pagina qui ha ancora una data.",
"No page matches": "Nessuna pagina corrisponde",
"No pages yet": "Ancora nessuna pagina",
"No tags match": "Nessuna etichetta corrisponde",
@@ -352,6 +356,8 @@ export const it: Catalog = {
"Open only": "Solo aperte",
"Orange": "Arancione",
"Other": "Altre",
+ "Other ({n})": "Altri ({n})",
+ "Other ways to save": "Altri modi per salvare",
"Out of the sidebar, still searchable and linkable": "Fuori dalla barra laterale, ma sempre ricercabile e collegabile",
"Owner": "Proprietario",
"Page": "Pagina",
@@ -462,6 +468,8 @@ export const it: Catalog = {
"Show as a board": "Mostra come bacheca",
"Show as a gallery": "Mostra come galleria",
"Show as a list": "Mostra come elenco",
+ "Show as a timeline": "Mostra come timeline",
+ "Show as a workload chart": "Mostra come grafico del carico",
"Show as a table": "Mostra come tabella",
"Show or hide properties": "Mostra o nascondi le proprietà",
"Show or hide the page list": "Mostra o nascondi l’elenco delle pagine",
@@ -558,10 +566,12 @@ export const it: Catalog = {
"This window is still running v{v}. If you overwrote the file that's open here, reload; otherwise open the file you saved.": "Questa finestra esegue ancora la v{v}. Se hai sovrascritto il file aperto qui, ricarica; altrimenti apri il file salvato.",
"This window keeps running v{v} until you open the downloaded file.": "Questa finestra resta alla v{v} finché non apri il file scaricato.",
"Those files could not be read": "Non è stato possibile leggere quei file",
+ "Timeline": "Timeline",
"Tip": "Suggerimento",
"Title": "Titolo",
"To-do": "Attività",
"Today": "Oggi",
+ "Today is outside this range": "Oggi è fuori da questo intervallo",
"Today's journal": "Diario di oggi",
"Toggle": "Blocco richiudibile",
"Toggle section": "Mostra o nascondi la sezione",
@@ -570,6 +580,7 @@ export const it: Catalog = {
"Top level": "Primo livello",
"Turn into…": "Converti in…",
"Type / for blocks, [[ to link a page": "Digita / per i blocchi, [[ per collegare una pagina",
+ "Unassigned": "Non assegnato",
"Underline": "Sottolineato",
"Underline — ⌘U": "Sottolineato — ⌘U",
"Undo": "Annulla",
@@ -614,6 +625,7 @@ export const it: Catalog = {
"Width in the text column": "Larghezza nella colonna di testo",
"Windows on this computer still sync; turn offline mode off in About to work with someone elsewhere.": "Le finestre su questo computer restano sincronizzate; disattiva la modalità offline in «Informazioni» per lavorare con qualcuno altrove.",
"Words": "Parole",
+ "Workload": "Carico di lavoro",
"Writing": "Scrivere",
"Write {{date}} anywhere and each new page gets its own date there.": "Scrivi {{date}} in un punto qualsiasi e ogni nuova pagina vi metterà la propria data.",
"Wrong password — try again": "Password errata — riprova",
@@ -632,6 +644,7 @@ export const it: Catalog = {
"none": "nessuno",
"you": "tu",
"you: {name} ✎": "tu: {name} ✎",
+ "{a} to {b} — the end is before the start": "{a} – {b} — la fine è prima dell’inizio",
"{blocks} blocks · {words} words · {links} links in": "{blocks} blocchi · {words} parole · {links} link in entrata",
"{i} of {n}": "{i} di {n}",
"{name} joined": "{name} si è unito",
@@ -650,10 +663,13 @@ export const it: Catalog = {
"{n} image(s) go with them; the rest stay here.": "{n} immagine/i vanno con esse; il resto resta qui.",
"{n} image(s) point at the web. Nothing loads until a reader asks.": "{n} immagini puntano al web. Non si carica nulla finché un lettore non lo chiede.",
"{n} image(s) were left as paths because embedding stopped there.": "{n} immagini restano come percorsi perché l’incorporamento si è fermato lì.",
- "{n} link to this page": "{n} link a questa pagina",
+ "{n} left out: not a number": "{n} esclusi: non sono numeri",
"{n} link(s) named pages that were not in that file, and are kept as text.": "{n} collegamento/i nominavano pagine non presenti in quel file e restano come testo.",
"{n} link(s) point outside them and are kept as text naming the page they meant.": "{n} collegamento/i puntano fuori e restano come testo che nomina la pagina a cui puntavano.",
"{n} link(s) to it will stop working.": "{n} collegamenti a questa pagina smetteranno di funzionare.",
+ "{n} more grouped as Other": "Altri {n} raggruppati in Altri",
+ "{n} more not shown": "Altri {n} non mostrati",
+ "{n} link to this page": "{n} link a questa pagina",
"{n} links to this page": "{n} link a questa pagina",
"{n} note name(s) appear more than once, so links naming them all went to the first.": "{n} nome/i di nota compaiono più volte, quindi i link con quel nome puntano tutti al primo.",
"{n} of {total} wikilink(s) resolved.": "{n} wikilink su {total} risolti.",
@@ -664,6 +680,9 @@ export const it: Catalog = {
"{n} table(s) imported, with their column alignment.": "{n} tabella/e importata/e, con l’allineamento delle colonne.",
"{n} table(s) kept as text: there is no table block in this format yet.": "{n} tabelle conservate come testo: questo formato non ha ancora un blocco tabella.",
"{n} unresolved comment(s)": "{n} commento/i non risolto/i",
+ "{n} with no date": "{n} senza data",
+ "{n} with no estimate": "{n} senza stima",
+ "{n} with the end before the start": "{n} con la fine prima dell’inizio",
"{n} word": "{n} parola",
"{n} words": "{n} parole",
"{n}d ago": "{n} g fa",
@@ -676,7 +695,6 @@ export const it: Catalog = {
"⌘Z removes the imported pages again.": "⌘Z rimuove di nuovo le pagine importate.",
"Calendar": "Calendario",
"Show as a calendar": "Mostra come calendario",
- "Timeline": "Timeline",
"Month": "Mese",
"Show a month at a time": "Mostra un mese alla volta",
"Show a timeline": "Mostra una cronologia",
@@ -901,7 +919,6 @@ export const it: Catalog = {
"Add a view of the issues in this space — a board, a list, a table or a gallery": "Aggiungi una vista delle issue di questo spazio — bacheca, elenco, tabella o galleria",
"Add a code block": "Aggiungi un blocco di codice",
"Add another page’s content, kept in step with it": "Aggiungi il contenuto di un’altra pagina, sempre allineato",
- "Workload": "Carico di lavoro",
"Chart": "Grafico",
"Embed": "Incorporamento",
"View": "Vista",
diff --git a/spaces/src/i18n/ja.ts b/spaces/src/i18n/ja.ts
index 7fc57f2d..122228ee 100644
--- a/spaces/src/i18n/ja.ts
+++ b/spaces/src/i18n/ja.ts
@@ -31,7 +31,9 @@ export const ja: Catalog = {
"A space is never a dead end: the whole document is plain JSON in this file, and every page exports as Markdown.": "スペースは行き止まりになりません。ドキュメント全体はこのファイル内のプレーンな JSON で、どのページも Markdown に書き出せます。",
"A space needs at least one page": "スペースには少なくとも 1 ページが必要です",
"A still frame, shown before play — and what a printout or a file preview shows": "再生前に表示される静止画 — 印刷やファイルのプレビューで表示されるのもこれです",
+ "A timeline needs a date field. Add one and it appears here.": "タイムラインには日付フィールドが必要です。追加するとここに表示されます。",
"A typed value on this page": "このページの型付きの値",
+ "A workload chart adds up a number field. This space has none.": "作業量グラフは数値フィールドを合計します。このスペースには数値フィールドがありません。",
"About bento/spaces — version, updates, language, password": "bento/spaces について — バージョン・更新・言語・パスワード",
"About this space": "このスペースについて",
"Access reset — only copies saved from now on can join": "アクセスをリセットしました — 今後保存したコピーだけが参加できます",
@@ -106,6 +108,7 @@ export const ja: Catalog = {
"Choose a folder…": "フォルダーを選ぶ…",
"Choose a password. There is no way to recover it.": "パスワードを決めてください。復元する方法はありません。",
"Choose a space…": "スペースを選ぶ…",
+ "Choose the field the bars come from": "棒のもとになるフィールドを選ぶ",
"Choose the field the columns come from": "列のもとになるフィールドを選ぶ",
"Choose the order": "並び順を選ぶ",
"Choose which pages this view holds": "このビューに入れるページを選ぶ",
@@ -319,6 +322,7 @@ export const ja: Catalog = {
"No field here has options to group by": "グループ化に使える選択肢を持つフィールドがありません",
"No issues match this filter.": "この条件に一致するイシューはありません。",
"No issues yet. Add a status field to any page and it appears here.": "まだイシューはありません。どれかのページにステータス項目を追加すると、ここに表示されます。",
+ "No page here has a date yet.": "ここにはまだ日付のあるページがありません。",
"No page matches": "一致するページがありません",
"No pages yet": "ページがまだありません",
"No tags match": "一致するタグはありません",
@@ -352,6 +356,8 @@ export const ja: Catalog = {
"Open only": "未完了のみ",
"Orange": "オレンジ",
"Other": "その他",
+ "Other ({n})": "その他({n})",
+ "Other ways to save": "その他の保存方法",
"Out of the sidebar, still searchable and linkable": "サイドバーから外れますが、検索もリンクもできます",
"Owner": "オーナー",
"Page": "ページ",
@@ -462,6 +468,8 @@ export const ja: Catalog = {
"Show as a board": "ボードで表示",
"Show as a gallery": "ギャラリーで表示",
"Show as a list": "リストで表示",
+ "Show as a timeline": "タイムラインで表示",
+ "Show as a workload chart": "作業量グラフで表示",
"Show as a table": "テーブルで表示",
"Show or hide properties": "プロパティの表示・非表示",
"Show or hide the page list": "ページ一覧の表示・非表示",
@@ -558,10 +566,12 @@ export const ja: Catalog = {
"This window is still running v{v}. If you overwrote the file that's open here, reload; otherwise open the file you saved.": "このウィンドウはまだ v{v} で動作中。開いているファイルを上書きした場合は再読込を。別に保存した場合はそのファイルを開いてください。",
"This window keeps running v{v} until you open the downloaded file.": "ダウンロードしたファイルを開くまで、このウィンドウは v{v} のままです。",
"Those files could not be read": "それらのファイルは読み込めませんでした",
+ "Timeline": "タイムライン",
"Tip": "ヒント",
"Title": "タイトル",
"To-do": "チェックリスト",
"Today": "今日",
+ "Today is outside this range": "今日はこの範囲の外です",
"Today's journal": "今日のジャーナル",
"Toggle": "トグル",
"Toggle section": "セクションの開閉",
@@ -570,6 +580,7 @@ export const ja: Catalog = {
"Top level": "最上位",
"Turn into…": "種類を変更…",
"Type / for blocks, [[ to link a page": "/ でブロック、[[ でページにリンク",
+ "Unassigned": "担当者なし",
"Underline": "下線",
"Underline — ⌘U": "下線 — ⌘U",
"Undo": "元に戻す",
@@ -614,6 +625,7 @@ export const ja: Catalog = {
"Width in the text column": "本文カラム内の幅",
"Windows on this computer still sync; turn offline mode off in About to work with someone elsewhere.": "このコンピュータ上のウィンドウ同士は引き続き同期します。ほかの場所にいる人と作業するには「About」でオフラインモードを解除してください。",
"Words": "語数",
+ "Workload": "作業量",
"Writing": "書く",
"Write {{date}} anywhere and each new page gets its own date there.": "どこかに {{date}} と書いておくと、新しいページごとにその日の日付が入ります。",
"Wrong password — try again": "パスワードが違います — もう一度お試しください",
@@ -632,6 +644,7 @@ export const ja: Catalog = {
"none": "なし",
"you": "あなた",
"you: {name} ✎": "あなた: {name} ✎",
+ "{a} to {b} — the end is before the start": "{a} 〜 {b} — 終了日が開始日より前です",
"{blocks} blocks · {words} words · {links} links in": "{blocks} ブロック · {words} 語 · 被リンク {links}",
"{i} of {n}": "{i} / {n}",
"{name} joined": "{name} が参加しました",
@@ -650,10 +663,13 @@ export const ja: Catalog = {
"{n} image(s) go with them; the rest stay here.": "{n} 件の画像が一緒に移動し、残りはここに残ります。",
"{n} image(s) point at the web. Nothing loads until a reader asks.": "{n} 個の画像はウェブを指しています。読み手が求めるまで何も読み込みません。",
"{n} image(s) were left as paths because embedding stopped there.": "{n} 個の画像は、そこで埋め込みを止めたためパスのまま残りました。",
- "{n} link to this page": "このページへのリンク {n} 件",
+ "{n} left out: not a number": "{n} 件は数値ではないため除外",
"{n} link(s) named pages that were not in that file, and are kept as text.": "{n} 件のリンクはそのファイルに無いページを指していたため、テキストとして残しました。",
"{n} link(s) point outside them and are kept as text naming the page they meant.": "{n} 件のリンクは外を指しているため、指していたページ名を残したテキストになります。",
"{n} link(s) to it will stop working.": "このページへのリンク {n} 件が機能しなくなります。",
+ "{n} more grouped as Other": "他 {n} 件は「その他」にまとめました",
+ "{n} more not shown": "他 {n} 件は表示していません",
+ "{n} link to this page": "このページへのリンク {n} 件",
"{n} links to this page": "このページへのリンク {n} 件",
"{n} note name(s) appear more than once, so links naming them all went to the first.": "{n} 件のノート名が重複しているため、その名前のリンクはすべて最初のノートに向いています。",
"{n} of {total} wikilink(s) resolved.": "{total} 個のウィキリンクのうち {n} 個を解決しました。",
@@ -664,6 +680,9 @@ export const ja: Catalog = {
"{n} table(s) imported, with their column alignment.": "{n} 個の表を取り込みました(列の配置も含みます)。",
"{n} table(s) kept as text: there is no table block in this format yet.": "{n} 個の表はテキストとして保存しました。この形式にはまだ表ブロックがありません。",
"{n} unresolved comment(s)": "未解決のコメント {n} 件",
+ "{n} with no date": "{n} 件は日付なし",
+ "{n} with no estimate": "{n} 件は見積もりなし",
+ "{n} with the end before the start": "{n} 件は終了日が開始日より前",
"{n} word": "{n} 語",
"{n} words": "{n} 語",
"{n}d ago": "{n}日前",
@@ -676,7 +695,6 @@ export const ja: Catalog = {
"⌘Z removes the imported pages again.": "⌘Z で、読み込んだページを取り消せます。",
"Calendar": "カレンダー",
"Show as a calendar": "カレンダーで表示",
- "Timeline": "タイムライン",
"Month": "月",
"Show a month at a time": "1か月ずつ表示",
"Show a timeline": "タイムラインで表示",
@@ -901,7 +919,6 @@ export const ja: Catalog = {
"Add a view of the issues in this space — a board, a list, a table or a gallery": "この Space のイシューのビューを追加 — ボード・リスト・表・ギャラリー",
"Add a code block": "コードブロックを追加",
"Add another page’s content, kept in step with it": "別のページの内容を追加 — 元のページと連動します",
- "Workload": "作業量",
"Chart": "グラフ",
"Embed": "埋め込み",
"View": "ビュー",
diff --git a/spaces/src/i18n/packed.ts b/spaces/src/i18n/packed.ts
index 81d36d10..0f309385 100644
--- a/spaces/src/i18n/packed.ts
+++ b/spaces/src/i18n/packed.ts
@@ -47,8 +47,10 @@ export const PACKED: Record<string, ReadonlyArray<string | 0>> = {
"A space needs at least one page": ["スペースには少なくとも 1 ページが必要です","空间至少要有一个页面","空間至少要有一個頁面","Un espacio necesita al menos una página","Un espace doit contenir au moins une page","Ein Space braucht mindestens eine Seite","Uno spazio deve avere almeno una pagina","Um espaço precisa de pelo menos uma página"],
"A still frame, shown before play — and what a printout or a file preview shows": ["再生前に表示される静止画 — 印刷やファイルのプレビューで表示されるのもこれです","播放前显示的静帧 — 打印和文件预览中显示的也是它","播放前顯示的靜態畫面 — 列印和檔案預覽顯示的也是它","Un fotograma fijo, que se muestra antes de reproducir — y es lo que aparece al imprimir o en la vista previa del archivo","Une image fixe, affichée avant la lecture — et c’est elle qui apparaît à l’impression et dans l’aperçu du fichier","Ein Standbild, das vor dem Abspielen zu sehen ist — und das, was im Ausdruck und in der Dateivorschau erscheint","Un fotogramma fisso, mostrato prima della riproduzione — ed è quello che compare in stampa e nell’anteprima del file","Uma imagem fixa, mostrada antes da reprodução — e é o que aparece na impressão e na pré-visualização do ficheiro"],
"A table was too tall for one slide and continues on the next.": ["表が 1 枚に収まらず、次のスライドへ続いています。","表格一张幻灯片放不下,接续到了下一张。","表格一張投影片放不下,接續到了下一張。","Una tabla no cabía en una diapositiva y continúa en la siguiente.","Un tableau était trop haut pour une diapositive et se poursuit sur la suivante.","Eine Tabelle war zu hoch für eine Folie und läuft auf der nächsten weiter.","Una tabella era troppo alta per una diapositiva e prosegue in quella successiva.","Uma tabela era alta demais para um slide e continua no seguinte."],
+ "A timeline needs a date field. Add one and it appears here.": ["タイムラインには日付フィールドが必要です。追加するとここに表示されます。","时间线需要一个日期字段。添加之后就会显示在这里。","時間軸需要一個日期欄位。新增之後就會顯示在這裡。","Una línea de tiempo necesita un campo de fecha. Añade uno y aparecerá aquí.","Une chronologie a besoin d’un champ de date. Ajoutez-en un et elle apparaîtra ici.","Eine Zeitleiste braucht ein Datumsfeld. Füge eines hinzu und sie erscheint hier.","Una timeline ha bisogno di un campo data. Aggiungine uno e apparirà qui.","Uma linha de tempo precisa de um campo de data. Adiciona um e aparece aqui."],
"A typed value on this page": ["このページの型付きの値","此页面上的类型化值","此頁面上的型別值","Un valor con tipo en esta página","Une valeur typée sur cette page","Ein typisierter Wert auf dieser Seite","Un valore tipizzato su questa pagina","Um valor tipado nesta página"],
"A typewritten manuscript: one face, capitals, a two-colour ribbon.": ["タイプ原稿:書体はひとつ、大文字、2色のリボン。","打字机手稿:单一字体、大写、双色色带。","打字機手稿:單一字體、大寫、雙色色帶。","Un manuscrito mecanografiado: un solo tipo, mayúsculas y cinta de dos colores.","Un manuscrit dactylographié : un seul caractère, des capitales, un ruban bicolore.","Ein maschinengeschriebenes Manuskript: eine Schrift, Versalien, ein zweifarbiges Farbband.","Un dattiloscritto: un solo carattere, maiuscole, un nastro bicolore.","Um manuscrito datilografado: um só tipo, maiúsculas, fita de duas cores."],
+ "A workload chart adds up a number field. This space has none.": ["作業量グラフは数値フィールドを合計します。このスペースには数値フィールドがありません。","工作量图表会汇总一个数字字段。这个空间还没有数字字段。","工作量圖表會彙總一個數字欄位。這個空間還沒有數字欄位。","Un gráfico de carga suma un campo numérico. Este espacio no tiene ninguno.","Un graphique de charge additionne un champ numérique. Cet espace n’en a aucun.","Ein Auslastungsdiagramm summiert ein Zahlenfeld. Dieser Space hat keines.","Un grafico del carico somma un campo numerico. Questo spazio non ne ha.","Um gráfico de carga soma um campo numérico. Este espaço não tem nenhum."],
"About bento/spaces — version, updates, licenses": ["bento/spaces について — バージョン・更新・ライセンス","关于 bento/spaces — 版本、更新、许可证","關於 bento/spaces — 版本、更新、授權","Acerca de bento/spaces — versión, actualizaciones, licencias","À propos de bento/spaces — version, mises à jour, licences","Über bento/spaces — Version, Updates, Lizenzen","Informazioni su bento/spaces — versione, aggiornamenti, licenze","Acerca do bento/spaces — versão, atualizações, licenças"],
"About this space": ["このスペースについて","关于此空间","關於此空間","Acerca de este espacio","À propos de cet espace","Über diesen Space","Informazioni su questo spazio","Sobre este espaço"],
"Accent": ["アクセント","强调色","強調色","Acento","Accent","Akzent","Accento","Realce"],
@@ -154,6 +156,7 @@ export const PACKED: Record<string, ReadonlyArray<string | 0>> = {
"Choose a file…": ["ファイルを選ぶ…","选择文件…","選擇檔案…","Elegir un archivo…","Choisir un fichier…","Datei wählen…","Scegli un file…","Escolher um ficheiro…"],
"Choose a folder…": ["フォルダーを選ぶ…","选择文件夹…","選擇資料夾…","Elegir una carpeta…","Choisir un dossier…","Ordner wählen…","Scegli una cartella…","Escolher uma pasta…"],
"Choose a space…": ["スペースを選ぶ…","选择一个空间…","選擇一個空間…","Elegir un espacio…","Choisir un espace…","Space auswählen…","Scegli uno spazio…","Escolher um espaço…"],
+ "Choose the field the bars come from": ["棒のもとになるフィールドを選ぶ","选择用作柱形的字段","選擇作為長條的欄位","Elige el campo del que salen las barras","Choisir le champ dont viennent les barres","Feld wählen, aus dem die Balken kommen","Scegli il campo da cui nascono le barre","Escolha o campo de onde vêm as barras"],
"Choose the field the columns come from": ["列のもとになるフィールドを選ぶ","选择用作分栏的字段","選擇作為欄的欄位","Elige el campo del que salen las columnas","Choisir le champ dont viennent les colonnes","Feld wählen, aus dem die Spalten kommen","Scegli il campo da cui nascono le colonne","Escolha o campo de onde vêm as colunas"],
"Choose the order": ["並び順を選ぶ","选择排序方式","選擇排序方式","Elige el orden","Choisir l’ordre","Reihenfolge wählen","Scegli l’ordine","Escolha a ordem"],
"Choose which pages this view holds": ["このビューに入れるページを選ぶ","选择此视图包含哪些页面","選擇此檢視包含哪些頁面","Elige qué páginas contiene esta vista","Choisir les pages que contient cette vue","Wählen, welche Seiten diese Ansicht enthält","Scegli quali pagine contiene questa vista","Escolhe que páginas esta vista contém"],
@@ -421,6 +424,7 @@ export const PACKED: Record<string, ReadonlyArray<string | 0>> = {
"No field here has options to group by": ["グループ化に使える選択肢を持つフィールドがありません","这里没有可用于分组的选项字段","這裡沒有可用於分組的選項欄位","Ningún campo de aquí tiene opciones para agrupar","Aucun champ ici n’a d’options pour grouper","Kein Feld hier hat Optionen zum Gruppieren","Nessun campo qui ha opzioni per raggruppare","Nenhum campo aqui tem opções para agrupar"],
"No issues match this filter.": ["この条件に一致するイシューはありません。","没有符合此筛选条件的事项。","沒有符合此篩選條件的項目。","Ninguna incidencia coincide con este filtro.","Aucun ticket ne correspond à ce filtre.","Keine Issues entsprechen diesem Filter.","Nessuna issue corrisponde a questo filtro.","Nenhuma tarefa corresponde a este filtro."],
"No issues yet. Add a status field to any page and it appears here.": ["まだイシューはありません。どれかのページにステータス項目を追加すると、ここに表示されます。","还没有事项。给任意页面添加状态字段,它就会出现在这里。","還沒有項目。為任一頁面新增狀態欄位,它就會出現在這裡。","Aún no hay incidencias. Añade un campo de estado a cualquier página y aparecerá aquí.","Aucun ticket pour l’instant. Ajoutez un champ statut à une page et elle apparaîtra ici.","Noch keine Issues. Gib einer Seite ein Status-Feld, dann erscheint sie hier.","Ancora nessuna issue. Aggiungi un campo stato a una pagina e comparirà qui.","Ainda não há tarefas. Adiciona um campo de estado a qualquer página e ela aparece aqui."],
+ "No page here has a date yet.": ["ここにはまだ日付のあるページがありません。","这里还没有任何页面带有日期。","這裡還沒有任何頁面帶有日期。","Todavía ninguna página de aquí tiene fecha.","Aucune page ici n’a encore de date.","Noch keine Seite hier hat ein Datum.","Nessuna pagina qui ha ancora una data.","Ainda nenhuma página aqui tem data."],
"No page matches": ["一致するページがありません","没有匹配的页面","沒有相符的頁面","Ninguna página coincide","Aucune page ne correspond","Keine Seite passt","Nessuna pagina corrisponde","Nenhuma página corresponde"],
"No pages yet": ["ページがまだありません","还没有页面","尚無頁面","Aún no hay páginas","Aucune page pour l’instant","Noch keine Seiten","Ancora nessuna pagina","Ainda sem páginas"],
"No recovery — lose the password and the space is gone": ["復元できません — パスワードを失うとスペースも失われます","无法找回 — 丢失密码,空间也就没了","無法找回 — 遺失密碼,空間也就沒了","Sin recuperación: si pierdes la contraseña, pierdes el espacio","Aucune récupération : perdez le mot de passe et l’espace est perdu","Keine Wiederherstellung — Passwort verloren, Space verloren","Nessun recupero: se perdi la password, perdi lo spazio","Sem recuperação — perca a senha e o espaço se perde"],
@@ -462,6 +466,7 @@ export const PACKED: Record<string, ReadonlyArray<string | 0>> = {
"Open only": ["未完了のみ","仅未完成","僅未完成","Solo abiertas","Ouverts seulement","Nur offene","Solo aperte","Apenas em aberto"],
"Orange": ["オレンジ","橙色","橘色","Naranja","Orange","Orange","Arancione","Laranja"],
"Other": ["その他","其他","其他","Otras","Autres","Sonstige","Altre","Outras"],
+ "Other ({n})": ["その他({n})","其他({n})","其他({n})","Otros ({n})","Autres ({n})","Sonstige ({n})","Altri ({n})","Outros ({n})"],
"Out of the sidebar, still searchable and linkable": ["サイドバーから外れますが、検索もリンクもできます","移出侧边栏,仍可搜索和链接","移出側邊欄,仍可搜尋與連結","Fuera de la barra lateral, pero aún se puede buscar y enlazar","Hors de la barre latérale, toujours dans la recherche et les liens","Weg aus der Seitenleiste, weiterhin auffindbar und verlinkbar","Fuori dalla barra laterale, ma sempre ricercabile e collegabile","Fora da barra lateral, mas continua pesquisável e ligável"],
"Outlined": ["枠線","描边","描邊","Con contorno","Contour","Umrandet","Contornato","Contornado"],
"Owner": ["オーナー","所有者","擁有者","Propietario","Propriétaire","Eigentümer","Proprietario","Dono"],
@@ -598,6 +603,8 @@ export const PACKED: Record<string, ReadonlyArray<string | 0>> = {
"Show as a gallery": ["ギャラリーで表示","以图库显示","以圖庫顯示","Mostrar como galería","Afficher en galerie","Als Galerie anzeigen","Mostra come galleria","Mostrar como galeria"],
"Show as a list": ["リストで表示","以列表显示","以清單顯示","Mostrar como lista","Afficher en liste","Als Liste anzeigen","Mostra come elenco","Mostrar como lista"],
"Show as a table": ["テーブルで表示","以表格显示","以表格顯示","Mostrar como tabla","Afficher en tableau","Als Tabelle anzeigen","Mostra come tabella","Mostrar como tabela"],
+ "Show as a timeline": ["タイムラインで表示","以时间线显示","以時間軸顯示","Mostrar como línea de tiempo","Afficher en chronologie","Als Zeitleiste anzeigen","Mostra come timeline","Mostrar como linha de tempo"],
+ "Show as a workload chart": ["作業量グラフで表示","以工作量图表显示","以工作量圖表顯示","Mostrar como gráfico de carga","Afficher en graphique de charge","Als Auslastungsdiagramm anzeigen","Mostra come grafico del carico","Mostrar como gráfico de carga"],
"Show or hide properties": ["プロパティの表示・非表示","显示或隐藏属性","顯示或隱藏屬性","Mostrar u ocultar las propiedades","Afficher ou masquer les propriétés","Eigenschaften ein- oder ausblenden","Mostra o nascondi le proprietà","Mostrar ou ocultar as propriedades"],
"Show or hide the page list": ["ページ一覧の表示・非表示","显示或隐藏页面列表","顯示或隱藏頁面清單","Mostrar u ocultar la lista de páginas","Afficher ou masquer la liste des pages","Seitenliste ein- oder ausblenden","Mostra o nascondi l’elenco delle pagine","Mostrar ou ocultar a lista de páginas"],
"Show playback controls to the reader": ["読み手に再生コントロールを表示する","向读者显示播放控件","向讀者顯示播放控制項","Mostrar los controles de reproducción a quien lee","Afficher les contrôles de lecture au lecteur","Wiedergabesteuerung für Lesende anzeigen","Mostra i controlli di riproduzione a chi legge","Mostrar os controlos de reprodução a quem lê"],
@@ -726,6 +733,7 @@ export const PACKED: Record<string, ReadonlyArray<string | 0>> = {
"Title weight": ["タイトルの太さ","标题字重","標題字重","Peso del título","Graisse du titre","Stärke des Titels","Peso del titolo","Peso do título"],
"To-do": ["チェックリスト","待办事项","待辦事項","Tarea","Tâche","Aufgabe","Attività","Tarefa"],
"Today": ["今日","今天","今天","Hoy","Aujourd’hui","Heute","Oggi","Hoje"],
+ "Today is outside this range": ["今日はこの範囲の外です","今天不在此范围内","今天不在此範圍內","Hoy queda fuera de este rango","Aujourd’hui est hors de cette plage","Heute liegt außerhalb dieses Zeitraums","Oggi è fuori da questo intervallo","Hoje está fora deste intervalo"],
"Today's journal": ["今日のジャーナル","今天的日志","今天的日誌","Diario de hoy","Journal du jour","Heutiges Journal","Diario di oggi","Diário de hoje"],
"Toggle": ["トグル","折叠块","摺疊區塊","Bloque plegable","Bloc dépliant","Klappblock","Blocco richiudibile","Bloco recolhível"],
"Toggle section": ["セクションの開閉","展开或收起此节","展開或收合此節","Mostrar u ocultar la sección","Afficher ou masquer la section","Abschnitt auf- oder zuklappen","Mostra o nascondi la sezione","Mostrar ou ocultar a secção"],
@@ -738,6 +746,7 @@ export const PACKED: Record<string, ReadonlyArray<string | 0>> = {
"Type / for blocks, [[ to link a page": ["/ でブロック、[[ でページにリンク","输入 / 插入块,[[ 链接页面","輸入 / 插入區塊,輸入 [[ 連結頁面","Escribe / para bloques, [[ para enlazar una página","Tapez / pour les blocs, [[ pour lier une page","Tippe / für Blöcke, [[ für einen Seitenlink","Digita / per i blocchi, [[ per collegare una pagina","Escreva / para blocos, [[ para ligar uma página"],
"Typescript": ["タイプ原稿","打字稿","打字稿","Mecanoscrito","Tapuscrit","Typoskript","Dattiloscritto","Datiloscrito"],
"Typewriter": ["タイプライター","打字机","打字機","Máquina de escribir","Machine à écrire","Schreibmaschine","Macchina da scrivere","Máquina de escrever"],
+ "Unassigned": ["担当者なし","未指派","未指派","Sin asignar","Non attribué","Nicht zugewiesen","Non assegnato","Sem responsável"],
"Underline": ["下線","下划线","底線","Subrayado","Souligné","Unterstrichen","Sottolineato","Sublinhado"],
"Underline — ⌘U": ["下線 — ⌘U","下划线 — ⌘U","底線 — ⌘U","Subrayado — ⌘U","Souligné — ⌘U","Unterstrichen — ⌘U","Sottolineato — ⌘U","Sublinhado — ⌘U"],
"Underlined": ["下線","下划线","底線","Subrayado","Souligné","Unterstrichen","Sottolineato","Sublinhado"],
@@ -828,6 +837,7 @@ export const PACKED: Record<string, ReadonlyArray<string | 0>> = {
"none": ["なし","无","無","ninguna","aucun","keine","nessuno","nenhuma"],
"you": ["あなた","你","你","tú","vous","du","tu","você"],
"you: {name} ✎": ["あなた: {name} ✎","你:{name} ✎","你:{name} ✎","tú: {name} ✎","vous : {name} ✎","Sie: {name} ✎","tu: {name} ✎","você: {name} ✎"],
+ "{a} to {b} — the end is before the start": ["{a} 〜 {b} — 終了日が開始日より前です","{a} 至 {b} — 结束日期早于开始日期","{a} 至 {b} — 結束日期早於開始日期","{a} a {b} — el fin es anterior al inicio","{a} à {b} — la fin est avant le début","{a} bis {b} — das Ende liegt vor dem Anfang","{a} – {b} — la fine è prima dell’inizio","{a} a {b} — o fim é anterior ao início"],
"{field} {op}": ["{field} が {op}","{field} {op}","{field} {op}","{field} {op}","{field} {op}","{field} {op}","{field} {op}","{field} {op}"],
"{field} {op} {value}": ["{field} が {value} {op}","{field} {op} {value}","{field} {op} {value}","{field} {op} {value}","{field} {op} {value}","{field} {op} {value}","{field} {op} {value}","{field} {op} {value}"],
"{i} of {n}": ["{i} / {n}","第 {i} 个,共 {n} 个","{i} / {n}","{i} de {n}","{i} sur {n}","{i} von {n}","{i} di {n}","{i} de {n}"],
@@ -848,11 +858,14 @@ export const PACKED: Record<string, ReadonlyArray<string | 0>> = {
"{n} image(s) go with them; the rest stay here.": ["{n} 件の画像が一緒に移動し、残りはここに残ります。","{n} 张图片会一起带走,其余留在这里。","{n} 張圖片會一起帶走,其餘留在這裡。","{n} imagen(es) van con ellas; el resto se queda aquí.","{n} image(s) partent avec elles ; les autres restent ici.","{n} Bild(er) gehen mit; der Rest bleibt hier.","{n} immagine/i vanno con esse; il resto resta qui.","{n} imagem(ns) vão com elas; as restantes ficam aqui."],
"{n} image(s) point at the web. Nothing loads until a reader asks.": ["{n} 個の画像はウェブを指しています。読み手が求めるまで何も読み込みません。","{n} 张图片指向网络。在读者主动请求之前不会加载。","{n} 張圖片指向網路。在讀者主動要求之前不會載入。","{n} imagen(es) apuntan a la web. No se carga nada hasta que un lector lo pida.","{n} image(s) pointent vers le web. Rien ne se charge tant qu’un lecteur ne le demande pas.","{n} Bild(er) zeigen ins Web. Nichts wird geladen, bevor ein Leser darum bittet.","{n} immagini puntano al web. Non si carica nulla finché un lettore non lo chiede.","{n} imagem(ns) apontam para a web. Nada é carregado até um leitor pedir."],
"{n} image(s) were left as paths because embedding stopped there.": ["{n} 個の画像は、そこで埋め込みを止めたためパスのまま残りました。","{n} 张图片以路径形式保留,因为嵌入到此为止。","{n} 張圖片以路徑形式保留,因為嵌入到此為止。","{n} imagen(es) quedaron como rutas porque la incrustación se detuvo ahí.","{n} image(s) restent sous forme de chemin, l’intégration s’étant arrêtée là.","{n} Bild(er) blieben als Pfad stehen, weil das Einbetten dort endete.","{n} immagini restano come percorsi perché l’incorporamento si è fermato lì.","{n} imagem(ns) ficaram como caminhos porque a incorporação parou aí."],
+ "{n} left out: not a number": ["{n} 件は数値ではないため除外","有 {n} 个不是数字,已排除","有 {n} 個不是數字,已排除","{n} excluidos: no son un número","{n} écartés : pas un nombre","{n} ausgelassen: keine Zahl","{n} esclusi: non sono numeri","{n} de fora: não são números"],
"{n} link to this page": ["このページへのリンク {n} 件","{n} 个链接指向此页","{n} 個連結指向此頁","{n} enlace a esta página","{n} lien vers cette page","{n} Link auf diese Seite","{n} link a questa pagina","{n} ligação para esta página"],
"{n} link(s) named pages that were not in that file, and are kept as text.": ["{n} 件のリンクはそのファイルに無いページを指していたため、テキストとして残しました。","有 {n} 个链接指向该文件中不存在的页面,已保留为文字。","有 {n} 個連結指向該檔案中不存在的頁面,已保留為文字。","{n} enlace(s) nombraban páginas que no estaban en ese archivo y se conservan como texto.","{n} lien(s) nommaient des pages absentes de ce fichier et sont conservés en texte.","{n} Link(s) nannten Seiten, die nicht in dieser Datei waren, und bleiben als Text erhalten.","{n} collegamento/i nominavano pagine non presenti in quel file e restano come testo.","{n} ligação(ões) nomeavam páginas que não estavam nesse ficheiro e ficam como texto."],
"{n} link(s) point outside them and are kept as text naming the page they meant.": ["{n} 件のリンクは外を指しているため、指していたページ名を残したテキストになります。","有 {n} 个链接指向其外部,将保留为写明原目标页面的文字。","有 {n} 個連結指向其外部,將保留為寫明原目標頁面的文字。","{n} enlace(s) apuntan fuera y se conservan como texto que nombra la página a la que se referían.","{n} lien(s) pointent en dehors et sont conservés en texte, avec le nom de la page visée.","{n} Link(s) zeigen nach außen und bleiben als Text erhalten, der die gemeinte Seite nennt.","{n} collegamento/i puntano fuori e restano come testo che nomina la pagina a cui puntavano.","{n} ligação(ões) apontam para fora e ficam como texto que nomeia a página pretendida."],
"{n} link(s) to it will stop working.": ["このページへのリンク {n} 件が機能しなくなります。","指向它的 {n} 个链接会失效。","指向它的 {n} 個連結將會失效。","{n} enlace(s) a ella dejarán de funcionar.","{n} lien(s) vers elle ne fonctionneront plus.","{n} Links darauf funktionieren nicht mehr.","{n} collegamenti a questa pagina smetteranno di funzionare.","{n} ligação(ões) para ela deixam de funcionar."],
"{n} links to this page": ["このページへのリンク {n} 件","{n} 个链接指向此页","{n} 個連結指向此頁","{n} enlaces a esta página","{n} liens vers cette page","{n} Links auf diese Seite","{n} link a questa pagina","{n} ligações para esta página"],
+ "{n} more grouped as Other": ["他 {n} 件は「その他」にまとめました","另有 {n} 项归入“其他”","另有 {n} 項歸入「其他」","{n} más agrupados en Otros","{n} de plus regroupés dans Autres","{n} weitere unter „Sonstige“ zusammengefasst","Altri {n} raggruppati in Altri","Mais {n} agrupados em Outros"],
+ "{n} more not shown": ["他 {n} 件は表示していません","还有 {n} 项未显示","還有 {n} 項未顯示","{n} más sin mostrar","{n} de plus non affichés","{n} weitere nicht angezeigt","Altri {n} non mostrati","Mais {n} não mostrados"],
"{n} note name(s) appear more than once, so links naming them all went to the first.": ["{n} 件のノート名が重複しているため、その名前のリンクはすべて最初のノートに向いています。","有 {n} 个笔记名称重复,因此指向该名称的链接都指向了第一个。","有 {n} 個筆記名稱重複,因此指向該名稱的連結都指向了第一個。","{n} nombre(s) de nota se repiten, así que los enlaces con ese nombre fueron todos al primero.","{n} nom(s) de note apparaissent plusieurs fois : les liens portant ce nom pointent tous vers le premier.","{n} Notiznamen kommen mehrfach vor — Links mit diesem Namen führen alle zur ersten.","{n} nome/i di nota compaiono più volte, quindi i link con quel nome puntano tutti al primo.","{n} nome(s) de nota aparecem mais de uma vez, por isso as ligações com esse nome foram todas para a primeira."],
"{n} of {total} wikilink(s) resolved.": ["{total} 個のウィキリンクのうち {n} 個を解決しました。","{total} 个 wiki 链接中解析了 {n} 个。","{total} 個 wiki 連結中解析了 {n} 個。","{n} de {total} wikilink(s) resueltos.","{n} wikilien(s) sur {total} résolus.","{n} von {total} Wikilink(s) aufgelöst.","{n} wikilink su {total} risolti.","{n} de {total} wikilink(s) resolvidos."],
"{n} page(s) arrived with a design of their own.": ["{n} 件のページが独自のデザイン付きで取り込まれました。","{n} 个页面带着自己的设计导入。","{n} 個頁面帶著自己的設計匯入。","{n} página(s) llegaron con un diseño propio.","{n} page(s) sont arrivées avec un design qui leur est propre.","{n} Seite(n) kamen mit einer eigenen Gestaltung.","{n} pagina/e sono arrivate con un design proprio.","{n} página(s) chegaram com um design próprio."],
@@ -863,6 +876,9 @@ export const PACKED: Record<string, ReadonlyArray<string | 0>> = {
"{n} slide(s).": ["スライド {n} 枚。","{n} 张幻灯片。","{n} 張投影片。","{n} diapositiva(s).","{n} diapositive(s).","{n} Folie(n).","{n} diapositiva/e.","{n} slide(s)."],
"{n} table(s) imported, with their column alignment.": ["{n} 個の表を取り込みました(列の配置も含みます)。","已导入 {n} 个表格,并保留列对齐方式。","已匯入 {n} 個表格,並保留欄位對齊方式。","{n} tabla(s) importada(s), con la alineación de sus columnas.","{n} tableau(x) importé(s), avec l’alignement de leurs colonnes.","{n} Tabelle(n) importiert, samt Spaltenausrichtung.","{n} tabella/e importata/e, con l’allineamento delle colonne.","{n} tabela(s) importada(s), com o alinhamento das colunas."],
"{n} unresolved comment(s)": ["未解決のコメント {n} 件","{n} 条未解决的评论","{n} 則未解決的註解","{n} comentario(s) sin resolver","{n} commentaire(s) non résolu(s)","{n} offene(r) Kommentar(e)","{n} commento/i non risolto/i","{n} comentário(s) não resolvido(s)"],
+ "{n} with no date": ["{n} 件は日付なし","{n} 项没有日期","{n} 項沒有日期","{n} sin fecha","{n} sans date","{n} ohne Datum","{n} senza data","{n} sem data"],
+ "{n} with no estimate": ["{n} 件は見積もりなし","{n} 项没有估点","{n} 項沒有估點","{n} sin estimación","{n} sans estimation","{n} ohne Schätzung","{n} senza stima","{n} sem estimativa"],
+ "{n} with the end before the start": ["{n} 件は終了日が開始日より前","{n} 项的结束日期早于开始日期","{n} 項的結束日期早於開始日期","{n} con el fin antes del inicio","{n} avec la fin avant le début","{n} mit dem Ende vor dem Anfang","{n} con la fine prima dell’inizio","{n} com o fim antes do início"],
"{n} word": ["{n} 語","{n} 个词","{n} 個詞","{n} palabra","{n} mot","{n} Wort","{n} parola","{n} palavra"],
"{n} words": ["{n} 語","{n} 个词","{n} 個詞","{n} palabras","{n} mots","{n} Wörter","{n} parole","{n} palavras"],
"{n}d ago": ["{n}日前","{n} 天前","{n} 天前","hace {n} d","il y a {n} j","vor {n} T","{n} g fa","há {n}d"],
diff --git a/spaces/src/i18n/pt.ts b/spaces/src/i18n/pt.ts
index dc849ad0..a247cd11 100644
--- a/spaces/src/i18n/pt.ts
+++ b/spaces/src/i18n/pt.ts
@@ -31,7 +31,9 @@ export const pt: Catalog = {
"A space is never a dead end: the whole document is plain JSON in this file, and every page exports as Markdown.": "Um espaço nunca é um beco sem saída: todo o documento é JSON simples dentro deste ficheiro e todas as páginas se exportam para Markdown.",
"A space needs at least one page": "Um espaço precisa de pelo menos uma página",
"A still frame, shown before play — and what a printout or a file preview shows": "Uma imagem fixa, mostrada antes da reprodução — e é o que aparece na impressão e na pré-visualização do ficheiro",
+ "A timeline needs a date field. Add one and it appears here.": "Uma linha de tempo precisa de um campo de data. Adiciona um e aparece aqui.",
"A typed value on this page": "Um valor tipado nesta página",
+ "A workload chart adds up a number field. This space has none.": "Um gráfico de carga soma um campo numérico. Este espaço não tem nenhum.",
"About bento/spaces — version, updates, language, password": "Acerca do bento/spaces — versão, atualizações, idioma, palavra-passe",
"About this space": "Sobre este espaço",
"Access reset — only copies saved from now on can join": "Acesso redefinido — apenas cópias salvas de agora em diante podem entrar",
@@ -106,6 +108,7 @@ export const pt: Catalog = {
"Choose a folder…": "Escolher uma pasta…",
"Choose a password. There is no way to recover it.": "Escolha uma palavra-passe. Não há forma de a recuperar.",
"Choose a space…": "Escolher um espaço…",
+ "Choose the field the bars come from": "Escolha o campo de onde vêm as barras",
"Choose the field the columns come from": "Escolha o campo de onde vêm as colunas",
"Choose the order": "Escolha a ordem",
"Choose which pages this view holds": "Escolhe que páginas esta vista contém",
@@ -319,6 +322,7 @@ export const pt: Catalog = {
"No field here has options to group by": "Nenhum campo aqui tem opções para agrupar",
"No issues match this filter.": "Nenhuma tarefa corresponde a este filtro.",
"No issues yet. Add a status field to any page and it appears here.": "Ainda não há tarefas. Adiciona um campo de estado a qualquer página e ela aparece aqui.",
+ "No page here has a date yet.": "Ainda nenhuma página aqui tem data.",
"No page matches": "Nenhuma página corresponde",
"No pages yet": "Ainda sem páginas",
"No tags match": "Nenhuma etiqueta corresponde",
@@ -352,6 +356,8 @@ export const pt: Catalog = {
"Open only": "Apenas em aberto",
"Orange": "Laranja",
"Other": "Outras",
+ "Other ({n})": "Outros ({n})",
+ "Other ways to save": "Outras formas de guardar",
"Out of the sidebar, still searchable and linkable": "Fora da barra lateral, mas continua pesquisável e ligável",
"Owner": "Dono",
"Page": "Página",
@@ -462,6 +468,8 @@ export const pt: Catalog = {
"Show as a board": "Mostrar como quadro",
"Show as a gallery": "Mostrar como galeria",
"Show as a list": "Mostrar como lista",
+ "Show as a timeline": "Mostrar como linha de tempo",
+ "Show as a workload chart": "Mostrar como gráfico de carga",
"Show as a table": "Mostrar como tabela",
"Show or hide properties": "Mostrar ou ocultar as propriedades",
"Show or hide the page list": "Mostrar ou ocultar a lista de páginas",
@@ -558,10 +566,12 @@ export const pt: Catalog = {
"This window is still running v{v}. If you overwrote the file that's open here, reload; otherwise open the file you saved.": "Esta janela ainda está executando a v{v}. Se você sobrescreveu o arquivo aberto aqui, recarregue; caso contrário, abra o arquivo que salvou.",
"This window keeps running v{v} until you open the downloaded file.": "Esta janela continua executando a v{v} até você abrir o arquivo baixado.",
"Those files could not be read": "Não foi possível ler esses ficheiros",
+ "Timeline": "Linha do tempo",
"Tip": "Dica",
"Title": "Título",
"To-do": "Tarefa",
"Today": "Hoje",
+ "Today is outside this range": "Hoje está fora deste intervalo",
"Today's journal": "Diário de hoje",
"Toggle": "Bloco recolhível",
"Toggle section": "Mostrar ou ocultar a secção",
@@ -570,6 +580,7 @@ export const pt: Catalog = {
"Top level": "Nível superior",
"Turn into…": "Converter em…",
"Type / for blocks, [[ to link a page": "Escreva / para blocos, [[ para ligar uma página",
+ "Unassigned": "Sem responsável",
"Underline": "Sublinhado",
"Underline — ⌘U": "Sublinhado — ⌘U",
"Undo": "Desfazer",
@@ -614,6 +625,7 @@ export const pt: Catalog = {
"Width in the text column": "Largura na coluna de texto",
"Windows on this computer still sync; turn offline mode off in About to work with someone elsewhere.": "As janelas neste computador continuam sincronizando; desative o modo offline em Sobre para trabalhar com alguém em outro lugar.",
"Words": "Palavras",
+ "Workload": "Carga de trabalho",
"Writing": "Escrever",
"Write {{date}} anywhere and each new page gets its own date there.": "Escreve {{date}} em qualquer sítio e cada página nova coloca aí a sua própria data.",
"Wrong password — try again": "Palavra-passe incorreta — tente novamente",
@@ -632,6 +644,7 @@ export const pt: Catalog = {
"none": "nenhuma",
"you": "você",
"you: {name} ✎": "você: {name} ✎",
+ "{a} to {b} — the end is before the start": "{a} a {b} — o fim é anterior ao início",
"{blocks} blocks · {words} words · {links} links in": "{blocks} blocos · {words} palavras · {links} ligações a apontar",
"{i} of {n}": "{i} de {n}",
"{name} joined": "{name} entrou",
@@ -650,10 +663,13 @@ export const pt: Catalog = {
"{n} image(s) go with them; the rest stay here.": "{n} imagem(ns) vão com elas; as restantes ficam aqui.",
"{n} image(s) point at the web. Nothing loads until a reader asks.": "{n} imagem(ns) apontam para a web. Nada é carregado até um leitor pedir.",
"{n} image(s) were left as paths because embedding stopped there.": "{n} imagem(ns) ficaram como caminhos porque a incorporação parou aí.",
- "{n} link to this page": "{n} ligação para esta página",
+ "{n} left out: not a number": "{n} de fora: não são números",
"{n} link(s) named pages that were not in that file, and are kept as text.": "{n} ligação(ões) nomeavam páginas que não estavam nesse ficheiro e ficam como texto.",
"{n} link(s) point outside them and are kept as text naming the page they meant.": "{n} ligação(ões) apontam para fora e ficam como texto que nomeia a página pretendida.",
"{n} link(s) to it will stop working.": "{n} ligação(ões) para ela deixam de funcionar.",
+ "{n} more grouped as Other": "Mais {n} agrupados em Outros",
+ "{n} more not shown": "Mais {n} não mostrados",
+ "{n} link to this page": "{n} ligação para esta página",
"{n} links to this page": "{n} ligações para esta página",
"{n} note name(s) appear more than once, so links naming them all went to the first.": "{n} nome(s) de nota aparecem mais de uma vez, por isso as ligações com esse nome foram todas para a primeira.",
"{n} of {total} wikilink(s) resolved.": "{n} de {total} wikilink(s) resolvidos.",
@@ -664,6 +680,9 @@ export const pt: Catalog = {
"{n} table(s) imported, with their column alignment.": "{n} tabela(s) importada(s), com o alinhamento das colunas.",
"{n} table(s) kept as text: there is no table block in this format yet.": "{n} tabela(s) ficaram como texto: este formato ainda não tem bloco de tabela.",
"{n} unresolved comment(s)": "{n} comentário(s) não resolvido(s)",
+ "{n} with no date": "{n} sem data",
+ "{n} with no estimate": "{n} sem estimativa",
+ "{n} with the end before the start": "{n} com o fim antes do início",
"{n} word": "{n} palavra",
"{n} words": "{n} palavras",
"{n}d ago": "há {n}d",
@@ -676,7 +695,6 @@ export const pt: Catalog = {
"⌘Z removes the imported pages again.": "⌘Z remove novamente as páginas importadas.",
"Calendar": "Calendário",
"Show as a calendar": "Ver como calendário",
- "Timeline": "Linha do tempo",
"Month": "Mês",
"Show a month at a time": "Mostrar um mês de cada vez",
"Show a timeline": "Mostrar uma linha do tempo",
@@ -901,7 +919,6 @@ export const pt: Catalog = {
"Add a view of the issues in this space — a board, a list, a table or a gallery": "Adicionar uma vista das tarefas deste espaço — um quadro, uma lista, uma tabela ou uma galeria",
"Add a code block": "Adicionar um bloco de código",
"Add another page’s content, kept in step with it": "Adicionar o conteúdo de outra página, sempre em sincronia com ela",
- "Workload": "Carga de trabalho",
"Chart": "Gráfico",
"Embed": "Incorporação",
"View": "Vista",
diff --git a/spaces/src/i18n/zh-Hans.ts b/spaces/src/i18n/zh-Hans.ts
index 399b00c0..8257ecb8 100644
--- a/spaces/src/i18n/zh-Hans.ts
+++ b/spaces/src/i18n/zh-Hans.ts
@@ -31,7 +31,9 @@ export const zh_Hans: Catalog = {
"A space is never a dead end: the whole document is plain JSON in this file, and every page exports as Markdown.": "空间绝不是死胡同:整个文档就是这个文件里的纯 JSON,每个页面都能导出为 Markdown。",
"A space needs at least one page": "空间至少要有一个页面",
"A still frame, shown before play — and what a printout or a file preview shows": "播放前显示的静帧 — 打印和文件预览中显示的也是它",
+ "A timeline needs a date field. Add one and it appears here.": "时间线需要一个日期字段。添加之后就会显示在这里。",
"A typed value on this page": "此页面上的类型化值",
+ "A workload chart adds up a number field. This space has none.": "工作量图表会汇总一个数字字段。这个空间还没有数字字段。",
"About bento/spaces — version, updates, language, password": "关于 bento/spaces — 版本、更新、语言、密码",
"About this space": "关于此空间",
"Access reset — only copies saved from now on can join": "访问已重置 — 只有此后保存的副本才能加入",
@@ -106,6 +108,7 @@ export const zh_Hans: Catalog = {
"Choose a folder…": "选择文件夹…",
"Choose a password. There is no way to recover it.": "设置一个密码。它无法找回。",
"Choose a space…": "选择一个空间…",
+ "Choose the field the bars come from": "选择用作柱形的字段",
"Choose the field the columns come from": "选择用作分栏的字段",
"Choose the order": "选择排序方式",
"Choose which pages this view holds": "选择此视图包含哪些页面",
@@ -319,6 +322,7 @@ export const zh_Hans: Catalog = {
"No field here has options to group by": "这里没有可用于分组的选项字段",
"No issues match this filter.": "没有符合此筛选条件的事项。",
"No issues yet. Add a status field to any page and it appears here.": "还没有事项。给任意页面添加状态字段,它就会出现在这里。",
+ "No page here has a date yet.": "这里还没有任何页面带有日期。",
"No page matches": "没有匹配的页面",
"No pages yet": "还没有页面",
"No tags match": "没有匹配的标签",
@@ -352,6 +356,8 @@ export const zh_Hans: Catalog = {
"Open only": "仅未完成",
"Orange": "橙色",
"Other": "其他",
+ "Other ({n})": "其他({n})",
+ "Other ways to save": "其他保存方式",
"Out of the sidebar, still searchable and linkable": "移出侧边栏,仍可搜索和链接",
"Owner": "所有者",
"Page": "页面",
@@ -462,6 +468,8 @@ export const zh_Hans: Catalog = {
"Show as a board": "以看板显示",
"Show as a gallery": "以图库显示",
"Show as a list": "以列表显示",
+ "Show as a timeline": "以时间线显示",
+ "Show as a workload chart": "以工作量图表显示",
"Show as a table": "以表格显示",
"Show or hide properties": "显示或隐藏属性",
"Show or hide the page list": "显示或隐藏页面列表",
@@ -558,10 +566,12 @@ export const zh_Hans: Catalog = {
"This window is still running v{v}. If you overwrote the file that's open here, reload; otherwise open the file you saved.": "此窗口仍在运行 v{v}。若覆盖了当前打开的文件请重新加载;否则请打开您保存的文件。",
"This window keeps running v{v} until you open the downloaded file.": "在打开下载的文件之前,此窗口将继续运行 v{v}。",
"Those files could not be read": "这些文件无法读取",
+ "Timeline": "时间线",
"Tip": "提示",
"Title": "标题",
"To-do": "待办事项",
"Today": "今天",
+ "Today is outside this range": "今天不在此范围内",
"Today's journal": "今天的日志",
"Toggle": "折叠块",
"Toggle section": "展开或收起此节",
@@ -570,6 +580,7 @@ export const zh_Hans: Catalog = {
"Top level": "顶层",
"Turn into…": "转换为…",
"Type / for blocks, [[ to link a page": "输入 / 插入块,[[ 链接页面",
+ "Unassigned": "未指派",
"Underline": "下划线",
"Underline — ⌘U": "下划线 — ⌘U",
"Undo": "撤销",
@@ -614,6 +625,7 @@ export const zh_Hans: Catalog = {
"Width in the text column": "在正文栏中的宽度",
"Windows on this computer still sync; turn offline mode off in About to work with someone elsewhere.": "本机的窗口仍会同步;要与其他地方的人协作,请在“关于”中关闭离线模式。",
"Words": "字数",
+ "Workload": "工作量",
"Writing": "写作",
"Write {{date}} anywhere and each new page gets its own date there.": "在任意位置写上 {{date}},每个新页面都会在那里填入自己的日期。",
"Wrong password — try again": "密码错误 — 请重试",
@@ -632,6 +644,7 @@ export const zh_Hans: Catalog = {
"none": "无",
"you": "你",
"you: {name} ✎": "你:{name} ✎",
+ "{a} to {b} — the end is before the start": "{a} 至 {b} — 结束日期早于开始日期",
"{blocks} blocks · {words} words · {links} links in": "{blocks} 个块 · {words} 个词 · {links} 个入链",
"{i} of {n}": "第 {i} 个,共 {n} 个",
"{name} joined": "{name} 已加入",
@@ -650,10 +663,13 @@ export const zh_Hans: Catalog = {
"{n} image(s) go with them; the rest stay here.": "{n} 张图片会一起带走,其余留在这里。",
"{n} image(s) point at the web. Nothing loads until a reader asks.": "{n} 张图片指向网络。在读者主动请求之前不会加载。",
"{n} image(s) were left as paths because embedding stopped there.": "{n} 张图片以路径形式保留,因为嵌入到此为止。",
- "{n} link to this page": "{n} 个链接指向此页",
+ "{n} left out: not a number": "有 {n} 个不是数字,已排除",
"{n} link(s) named pages that were not in that file, and are kept as text.": "有 {n} 个链接指向该文件中不存在的页面,已保留为文字。",
"{n} link(s) point outside them and are kept as text naming the page they meant.": "有 {n} 个链接指向其外部,将保留为写明原目标页面的文字。",
"{n} link(s) to it will stop working.": "指向它的 {n} 个链接会失效。",
+ "{n} more grouped as Other": "另有 {n} 项归入“其他”",
+ "{n} more not shown": "还有 {n} 项未显示",
+ "{n} link to this page": "{n} 个链接指向此页",
"{n} links to this page": "{n} 个链接指向此页",
"{n} note name(s) appear more than once, so links naming them all went to the first.": "有 {n} 个笔记名称重复,因此指向该名称的链接都指向了第一个。",
"{n} of {total} wikilink(s) resolved.": "{total} 个 wiki 链接中解析了 {n} 个。",
@@ -664,6 +680,9 @@ export const zh_Hans: Catalog = {
"{n} table(s) imported, with their column alignment.": "已导入 {n} 个表格,并保留列对齐方式。",
"{n} table(s) kept as text: there is no table block in this format yet.": "{n} 个表格按原文保留为文字:这个格式还没有表格块。",
"{n} unresolved comment(s)": "{n} 条未解决的评论",
+ "{n} with no date": "{n} 项没有日期",
+ "{n} with no estimate": "{n} 项没有估点",
+ "{n} with the end before the start": "{n} 项的结束日期早于开始日期",
"{n} word": "{n} 个词",
"{n} words": "{n} 个词",
"{n}d ago": "{n} 天前",
@@ -676,7 +695,6 @@ export const zh_Hans: Catalog = {
"⌘Z removes the imported pages again.": "按 ⌘Z 可以把导入的页面再撤销掉。",
"Calendar": "日历",
"Show as a calendar": "以日历显示",
- "Timeline": "时间线",
"Month": "月",
"Show a month at a time": "按月显示",
"Show a timeline": "以时间线显示",
@@ -901,7 +919,6 @@ export const zh_Hans: Catalog = {
"Add a view of the issues in this space — a board, a list, a table or a gallery": "添加此空间中事项的视图 — 看板、列表、表格或图库",
"Add a code block": "添加代码块",
"Add another page’s content, kept in step with it": "添加另一个页面的内容,并与其保持同步",
- "Workload": "工作量",
"Chart": "图表",
"Embed": "嵌入",
"View": "视图",
diff --git a/spaces/src/i18n/zh-Hant.ts b/spaces/src/i18n/zh-Hant.ts
index 43623917..61d7a97d 100644
--- a/spaces/src/i18n/zh-Hant.ts
+++ b/spaces/src/i18n/zh-Hant.ts
@@ -31,7 +31,9 @@ export const zh_Hant: Catalog = {
"A space is never a dead end: the whole document is plain JSON in this file, and every page exports as Markdown.": "空間永遠不會是死路:整份文件就是此檔案中的純 JSON,每個頁面也都能匯出成 Markdown。",
"A space needs at least one page": "空間至少要有一個頁面",
"A still frame, shown before play — and what a printout or a file preview shows": "播放前顯示的靜態畫面 — 列印和檔案預覽顯示的也是它",
+ "A timeline needs a date field. Add one and it appears here.": "時間軸需要一個日期欄位。新增之後就會顯示在這裡。",
"A typed value on this page": "此頁面上的型別值",
+ "A workload chart adds up a number field. This space has none.": "工作量圖表會彙總一個數字欄位。這個空間還沒有數字欄位。",
"About bento/spaces — version, updates, language, password": "關於 bento/spaces — 版本、更新、語言、密碼",
"About this space": "關於此空間",
"Access reset — only copies saved from now on can join": "存取已重設 — 只有此後儲存的副本才能加入",
@@ -106,6 +108,7 @@ export const zh_Hant: Catalog = {
"Choose a folder…": "選擇資料夾…",
"Choose a password. There is no way to recover it.": "請設定密碼。沒有任何方法可以找回它。",
"Choose a space…": "選擇一個空間…",
+ "Choose the field the bars come from": "選擇作為長條的欄位",
"Choose the field the columns come from": "選擇作為欄的欄位",
"Choose the order": "選擇排序方式",
"Choose which pages this view holds": "選擇此檢視包含哪些頁面",
@@ -319,6 +322,7 @@ export const zh_Hant: Catalog = {
"No field here has options to group by": "這裡沒有可用於分組的選項欄位",
"No issues match this filter.": "沒有符合此篩選條件的項目。",
"No issues yet. Add a status field to any page and it appears here.": "還沒有項目。為任一頁面新增狀態欄位,它就會出現在這裡。",
+ "No page here has a date yet.": "這裡還沒有任何頁面帶有日期。",
"No page matches": "沒有相符的頁面",
"No pages yet": "尚無頁面",
"No tags match": "沒有相符的標籤",
@@ -352,6 +356,8 @@ export const zh_Hant: Catalog = {
"Open only": "僅未完成",
"Orange": "橘色",
"Other": "其他",
+ "Other ({n})": "其他({n})",
+ "Other ways to save": "其他儲存方式",
"Out of the sidebar, still searchable and linkable": "移出側邊欄,仍可搜尋與連結",
"Owner": "擁有者",
"Page": "頁面",
@@ -462,6 +468,8 @@ export const zh_Hant: Catalog = {
"Show as a board": "以看板顯示",
"Show as a gallery": "以圖庫顯示",
"Show as a list": "以清單顯示",
+ "Show as a timeline": "以時間軸顯示",
+ "Show as a workload chart": "以工作量圖表顯示",
"Show as a table": "以表格顯示",
"Show or hide properties": "顯示或隱藏屬性",
"Show or hide the page list": "顯示或隱藏頁面清單",
@@ -558,10 +566,12 @@ export const zh_Hant: Catalog = {
"This window is still running v{v}. If you overwrote the file that's open here, reload; otherwise open the file you saved.": "此視窗仍在執行 v{v}。若已覆寫目前開啟的檔案請重新載入;否則請開啟您儲存的檔案。",
"This window keeps running v{v} until you open the downloaded file.": "在開啟下載的檔案之前,此視窗會維持在 v{v}。",
"Those files could not be read": "這些檔案無法讀取",
+ "Timeline": "時間軸",
"Tip": "提示",
"Title": "標題",
"To-do": "待辦事項",
"Today": "今天",
+ "Today is outside this range": "今天不在此範圍內",
"Today's journal": "今天的日誌",
"Toggle": "摺疊區塊",
"Toggle section": "展開或收合此節",
@@ -570,6 +580,7 @@ export const zh_Hant: Catalog = {
"Top level": "最上層",
"Turn into…": "轉換為…",
"Type / for blocks, [[ to link a page": "輸入 / 插入區塊,輸入 [[ 連結頁面",
+ "Unassigned": "未指派",
"Underline": "底線",
"Underline — ⌘U": "底線 — ⌘U",
"Undo": "還原",
@@ -614,6 +625,7 @@ export const zh_Hant: Catalog = {
"Width in the text column": "相對於文字欄的寬度",
"Windows on this computer still sync; turn offline mode off in About to work with someone elsewhere.": "本機的視窗仍會同步;要與其他地方的人協作,請在「關於」中關閉離線模式。",
"Words": "字數",
+ "Workload": "工作量",
"Writing": "書寫",
"Write {{date}} anywhere and each new page gets its own date there.": "在任意位置寫上 {{date}},每個新頁面都會在那裡填入自己的日期。",
"Wrong password — try again": "密碼錯誤 — 請重試",
@@ -632,6 +644,7 @@ export const zh_Hant: Catalog = {
"none": "無",
"you": "你",
"you: {name} ✎": "你:{name} ✎",
+ "{a} to {b} — the end is before the start": "{a} 至 {b} — 結束日期早於開始日期",
"{blocks} blocks · {words} words · {links} links in": "{blocks} 個區塊 · {words} 個詞 · {links} 個入連結",
"{i} of {n}": "{i} / {n}",
"{name} joined": "{name} 已加入",
@@ -650,10 +663,13 @@ export const zh_Hant: Catalog = {
"{n} image(s) go with them; the rest stay here.": "{n} 張圖片會一起帶走,其餘留在這裡。",
"{n} image(s) point at the web. Nothing loads until a reader asks.": "{n} 張圖片指向網路。在讀者主動要求之前不會載入。",
"{n} image(s) were left as paths because embedding stopped there.": "{n} 張圖片以路徑形式保留,因為嵌入到此為止。",
- "{n} link to this page": "{n} 個連結指向此頁",
+ "{n} left out: not a number": "有 {n} 個不是數字,已排除",
"{n} link(s) named pages that were not in that file, and are kept as text.": "有 {n} 個連結指向該檔案中不存在的頁面,已保留為文字。",
"{n} link(s) point outside them and are kept as text naming the page they meant.": "有 {n} 個連結指向其外部,將保留為寫明原目標頁面的文字。",
"{n} link(s) to it will stop working.": "指向它的 {n} 個連結將會失效。",
+ "{n} more grouped as Other": "另有 {n} 項歸入「其他」",
+ "{n} more not shown": "還有 {n} 項未顯示",
+ "{n} link to this page": "{n} 個連結指向此頁",
"{n} links to this page": "{n} 個連結指向此頁",
"{n} note name(s) appear more than once, so links naming them all went to the first.": "有 {n} 個筆記名稱重複,因此指向該名稱的連結都指向了第一個。",
"{n} of {total} wikilink(s) resolved.": "{total} 個 wiki 連結中解析了 {n} 個。",
@@ -664,6 +680,9 @@ export const zh_Hant: Catalog = {
"{n} table(s) imported, with their column alignment.": "已匯入 {n} 個表格,並保留欄位對齊方式。",
"{n} table(s) kept as text: there is no table block in this format yet.": "{n} 個表格按原文保留為文字:這個格式還沒有表格區塊。",
"{n} unresolved comment(s)": "{n} 則未解決的註解",
+ "{n} with no date": "{n} 項沒有日期",
+ "{n} with no estimate": "{n} 項沒有估點",
+ "{n} with the end before the start": "{n} 項的結束日期早於開始日期",
"{n} word": "{n} 個詞",
"{n} words": "{n} 個詞",
"{n}d ago": "{n} 天前",
@@ -676,7 +695,6 @@ export const zh_Hant: Catalog = {
"⌘Z removes the imported pages again.": "按 ⌘Z 可以把匯入的頁面再撤銷掉。",
"Calendar": "日曆",
"Show as a calendar": "以日曆顯示",
- "Timeline": "時間軸",
"Month": "月",
"Show a month at a time": "按月顯示",
"Show a timeline": "以時間軸顯示",
@@ -901,7 +919,6 @@ export const zh_Hant: Catalog = {
"Add a view of the issues in this space — a board, a list, a table or a gallery": "新增此空間中項目的檢視 — 看板、清單、表格或圖庫",
"Add a code block": "新增程式碼區塊",
"Add another page’s content, kept in step with it": "新增另一個頁面的內容,並與其保持同步",
- "Workload": "工作量",
"Chart": "圖表",
"Embed": "嵌入",
"View": "檢視",
diff --git a/spaces/src/preview.ts b/spaces/src/preview.ts
index e97fa1fc..37c9e05a 100644
--- a/spaces/src/preview.ts
+++ b/spaces/src/preview.ts
@@ -141,6 +141,16 @@ const SHEET = (doc: SpacesDoc): string => {
`.bp th,.bp td{border:1px solid #E3E8EF;padding:6px 9px;text-align:start;`,
`vertical-align:top;word-break:break-word}`,
`.bp th{background:#F5F7FA;font-weight:600}`,
+ // A CHART IS AN <svg> AND THE STILL KEEPS IT. It carries its own colours
+ // and geometry as presentation attributes (render.ts), so nothing about the
+ // picture depends on a rule in styles.css — which is the point, because
+ // styles.css is not loaded here. The engine asks for `height:100%` from its
+ // slides host; in this flowing column that is zero, so the aspect comes
+ // back from the viewBox.
+ // `!important` because the picture's own inline style carries a min-width
+ // that keeps its labels legible on a phone, and a thumbnail is narrower than
+ // any phone — inline loses to nothing else.
+ `.bp svg{max-width:100%;height:auto;display:block;min-width:0!important}`,
].join('')
}
diff --git a/spaces/src/render.ts b/spaces/src/render.ts
index a3cc009c..5559b91b 100644
--- a/spaces/src/render.ts
+++ b/spaces/src/render.ts
@@ -20,8 +20,15 @@ import {
fieldByKey, fieldsOf, optionOf, viewRows, headerLength, propBlockOf,
passesFilter, filterCount, unknownFilterKeys, unknownSourceKeys,
sortRows, unknownSortKeys, sortDirOf, layoutOf, nextLayout,
- type ViewSort, type FieldSpec, type ViewLayout,
+ type ViewSort, type FieldSpec, type ViewLayout, type IssueRow,
} from './fields'
+import { ganttModel } from './gantt.ts'
+import { workloadModel, workloadOption, bucketField } from './workload.ts'
+import { todayISO } from './journal.ts'
+// THE SHARED CHART ENGINE, from the kernel and not from this app. dash already
+// 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 { unknownFilterOps } from './query.ts'
import { answer, feed, freshContext, type CalcCtx } from './calc.ts'
@@ -1349,7 +1356,12 @@ function renderView(host: HTMLElement, b: Block, doc: SpacesDoc, opts: RenderOpt
// hardened and its comment said the label was safe; the label is rendered
// here, and this half had not been.
const here = layoutOf(layout)
- const asList = here !== 'board'
+ // WHICH SHAPES HAVE BUCKETS. A list, a table and a gallery have no columns,
+ // so "the field the columns come from" is not a question they can be asked.
+ // A workload chart's BARS are buckets — it is the same question with the
+ // same key and the same answer, which is the whole reason it is a layout
+ // here rather than a block with a vocabulary of its own.
+ const grouped = here === 'board' || here === 'workload'
// Three WHOLE sentences rather than one with the shape interpolated into
// it. "Show as a {what}" reads fine in English and breaks in half the
// catalogs, where the article and the adjective agree with the noun's
@@ -1365,12 +1377,13 @@ function renderView(host: HTMLElement, b: Block, doc: SpacesDoc, opts: RenderOpt
// fields.ts answers "which shape is this" and "what comes next".
const LAYOUT_LABEL: Record<ViewLayout, string> = {
board: t('Board'), list: t('List'), table: t('Table'), gallery: t('Gallery'),
- calendar: t('Calendar'),
+ calendar: t('Calendar'), gantt: t('Timeline'), workload: t('Workload'),
}
const NEXT_LABEL: Record<ViewLayout, string> = {
board: t('Show as a list'), list: t('Show as a table'),
table: t('Show as a gallery'), gallery: t('Show as a calendar'),
- calendar: t('Show as a board'),
+ calendar: t('Show as a timeline'), gantt: t('Show as a workload chart'),
+ workload: t('Show as a board'),
}
const layoutB = btn('viewLayout', LAYOUT_LABEL[here], NEXT_LABEL[here])
layoutB.dataset.next = nextLayout(here)
@@ -1389,8 +1402,17 @@ function renderView(host: HTMLElement, b: Block, doc: SpacesDoc, opts: RenderOpt
// GROUP BY. Only fields with declared options: a board's columns ARE the
// option list, so grouping by a free-text field would make one column per
// distinct string and call it a board.
- const groupB = btn('viewGroup', field ? `${t('Group')} · ${field.label}` : t('Group'),
- t('Choose the field the columns come from'))
+ // The button must name the field the view is ACTUALLY bucketed by, which
+ // for a workload chart with no stored `groupBy` is the person field and not
+ // `status` — saying "Group · Status" over a chart of people would be the
+ // control and the picture disagreeing, which is worse than no control.
+ const shown = here === 'workload' && !Object.hasOwn(b as object, 'groupBy')
+ ? bucketField(doc) : field
+ const groupB = btn('viewGroup', shown ? `${t('Group')} · ${shown.label}` : t('Group'),
+ here === 'workload'
+ ? t('Choose the field the bars come from')
+ : t('Choose the field the columns come from'))
+ groupB.dataset.shape = here
const sortKey = (Array.isArray(sort) ? sort : [])[0] as ViewSort | undefined
const sortField = sortKey && fieldByKey(doc, sortKey.key)
@@ -1425,7 +1447,7 @@ function renderView(host: HTMLElement, b: Block, doc: SpacesDoc, opts: RenderOpt
t('Choose which pages this view holds'), !!(hasKey || underId || tagKey))
head.append(layoutB, ...(spanB ? [spanB] : []), sourceB,
- ...(asList ? [] : [groupB]), sortB, openB, filterB)
+ ...(grouped ? [groupB] : []), sortB, openB, filterB)
}
host.appendChild(head)
@@ -1538,6 +1560,29 @@ function renderView(host: HTMLElement, b: Block, doc: SpacesDoc, opts: RenderOpt
return a
}
+ // GANTT — one bar per page, from its start to its due date. A layout and not
+ // a `chart` block; the argument is in gantt.ts.
+ //
+ // `layoutOf`, not the raw string: a `layout` out of a mailed file can be
+ // anything, and this branch must never be entered by a value that only looks
+ // like one of ours.
+ if (layoutOf(layout) === 'gantt') {
+ renderGantt(host, doc, rows, groupKey)
+ return
+ }
+
+ // WORKLOAD — the same rows, added up per bucket. The only shape here whose
+ // marks are not pages, which is exactly the objection gantt.ts answers.
+ if (layoutOf(layout) === 'workload') {
+ // `groupBy` ABSENT falls through to workload.ts's own default (the person
+ // field), because absent has always meant "the sensible default for this
+ // shape" and a board's default is not a chart's. A block that STORES a
+ // groupBy gets what it stored, in every layout.
+ renderWorkload(host, doc, rows,
+ Object.hasOwn(b as object, 'groupBy') ? groupKey : undefined)
+ return
+ }
+
// GALLERY — the shape that makes a reading list look like a reading list. A
// board answers "what state is this in" and a table answers "what does it
// say"; a gallery answers "which one is it", which for books, films, recipes
@@ -1822,3 +1867,256 @@ function renderView(host: HTMLElement, b: Block, doc: SpacesDoc, opts: RenderOpt
}
host.appendChild(board)
}
+
+// --- charts ------------------------------------------------------------------
+//
+// TWO SHAPES, ONE HOST. Both `gantt` and `workload` are `view` LAYOUTS rather
+// than a new block type; the argument is in gantt.ts and is not repeated here.
+// What belongs here is how they are PAINTED, and the one rule both follow:
+//
+// THE PICTURE IS SVG WITH PRESENTATION ATTRIBUTES, NOT CSS CLASSES.
+//
+// Not a style preference. This app draws the same block on four surfaces — the
+// editor, the reading view, PAPER, and the file-manager still (preview.ts) —
+// and the still carries its OWN small stylesheet, deliberately, because
+// QuickLook's renderer is a conservative one. A bar coloured by a `.sp-gt-bar`
+// rule in styles.css is a bar that is invisible in a thumbnail and, on paper,
+// is at the mercy of the browser's "do not print backgrounds" default. Colour,
+// geometry and size travel INSIDE the element, so the four surfaces cannot
+// disagree, and `@media print` has nothing left to get wrong.
+
+/** A colour a `fill=` attribute will certainly accept, or nothing. Same test
+ * preview.ts makes, and for the same reason: the theme comes out of a file. */
+const flatColor = (v: unknown): string | null => {
+ const s = typeof v === 'string' ? v.trim() : ''
+ return /^#[0-9a-f]{3,8}$/i.test(s) || /^rgb/i.test(s) ? s : null
+}
+
+const svgEl = (name: string, attrs: Record<string, string | number>): SVGElement => {
+ const el = document.createElementNS('http://www.w3.org/2000/svg', name)
+ for (const k of Object.keys(attrs)) el.setAttribute(k, String(attrs[k]))
+ return el
+}
+
+const GRID = '#E3E8EF'
+const MUTED = '#5B6472'
+const DANGER = '#E5484D'
+const INK = '#1E2A3A'
+
+/** Logical drawing size. The svg scales to its container through the viewBox,
+ * so these are proportions, not pixels on anybody's screen. */
+const GT = { w: 960, name: 210, padR: 14, head: 28, row: 26, bar: 12 }
+
+/** As many characters as fit the name column at 12px. Measuring is not
+ * available here (the block is painted before layout) and a `<title>` child
+ * carries the whole name anyway, so a cheap cut with an ellipsis beats a
+ * clipPath that silently swallows half a word. */
+const cut = (s: string, n = 28): string => (s.length <= n ? s : `${s.slice(0, n - 1)}…`)
+
+function renderGantt(host: HTMLElement, doc: SpacesDoc, rows: IssueRow[], groupKey: string): void {
+ const m = ganttModel(doc, rows, todayISO(), groupKey)
+
+ if (m.noDateField) {
+ const p = document.createElement('p')
+ p.className = 'sp-view-empty'
+ p.textContent = t('A timeline needs a date field. Add one and it appears here.')
+ host.appendChild(p)
+ return
+ }
+ if (!m.bars.length) {
+ const p = document.createElement('p')
+ p.className = 'sp-view-empty'
+ p.textContent = m.undated
+ ? t('No page here has a date yet.')
+ : t('No issues match this filter.')
+ host.appendChild(p)
+ return
+ }
+
+ const accent = flatColor((doc.theme as { accent?: unknown } | undefined)?.accent) ?? '#5B8DEF'
+ const x0 = GT.name
+ const tw = GT.w - GT.name - GT.padR
+ const h = GT.head + m.bars.length * GT.row + 10
+
+ const wrap = document.createElement('div')
+ // its own scroller, exactly as the table layout has: a schedule with thirty
+ // rows is tall, never wide, but a phone is 320px and the name column plus a
+ // month of track does not fit in it. The PAGE must not scroll sideways.
+ wrap.className = 'sp-gt-wrap'
+ const svg = svgEl('svg', {
+ viewBox: `0 0 ${GT.w} ${h}`, width: GT.w, height: h,
+ role: 'img', 'aria-label': t('Timeline'),
+ })
+ svg.setAttribute('style', `width:100%;height:auto;display:block;min-width:${Math.round(GT.w / 1.5)}px`)
+
+ // gridlines and their labels
+ for (const tick of m.ticks) {
+ const x = x0 + tick.x * tw
+ svg.appendChild(svgEl('line', { x1: x, y1: GT.head - 8, x2: x, y2: h - 6, stroke: GRID, 'stroke-width': 1 }))
+ const lab = svgEl('text', { x: x + 3, y: GT.head - 12, fill: MUTED, 'font-size': 11 })
+ lab.textContent = tick.label
+ svg.appendChild(lab)
+ }
+
+ // TODAY. Only when it is inside the span — gantt.ts refuses to stretch the
+ // chart to reach it, and a marker clamped to the edge would read as "today is
+ // the last day of this project". When it is outside, the note below says so
+ // in words, which is a thing a line cannot say.
+ if (m.todayX !== null) {
+ const x = x0 + m.todayX * tw
+ svg.appendChild(svgEl('line', {
+ x1: x, y1: GT.head - 10, x2: x, y2: h - 6,
+ stroke: INK, 'stroke-width': 1.5, opacity: 0.45,
+ }))
+ const lab = svgEl('text', { x: x + 4, y: h - 1, fill: INK, opacity: 0.55, 'font-size': 10 })
+ lab.textContent = t('Today')
+ svg.appendChild(lab)
+ }
+
+ m.bars.forEach((b, i) => {
+ const cy = GT.head + i * GT.row + GT.row / 2
+ const fill = flatColor(b.color) ?? accent
+
+ // The NAME is a link, and it is an svg <a>, so the whole picture is one
+ // element on every surface. The editor's delegated handler matches on
+ // closest('a') + an href starting `#p/`, which an SVGAElement satisfies;
+ // the preview strips href along with every other runtime attribute, so the
+ // still shows the same words without being clickable, which is correct.
+ const a = svgEl('a', { href: `#p/${b.pageId}` })
+ const name = svgEl('text', { x: 0, y: cy + 4, fill: INK, 'font-size': 12 })
+ name.textContent = cut(b.title || t('Untitled'))
+ const full = svgEl('title', {})
+ full.textContent = b.title || t('Untitled')
+ name.appendChild(full)
+ a.appendChild(name)
+ svg.appendChild(a)
+
+ // the row's own track, so a bar in the middle of a wide span still reads as
+ // a position on a line rather than as a rectangle floating in space
+ svg.appendChild(svgEl('line', {
+ x1: x0, y1: cy, x2: x0 + tw, y2: cy, stroke: GRID, 'stroke-width': 1, opacity: 0.7,
+ }))
+
+ let mark: SVGElement
+ if (b.milestone) {
+ // A DIAMOND, because a date with no duration is not a bar. This is what
+ // every issue written before `start` existed looks like — see the field
+ // comment in fields.ts; it is the installed base, not an edge case.
+ const cx = x0 + b.x * tw
+ const r = 6
+ mark = svgEl('path', {
+ d: `M${cx} ${cy - r}L${cx + r} ${cy}L${cx} ${cy + r}L${cx - r} ${cy}Z`,
+ fill, stroke: b.overdue ? DANGER : 'none', 'stroke-width': b.overdue ? 1.5 : 0,
+ })
+ } else {
+ mark = svgEl('rect', {
+ x: x0 + b.x * tw, y: cy - GT.bar / 2,
+ // a one-day task is one day wide, never zero — but a one-day task in a
+ // ten-year span rounds to a third of a pixel, so the floor is the one
+ // place the model's fraction is overridden and it is a VISIBILITY floor
+ width: Math.max(3, b.w * tw), height: GT.bar, rx: 3,
+ fill,
+ stroke: b.invalid || b.overdue ? DANGER : 'none',
+ 'stroke-width': b.invalid || b.overdue ? 1.5 : 0,
+ 'stroke-dasharray': b.invalid ? '3 2' : '',
+ })
+ }
+ const why = svgEl('title', {})
+ // The dates as the FILE holds them — ISO, unambiguous in every locale, and
+ // the thing somebody fixing a wrong row needs to see. The axis is localized
+ // because it is a label; this is a value.
+ why.textContent = b.invalid
+ ? t('{a} to {b} — the end is before the start', { a: b.to, b: b.from })
+ : b.milestone ? `${b.title} · ${b.from}` : `${b.title} · ${b.from} → ${b.to}`
+ mark.appendChild(why)
+ svg.appendChild(mark)
+ })
+
+ wrap.appendChild(svg)
+ host.appendChild(wrap)
+
+ // WHAT THE PICTURE COULD NOT SAY. Every one of these is a count that would
+ // otherwise be a silent difference between the chart and the document, which
+ // is the whole failure mode of drawing a picture of somebody else's numbers.
+ const notes: string[] = []
+ if (m.dropped) notes.push(t('{n} more not shown', { n: String(m.dropped) }))
+ if (m.undated) notes.push(t('{n} with no date', { n: String(m.undated) }))
+ if (m.todayX === null) notes.push(t('Today is outside this range'))
+ // "{n} end before they start" reads wrong at n=1 in English and needs a
+ // plural rule in half the catalogs; t() has no plural machinery and should
+ // not grow one for a footnote. A noun phrase is correct at every n in every
+ // one of the eight languages, which is the cheaper answer.
+ const bad = m.bars.filter((b) => b.invalid).length
+ if (bad) notes.push(t('{n} with the end before the start', { n: String(bad) }))
+ if (notes.length) {
+ const p = document.createElement('p')
+ p.className = 'sp-view-empty sp-gt-note'
+ p.textContent = notes.join(' · ')
+ host.appendChild(p)
+ }
+}
+
+function renderWorkload(host: HTMLElement, doc: SpacesDoc, rows: IssueRow[], groupKey?: string): void {
+ const m = workloadModel(doc, rows, groupKey, t('Unassigned'),
+ (n) => t('Other ({n})', { n: String(n) }))
+
+ if (!m.sum) {
+ const p = document.createElement('p')
+ p.className = 'sp-view-empty'
+ p.textContent = t('A workload chart adds up a number field. This space has none.')
+ host.appendChild(p)
+ return
+ }
+ if (!m.bars.length) {
+ const p = document.createElement('p')
+ p.className = 'sp-view-empty'
+ p.textContent = t('No issues match this filter.')
+ host.appendChild(p)
+ return
+ }
+
+ const accent = flatColor((doc.theme as { accent?: unknown } | undefined)?.accent) ?? '#5B8DEF'
+ const wrap = document.createElement('div')
+ wrap.className = 'sp-wl-wrap'
+ // THE SHARED ENGINE, kernel/src/charts.ts — this app draws no chart of its
+ // own. `chartSnapshotSvg` and not `mountChart`: the live path exists for
+ // slides' present mode, where a chart is hovered and zoomed; here the same
+ // markup has to survive being printed and being handed to a thumbnailer that
+ // runs no script, and a still does that by being a still.
+ wrap.innerHTML = chartSnapshotSvg({ w: 720, h: 320, option: workloadOption(m, accent) })
+ const svg = wrap.querySelector('svg')
+ // the engine asks for height:100% (it is sized by its host in slides); in a
+ // flowing column that is zero, so the aspect comes from the viewBox instead
+ if (svg) svg.setAttribute('style', 'width:100%;height:auto;display:block;min-width:420px')
+ host.appendChild(wrap)
+
+ // THE NUMBERS, IN WORDS, BESIDE THE PICTURE. Three jobs at once and it is the
+ // cheapest way to do any of them: the axis labels are truncated to fit, a
+ // chart is unreadable to a screen reader, and a bar's height is not a value
+ // anybody can quote. Rendered from the SAME model the chart is, so the two
+ // can never disagree.
+ const list = document.createElement('p')
+ list.className = 'sp-wl-legend'
+ for (const b of m.bars) {
+ const chip = document.createElement('span')
+ chip.className = 'sp-issue-chip'
+ const dot = document.createElement('span')
+ dot.className = 'sp-prop-dot'
+ dot.style.background = flatColor(b.color) ?? accent
+ chip.append(dot, document.createTextNode(`${b.label} · ${b.total}`))
+ list.appendChild(chip)
+ }
+ host.appendChild(list)
+
+ const notes: string[] = []
+ if (m.folded) notes.push(t('{n} more grouped as Other', { n: String(m.folded) }))
+ if (m.ignored) notes.push(t('{n} left out: not a number', { n: String(m.ignored) }))
+ const blank = m.bars.reduce((s, b) => s + b.blank, 0)
+ if (blank) notes.push(t('{n} with no estimate', { n: String(blank) }))
+ if (notes.length) {
+ const p = document.createElement('p')
+ p.className = 'sp-view-empty sp-gt-note'
+ p.textContent = notes.join(' · ')
+ host.appendChild(p)
+ }
+}
diff --git a/spaces/src/styles.css b/spaces/src/styles.css
index ac04862a..1a2c38de 100644
--- a/spaces/src/styles.css
+++ b/spaces/src/styles.css
@@ -2208,6 +2208,27 @@ button.sp-issue-set:hover { background: var(--chrome-2); border-color: var(--edg
.sp-view-list { list-style: none; margin: 0; padding: 0; }
.sp-view-list li { margin: 0 0 6px; }
+/* CHARTS: the timeline and the workload chart.
+ Almost nothing here. Both pictures are svg carrying their own colour and
+ geometry as PRESENTATION ATTRIBUTES (render.ts says why), so this file owns
+ only the box around them — which is exactly what makes them print, and what
+ makes them survive into the file-manager still, whose stylesheet is not this
+ one. A rule here that the picture depended on would be a rule the thumbnail
+ never sees. */
+.sp-gt-wrap, .sp-wl-wrap { overflow-x: auto; margin: 0 0 6px; }
+.sp-gt-note { margin: 2px 0 0; font-size: 12.5px; }
+.sp-wl-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
+
+/* Print: the scroller is a screen affordance and paper has no scrollbar, so it
+ becomes an ordinary box — otherwise a timeline wider than the page is
+ silently guillotined, which is the same class of bug as a board printing as
+ a cut-off row of columns (below). `min-width` goes with it for the same
+ reason: it is there to keep labels legible on a phone. */
+@media print {
+ .sp-gt-wrap, .sp-wl-wrap { overflow: visible; }
+ .sp-gt-wrap svg, .sp-wl-wrap svg { min-width: 0 !important; break-inside: avoid; }
+}
+
/* Print: a board is columns of cards on screen and a LIST on paper — a
horizontal scroller cannot be printed, and cutting it off would silently
drop issues. */
diff --git a/spaces/src/workload.ts b/spaces/src/workload.ts
new file mode 100644
index 00000000..5272001e
--- /dev/null
+++ b/spaces/src/workload.ts
@@ -0,0 +1,241 @@
+// SPDX-License-Identifier: MIT
+// Copyright (c) 2026 The Bento authors
+// WORKLOAD: how much work each person is holding — the estimates on a view's
+// pages, added up per bucket.
+//
+// WHERE THIS LIVES, and why it is a `view` layout rather than a `chart` block:
+// argued once, in gantt.ts, because the two shapes landed together and the
+// argument is the same argument. The short of it: a workload chart needs
+// `source`, `filter` and `groupBy` and nothing else, all three already mean
+// exactly this on a view, and an older build renders `layout:'workload'` as a
+// board of the same pages rather than as one line of fallback text.
+//
+// NO FORMAT CHANGE AT ALL. This shape adds no key. It reads `groupBy` (which
+// bucket), `source` and `filter` (which pages), and finds the field to add up
+// in the schema. That is the whole input.
+//
+// WHAT IS SUMMED IS DERIVED, NOT NAMED. The field is the first `vt:'number'` in
+// the document's own schema — `estimate` in the defaults, and whatever a
+// document that declares its own vocabulary calls it. Hardcoding `'estimate'`
+// would make this chart blank for every space that renamed the field, and
+// fields.ts already refuses that trade twice (`phaseField` derives the phase
+// field from the option groups rather than assuming `status`).
+//
+// A BAR CHART IS A PICTURE OF NUMBERS THAT CAME OUT OF A FILE SOMEBODY MAILED
+// YOU. Every arithmetic decision below is about what a wrong number does, and
+// the rule is the same each time: it must not throw, and it must not quietly
+// make a bar the wrong height. See `workloadModel`.
+
+import type { SpacesDoc } from './model.ts'
+import { fieldsOf, fieldByKey, optionOf, type FieldSpec, type IssueRow } from './fields.ts'
+
+/**
+ * How many bars, before the tail is folded into one.
+ *
+ * A workload chart of 400 people is not a chart, it is a smear — and the whole
+ * question ("who is holding too much?") is answered by the top of the list.
+ * The rest is not dropped: it is summed into one bar, so the total on screen
+ * still equals the total in the document. A chart whose bars do not add up to
+ * the thing it claims to be about is the misleading picture this file exists to
+ * refuse.
+ */
+export const WORKLOAD_MAX_BARS = 20
+
+/** Labels longer than this are cut for the axis; the full name stays in the model. */
+const AXIS_LABEL_MAX = 14
+
+/**
+ * The field a workload adds up: the first number field the schema declares.
+ *
+ * Undefined when there is none, which is a real state — a space of recipes has
+ * no estimates and the view says so rather than drawing an empty grid.
+ */
+export const sumField = (doc: SpacesDoc): FieldSpec | undefined =>
+ fieldsOf(doc).find((f) => f?.vt === 'number')
+
+/**
+ * The field a workload buckets by, when the block does not say.
+ *
+ * `groupBy` is ONE key with ONE meaning across every layout — "the field the
+ * buckets come from" — so this shape invents nothing. What differs is the
+ * default for an ABSENT key, and it differs because absent has always meant
+ * "the sensible default for this shape": a board's is the phase field, and a
+ * workload chart bucketed by status would not be a workload chart.
+ *
+ * The person field, then, or the first field that has one distinct value per
+ * person-shaped thing. Undefined falls back to the caller's own default.
+ */
+export const bucketField = (doc: SpacesDoc): FieldSpec | undefined =>
+ fieldsOf(doc).find((f) => f?.vt === 'person')
+
+export interface WorkloadBar {
+ /** the bucket's own value — a person's name, an option id, or '' for unset */
+ id: string
+ /** what to call it: an option's label, the raw value, or "Unassigned" */
+ label: string
+ /** the label as the axis will draw it — truncated, never re-derived downstream */
+ short: string
+ total: number
+ /** how many pages are in this bucket */
+ count: number
+ /** how many of them carry no number at all */
+ blank: number
+ color?: string
+ /** true for the single folded-tail bar, which is not a bucket */
+ other?: boolean
+}
+
+export interface WorkloadModel {
+ bars: WorkloadBar[]
+ /** the field being added up, for the axis name and the empty state */
+ sum?: FieldSpec
+ /** the field being bucketed by */
+ by?: FieldSpec
+ /** the sum of every bar — equals the document's total, by construction */
+ total: number
+ /** values that were not a usable number and were left out. See below. */
+ ignored: number
+ /** buckets folded into the single "Other" bar */
+ folded: number
+ /** rows considered */
+ rows: number
+}
+
+/**
+ * One field value read as a quantity of work — or a reason it is not one.
+ *
+ * `unset` and `bad` are DIFFERENT and are counted separately, because they mean
+ * different things to a reader. An issue nobody has estimated is ordinary and
+ * expected; an issue whose estimate is `-3` or `"about a week"` or `1e999` is a
+ * data problem someone should see.
+ *
+ * NEGATIVES ARE NOT SUMMED. `Math.max(0, n)` and "just add it" are both wrong
+ * in the same way: a −3 sitting in a column silently makes someone's workload
+ * three points lighter than the work they are actually holding, and the bar
+ * looks perfectly ordinary. It is excluded and counted, and the view says how
+ * many were excluded, so a wrong number is visible rather than absorbed.
+ *
+ * NaN and ±Infinity are the same case for the same reason — `NaN` poisons every
+ * later addition to `NaN` (a whole chart of empty bars, no error), and
+ * `Infinity` makes exactly one bar and flattens all the others to nothing.
+ */
+export function quantity(v: unknown): { n: number } | { unset: true } | { bad: true } {
+ if (v === undefined || v === null || v === '' || (Array.isArray(v) && !v.length)) return { unset: true }
+ // Number([]) is 0 and Number([7]) is 7 — an array is not a quantity however
+ // it coerces, and a file can hold one in any field.
+ if (typeof v === 'object') return { bad: true }
+ const n = Number(v)
+ if (!Number.isFinite(n) || n < 0) return { bad: true }
+ return { n }
+}
+
+/**
+ * The chart, as numbers.
+ *
+ * PURE — no DOM, no clock, no locale beyond the labels already in the document
+ * — so every assertion about it is an assertion about arithmetic and can be
+ * made in node. The painter is render.ts and the picture is charts-lite's.
+ *
+ * `unassignedLabel` is passed in rather than looked up, because a t() call in a
+ * module that a rig loads under node would reach the i18n facade for a word the
+ * rig does not care about; the caller is the one that has a locale.
+ */
+export function workloadModel(
+ doc: SpacesDoc,
+ rows: IssueRow[],
+ groupKey: string | undefined,
+ unassignedLabel: string,
+ otherLabel: (n: number) => string,
+): WorkloadModel {
+ const sum = sumField(doc)
+ const by = (groupKey ? fieldByKey(doc, groupKey) : undefined) ?? bucketField(doc)
+ if (!sum || !by) return { bars: [], sum, by, total: 0, ignored: 0, folded: 0, rows: rows.length }
+
+ // A MAP, not an object accumulator. Bucket keys are values out of a mailed
+ // file: `{}["constructor"]` is a function and `"__proto__"` is not an own key
+ // at all, so a plain-object tally can be poisoned by a name somebody typed.
+ // A Map has no prototype chain to fall through and needs no `Object.hasOwn`
+ // guard around every read — which is the same reason fields.ts `valuesOf`
+ // returns one.
+ const acc = new Map<string, WorkloadBar>()
+ let ignored = 0
+
+ for (const r of rows) {
+ const raw = r.values.get(by.key)
+ const id = Array.isArray(raw) ? raw.map(String).join(', ') : String(raw ?? '')
+ let bar = acc.get(id)
+ if (!bar) {
+ const opt = optionOf(by, id)
+ const label = id === '' ? unassignedLabel : (opt?.label ?? id)
+ bar = { id, label, short: shorten(label), total: 0, count: 0, blank: 0, color: opt?.color }
+ acc.set(id, bar)
+ }
+ bar.count++
+ const q = quantity(r.values.get(sum.key))
+ if ('n' in q) bar.total += q.n
+ else if ('bad' in q) ignored++
+ else bar.blank++
+ }
+
+ // DETERMINISTIC ORDER: biggest first, ties broken by the label. Without the
+ // tie-break the bars would come out in Map insertion order, which is page
+ // order — so two people with the same total would swap places when an
+ // unrelated page moved, and the chart would look like it had changed.
+ const all = [...acc.values()].sort((a, b) => b.total - a.total || a.label.localeCompare(b.label))
+ const total = all.reduce((s, b) => s + b.total, 0)
+
+ if (all.length <= WORKLOAD_MAX_BARS) {
+ return { bars: all, sum, by, total, ignored, folded: 0, rows: rows.length }
+ }
+ const head = all.slice(0, WORKLOAD_MAX_BARS - 1)
+ const tail = all.slice(WORKLOAD_MAX_BARS - 1)
+ const label = otherLabel(tail.length)
+ head.push({
+ id: '', label, short: shorten(label), other: true,
+ total: tail.reduce((s, b) => s + b.total, 0),
+ count: tail.reduce((s, b) => s + b.count, 0),
+ blank: tail.reduce((s, b) => s + b.blank, 0),
+ })
+ return { bars: head, sum, by, total, ignored, folded: tail.length, rows: rows.length }
+}
+
+const shorten = (s: string): string =>
+ s.length <= AXIS_LABEL_MAX ? s : `${s.slice(0, AXIS_LABEL_MAX - 1)}…`
+
+/**
+ * The chart engine's option for this model — PURE JSON, no functions.
+ *
+ * kernel/src/charts.ts is the engine (shared, and imported from outside slides
+ * already — dash does the same), so this app draws no chart of its own. It
+ * reads the ECharts option SHAPE; every formatter here is a template string
+ * (`{value}`), never a callback, because the option is data and must survive
+ * being serialised.
+ *
+ * `barColor` comes from the caller: the accent is a theme value the renderer
+ * knows and this module does not.
+ */
+export function workloadOption(m: WorkloadModel, barColor: string): Record<string, unknown> {
+ return {
+ // ITEM, not axis. An axis tooltip on a single-series bar chart names the
+ // category twice and reads as a bug.
+ tooltip: { trigger: 'item' },
+ grid: { left: 48, right: 14, top: 16, bottom: 64 },
+ xAxis: {
+ type: 'category',
+ data: m.bars.map((b) => b.short),
+ axisLabel: { fontSize: 11 },
+ },
+ yAxis: { type: 'value', min: 0, axisLabel: { fontSize: 11 } },
+ series: [{
+ type: 'bar',
+ name: m.sum?.label ?? '',
+ itemStyle: { color: barColor },
+ // PLAIN NUMBERS. charts-lite coerces an `{value, itemStyle}` item object
+ // to 0 for a bar series (its own docs say so), so a per-bar colour is not
+ // available here and asking for one would silently zero the chart. One
+ // colour for the one series, which is what a single-series chart wants
+ // anyway.
+ data: m.bars.map((b) => b.total),
+ }],
+ }
+}