Repository navigation
List the periods to hide and show them - #3
Open
alex-andreyev wants to merge 2 commits into
Open
alex-andreyev wants to merge 2 commits into
alex-andreyev wants to merge 2 commits 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>
A list of periods opens from the toolbar's bars button or with P. It shows every period in time order, with its dates, its number of events and an eye that hides it. Hidden periods move to a section of their own, where they are shown again. Hiding is an edit like any other: the file keeps it as `"hidden": true` on the period, and it is one command on the undo stack. - An event goes out of sight once all its periods are hidden, unless the reader ticks "Keep the events of hidden periods", a reader's setting. - Hide all and Show all. A filter by name appears from seven periods on. - Hidden periods, and the events hidden with them, are left out of search and of previous and next in the details. - While any period is hidden, one row under the bars says how many. A click on it opens the list at the hidden ones. - The list stands beside the strip on a desktop and is a bottom sheet on a phone. Selecting a period that is already in view no longer zooms out to fit all of it. The strip stays put while the period shows over at least 120 px of the part the panels leave free. 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.
A list of periods, where a period is hidden with one click and shown again from a section of its own.
What changes
"hidden": trueon the period, and it is one command on the undo stack.Also: a selected period stays in view
reveal()zoomed out to fit a whole period whenever the period started left of the screen's edge or was longer than 80% of the screen. A click on a long bar therefore shrank the view under the pointer.Now a period stays where it is while it shows over at least 120 px of the free part of the strip, or all of it if it is shorter.
reveal()also centres in the part the list on the left and the details on the right leave free.File format
hiddenon a period; seedocs/format.md. It istrueor left out. Any other value on a period, or the field on an event or an era, is dropped with a warning.Tests
tests/model.mjs: readinghidden, the round trip,hiddenPeriods.tests/app.mjs:npm run checkpasses: all unit tests, 238 browser checks and 22 PWA checks (run withTZ=UTC).🤖 Generated with Claude Code