#189 · One set of words: moments, and the same labels in the editor and on the site (#187)
- timeline-app
- pull request
Closes #187. ## Moment, not event Points in time are now "moments" wherever people read about them. | Was | Now | | ------------------------------------- | -------------------------------------- | | **+ Event**, **+Event** (menu) | **+ Moment**, **+Moment** | | **View events** | **View moments** | | **Delete event?** / **Delete event** | **Delete moment?** / **Delete moment** | | **Follow latest events** | **Follow latest moments** | | "10 events" | "10 moments", "1 moment" | | "Untitled event", "Unnamed moment" | "Untitled moment" everywhere | | "Event label" (display preview) | "Moment label" | - **Import messages:** the messages a refused import gives now say "moment", for example "A timeline holds at most 200,000 moments." and "Moment IDs must be unique.". - **What stays "event":** - `events`, the file format's key; - code names; - plain English such as "disturbing events" in the content-label text. ## Moments and durations kept apart A moment is a point in time and a duration spans two. Where a label or message covers both, it now says so: - **A summary's menu:** it names what the summary holds: **View moments**, **View durations** or **View moments and durations**. A summary of one moment with durations collapsed into it now offers this too, beside the moment's **Edit** and **Delete**; before, it had no way to list them from the menu. - **Hover previews (Focus on hover):** an untitled duration is "Untitled duration", and an untitled stack card is "Untitled stack entry", instead of "Untitled moment". This mix-up predates this PR. - **The display preview's label purpose:** it is "Moment and duration label", since duration labels use it too. - **A saved comparison:** it refuses stored moments *or durations*, and its message now says both. - **Docs:** - sentences about all stored times say "stored times" rather than "moments"; - summaries are described as holding moments and the durations too short to draw. ## The editor and the website say the same `src/wording.ts` holds the shared labels. The website renders them, and a test holds the editor's markup to them. | Setting | Both now say | | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Visibility | Private — you and the collaborators you add / Public — anyone can view it, and signed-in readers can propose changes | | Roles | Viewer — read / Contributor — propose changes / Writer — save changes and merge pull requests | | Collaborator | **Add or update collaborator** | | Rebase | **Rebase on upstream** | | Saving | **Save to server**, which no longer reads **Save upstream** for a timeline's owner and writers. "Upstream" is still used where it means the timeline a fork came from. | ## The pinch claim (checked) The Help dialog said "Scroll or pinch to zoom through time". Browsers report a trackpad pinch as Ctrl-scroll, which the editor deliberately uses to scale the contents. Touch-screen pinches already work as documented (side by side zooms time, one finger above the other scales). I kept the behaviour and corrected the text, in the Help dialog, the tour and the guide. ## Docs - **Labels:** the guide, README, `collaboration.md`, `time-presentation.md`, `plugins.md` and `tags.md` now quote the new labels. - **Left alone:** technical docs that use "event" for the stored data (`architecture.md`, benchmarks) and the historical "events" of seed timelines. ## Tests - **New `wording.test.mjs`:** - the editor's sharing dialog, pull-request and save labels match `src/wording.ts`; - no text people read in the editor's markup, or in strings and JSX text across `src/` and `platform/`, says "event" again, scanned with the TypeScript parser. - **Updated:** the tests that quoted the old labels. Locally, all of the following pass: - 286 unit tests, typecheck and Prettier; - the 45-test database suite; - the 11 browser suites; - the offline edition's test.