feat: "show events that haven't started" governs both views
It was the board's alone, sitting between two app-wide filters and carrying a line of small print to explain why it was different. It is the same events answering the same question in either view, so it is now one switch: the board plots them, and the checklist keeps its "Not started yet" section. That means the section is off by default, which is a visible change for every existing reader — deliberate, and the same argument the board makes. This app answers what expires next; on fourteen lanes the queued patches are more rows than the thing they came for. `timelineUpcoming` becomes `showUpcoming`, because the old name would now be false, and `adoptRenamed` carries a stored answer across on load. Nothing would be lost by dropping it — `prefs` is one blob under one key, not a key space — but a reader who had switched the future on would find it off with no explanation, and they should not have to say a thing twice. A stored new name always wins, so it cannot overwrite a fresher answer with a stale one. Gating the section alone would have opened a hole: nothing running and everything held back rendered an empty column, because the "nothing to show" line keyed off there being no rows at all rather than none listed. It now counts what is held back and names the switch, as the board does. The split pills stay the board's: the checklist gives these a section with a heading either way, so there is nothing there to mix them into. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5
parent
d3066aefdc
commit
2cb4dd214c
+26
-8
@@ -286,6 +286,15 @@ export function App() {
|
||||
|
||||
const live = visible.filter((r) => r.clock.live);
|
||||
const upcoming = visible.filter((r) => r.clock.upcoming);
|
||||
/**
|
||||
* The unstarted events the checklist actually lists.
|
||||
*
|
||||
* `upcoming` stays the full count either way, because the page header states
|
||||
* it — a section that is simply absent is indistinguishable from a quiet
|
||||
* fortnight, and this app does not leave a reader to infer what it is not
|
||||
* showing them.
|
||||
*/
|
||||
const listedUpcoming = prefs.showUpcoming ? upcoming : [];
|
||||
|
||||
/**
|
||||
* What the page is telling the reader to *do*, as opposed to what it is
|
||||
@@ -507,13 +516,13 @@ export function App() {
|
||||
</Section>
|
||||
)}
|
||||
|
||||
{upcoming.length > 0 && (
|
||||
{listedUpcoming.length > 0 && (
|
||||
<Section
|
||||
title="Not started yet"
|
||||
// The ordering control lives with the first list on the page, so
|
||||
// it is never missing when there is something to order.
|
||||
action={
|
||||
live.length === 0 && upcoming.length > 1 ? (
|
||||
live.length === 0 && listedUpcoming.length > 1 ? (
|
||||
<SortControl
|
||||
value={prefs.sort}
|
||||
onChange={(sort) => update({ sort })}
|
||||
@@ -521,15 +530,24 @@ export function App() {
|
||||
) : undefined
|
||||
}
|
||||
>
|
||||
<EventList rows={upcoming} render={renderRow} />
|
||||
<EventList rows={listedUpcoming} render={renderRow} />
|
||||
</Section>
|
||||
)}
|
||||
|
||||
{visible.length === 0 && (
|
||||
{/* Nothing listed is three different situations, and the reader can
|
||||
only act on the one they are actually in. Held-back events come
|
||||
first because that one has a switch behind it. */}
|
||||
{live.length === 0 && listedUpcoming.length === 0 && (
|
||||
<p className="px-4 py-12 text-sm leading-relaxed text-muted">
|
||||
{focus !== null
|
||||
? `Nothing running in ${gameMeta(focus).name}. Try another game, or show all of them.`
|
||||
: "Nothing to show. Every game is switched off, or you've finished everything and hidden completed events."}
|
||||
{upcoming.length > 0
|
||||
? `Nothing running right now. ${
|
||||
upcoming.length === 1
|
||||
? "One event has"
|
||||
: `${upcoming.length} events have`
|
||||
} not started yet — switch on “Show events that haven't started” below to list them.`
|
||||
: focus !== null
|
||||
? `Nothing running in ${gameMeta(focus).name}. Try another game, or show all of them.`
|
||||
: "Nothing to show. Every game is switched off, or you've finished everything and hidden completed events."}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
@@ -551,7 +569,7 @@ export function App() {
|
||||
// The board holds these back itself rather than being handed a
|
||||
// shorter list, so it can say how many are waiting when there is
|
||||
// nothing else left to draw. The switch is in settings.
|
||||
showUpcoming={prefs.timelineUpcoming}
|
||||
showUpcoming={prefs.showUpcoming}
|
||||
splitUpcoming={prefs.timelineSplitUpcoming}
|
||||
onOpen={setOpenId}
|
||||
isDone={isDone}
|
||||
|
||||
Reference in New Issue
Block a user