Skip to content

fix(stats): grey out weight-log paging only at the ends#33

Merged
rwlove merged 1 commit into
mainfrom
fix/weight-paging-disabled-state
Jun 7, 2026
Merged

fix(stats): grey out weight-log paging only at the ends#33
rwlove merged 1 commit into
mainfrom
fix/weight-paging-disabled-state

Conversation

@rwlove

@rwlove rwlove commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Follow-up to #31. The Older/Newer buttons in the Body Weight log were btn-outline-secondary with no enabled/disabled toggling, so they always looked greyed.

  • weight.js: after each render, disable Older only when start <= 0 (no older entries) and Newer only when offset <= 0 (already on the newest page). Runs on every path (initial, tab-show, period change, paging).
  • stats.html: give the buttons ids; switch to btn-outline-primary so the enabled state is visibly active and only the genuinely-at-the-end button greys out.

go build, template-parse smoke pass.

🤖 Generated with Claude Code

Older/Newer in the Body Weight log were always styled muted (btn-outline-
secondary) and never toggled, so both looked disabled regardless of
position. Disable a direction only when there's no further page —
"Older" when the window already starts at index 0, "Newer" when on the
newest page (offset 0) — and use btn-outline-primary so the enabled
state reads as active.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rwlove rwlove merged commit e7a4e79 into main Jun 7, 2026
3 checks passed
@rwlove rwlove deleted the fix/weight-paging-disabled-state branch June 7, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant