Repository navigation
Attach events to the periods they are about - #2
Open
alex-andreyev wants to merge 1 commit into
Open
alex-andreyev wants to merge 1 commit into
alex-andreyev wants to merge 1 commit into
Conversation
An event can now name the periods it is about: a life, a reign, a war, as many as it takes. The first flight is in both brothers' lives and in the age of powered flight. The file keeps them as `periods`, a list of period ids on the event. - The event's window ticks any of the periods its date falls within. The list follows the date as it is typed, and a tick is kept while the date moves out of a period and back. - An event's details link to its periods. A period's details list its events and, in edit mode, offer to add one already attached. - New dates that leave an event out of a period, or deleting the period, detach the event from that period alone, in the same command. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An event can now name the periods it is about: a life, a reign, a war, as many as it takes. The first flight (17 Dec 1903) belongs both to the Wright brothers' lives and to the age of powered flight.
What changes
File format
periodson an event is a list of period ids; seedocs/format.md. It is read and checked like the other fields:Older versions keep the field in
extrawhen they save.Tests
tests/model.mjscovers parsing, warnings, the round trip,periodHolds,periodsAt,eventsOfanddetachFrom. ForperiodHolds, a date's own span has to meet the period's: "1957" is in "Oct 1957 – 1975".tests/app.mjscovers:npm run checkpasses: all unit tests, 206 browser checks and 22 PWA checks. The suite was run withTZ=UTC; see #1 for the two date tests that fail in America/Los_Angeles onmain.Russian translations are included.
A follow-up PR adds a list of periods to hide and show them; it builds on this one.
🤖 Generated with Claude Code