Let the weigh-in list fold on its own
The Weight panel holds three things, and only one of them grows: the latest figure and the curve stay one screen forever, while the row list gains a line every weigh-in until it pushes everything else off. Folding the panel to get rid of it also takes away the two parts worth keeping. So the fold mechanism now works on any keyed element inside main, not only on a section, and the list moves into a block that folds by its own h3 while the panel keeps folding by its h2. The two nest without special handling — separate keys, and a folded section hides the block along with the rest, so the block's own state is simply there again when the section reopens. The CSS generalises from section.collapsible to a class, but scoped to main: the pedigree tree uses .collapsed for its own branches, and an unscoped selector would have folded every card in it.
This commit is contained in:
+8
-2
@@ -342,8 +342,14 @@
|
||||
<svg id="chart-weight" class="chart-svg" viewBox="0 0 320 180" role="img" aria-label="Weight in kilograms over time"></svg>
|
||||
<p id="weight-point-info" class="muted-note weight-point-info"></p>
|
||||
</div>
|
||||
<ul id="weight-list" class="wake-list"></ul>
|
||||
<p id="weight-empty" class="empty">No weigh-ins logged yet.</p>
|
||||
<!-- Folds on its own h3, independently of the Weight panel around it:
|
||||
the row list grows by one every weigh-in, and the summary and the
|
||||
curve above it are what you usually want left on screen. -->
|
||||
<div class="subpanel" data-panel="weight-history">
|
||||
<h3>History</h3>
|
||||
<ul id="weight-list" class="wake-list"></ul>
|
||||
<p id="weight-empty" class="empty">No weigh-ins logged yet.</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="notes-log" data-panel="notes">
|
||||
|
||||
Reference in New Issue
Block a user