Skip to content

Today: the Key Metrics header still advertises a trend window when the trend graphs are off, and there is no single-day option #2376

Description

@andremiliano

What

On the default Liquid Today, the Key Metrics header shows a trend-window label (7-day trend / 14-day trend / 30-day trend) that is rendered unconditionally:

// Strand/Liquid/LiquidTodayView.swift, keyMetricsSection
sectionHead("KEY METRICS", trailing: trendWindowLabel)

today.keyMetricsDetailed ("Show a trend graph beneath each metric", default off) gates only the sparkline itself and the tile height:

// :1463
if keyMetricsDetailed {
    let spark = key.map { windowedSpark($0) } ?? []
// :1479
.frame(minHeight: keyMetricsDetailed ? 154 : 116, alignment: .topLeading)

So with the graphs turned off — which is the default — nothing in the section draws a trend, and the header still announces one. The tiles show the current value and caption only.

Observed on 11.8.0 (400), iPhone, default Liquid Today: turning the graph toggle off leaves 7-day trend in the header.

Why it matters

The label is the only thing on that screen suggesting a window, so with graphs off it describes a view that is not being drawn. It reads as a stale caption rather than a setting.

It also makes a second, separate gap visible: there is no way to have Today show only today. The window picker offers three choices and no shorter one:

// Strand/Screens/TodayCustomizationSheet.swift:338-341
Picker("Trend window", selection: $windowDays) {
    Text("1 week").tag(7)
    Text("2 weeks").tag(14)
    Text("1 month").tag(30)
}

A wearer who wants Today to be strictly today can turn the graphs off, but the label still frames the section as a trend, and the only way to remove it entirely is hiding the whole Key Metrics section, which also removes the values.

Two suggestions, in order of size

1. Hide the label when nothing is drawing a trend. Render the trailing label only when keyMetricsDetailed is true. Small and self-contained; the Android twin's header should be checked for the same shape so the platforms stay aligned.

2. Consider a single-day option for the window. Either a Today entry in the picker that hides the label and the graphs together (making the existing toggle redundant for that case), or wording that makes the current toggle read as the "just today" setting. This is a design decision rather than a fix, hence separate from (1).

Verification

LiquidTodayView is app-target Swift with no default CI, so a change here has to be compiled locally and looked at on a device: with graphs off the header shows no window label, and with graphs on it shows the selected one.

Filed from a code read at v11.8.0 (ef0c0d72) plus the on-device observation above. No existing issue found for either half.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions