mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-12 06:06:10 +00:00
fix(ui): drop the redundant Today briefing link, align the sheet close control
The Today hero carried a read-the-full-briefing link to /insights while the health-score ring above it already opened the same page — two doors to one room in a single card. The ring stays; the link and its six locale strings are gone. The document sheet's close control sat at the plain p-4 right edge, but an icon button carries its own inner inset, so the glyph landed ~28px from the frame against a title starting at 16px. Trim the right padding by that inset when a consumer renders its own trailing control, leaving the tap target reaching the frame. Also rewrites the v1.30.15-v1.30.31 changelog entries: they had drifted into summary lines, internal vocabulary and reasoning asides that do not belong in a release note.
This commit is contained in:
1 parent
db86b4f76d
commit
e4f5aa0b09
10 files changed
+127
-102
No files matched your search
@@ -95,9 +95,10 @@ describe("<TodayHero>", () => {
|
||||
// link to the existing surface — S2 invents no new backend action.
|
||||
expect(html).toContain('href="/medications"');
|
||||
expect(html).toContain('href="/settings/integrations"');
|
||||
// The read-the-full-briefing affordance routes to Insights.
|
||||
expect(html).toContain('data-slot="today-hero-briefing-link"');
|
||||
// The score ring is the one door to Insights — the separate
|
||||
// read-the-full-briefing link was redundant with it and is gone.
|
||||
expect(html).toContain('href="/insights"');
|
||||
expect(html).not.toContain('data-slot="today-hero-briefing-link"');
|
||||
});
|
||||
|
||||
it("shows the honest sleep-pending note and provisional score", () => {
|
||||
@@ -118,7 +119,7 @@ describe("<TodayHero>", () => {
|
||||
expect(html).toContain("Last night");
|
||||
// Null score → the ring's provisional face, never a zero.
|
||||
expect(html).toContain('data-provisional="true"');
|
||||
// No briefing lead → no full-briefing link.
|
||||
// The score ring stays the only route to Insights.
|
||||
expect(html).not.toContain('data-slot="today-hero-briefing-link"');
|
||||
});
|
||||
|
||||
|
||||
@@ -145,17 +145,6 @@ export function TodayHero({ digest }: { digest: DailyDigest }) {
|
||||
) : null}
|
||||
</p>
|
||||
) : null}
|
||||
{/* Read-the-full-briefing affordance — only when a briefing
|
||||
actually backs the lead. Routes to the Insights overview. */}
|
||||
{digest.briefingLead ? (
|
||||
<Link
|
||||
href="/insights"
|
||||
data-slot="today-hero-briefing-link"
|
||||
className="text-primary hover:text-primary/80 inline-flex min-h-9 items-center text-sm font-medium transition-colors"
|
||||
>
|
||||
{t("daily.today.readFullBriefing")}
|
||||
</Link>
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
{/* Health score ring — `flat` (no sweep/bloom), server-computed
|
||||
|
||||
@@ -174,7 +174,19 @@ export function ResponsiveSheet({
|
||||
// the `p-4` right edge instead of being pushed in by an empty
|
||||
// reserved gutter.
|
||||
showCloseButton && "pr-12",
|
||||
headerAction && "flex-row items-start justify-between gap-3",
|
||||
// Optical alignment for a consumer-rendered trailing control.
|
||||
// An icon button carries its own inner inset (a 20px glyph
|
||||
// centred in a 44px tap target sits 12px in), so at the plain
|
||||
// `p-4` right edge the GLYPH lands ~28px from the frame while
|
||||
// the title starts at 16px — visibly not flush. Trim the right
|
||||
// padding by that inset so the glyph aligns with the title's
|
||||
// edge; the tap target still reaches the frame.
|
||||
headerAction &&
|
||||
!showCloseButton &&
|
||||
"flex-row items-start justify-between gap-3 pr-1 sm:pr-2",
|
||||
headerAction &&
|
||||
showCloseButton &&
|
||||
"flex-row items-start justify-between gap-3",
|
||||
)}
|
||||
>
|
||||
{headerAction ? (
|
||||
|
||||
Reference in new issue
Block a user