Skip to content

Refactor Plan pages with shared HeroCard and PeriodStepper components - #3

Merged
zenatron merged 2 commits into
mainfrom
claude/zealous-wright-37zgm5
Oct 4, 2026
Merged

zenatron merged 2 commits into
mainfrom
claude/zealous-wright-37zgm5

Conversation

@zenatron

@zenatron zenatron commented Oct 4, 2026

Copy link
Copy Markdown
Owner

This PR consolidates repeated UI patterns across the planning and analytics pages into reusable components, improving consistency and maintainability.

Summary

Extracted three new shared components to eliminate duplication:

  • HeroCard: A headline card displaying a large monetary figure with supporting text, used on Recurring, Buckets, and Income pages
  • Ribbon: A proportional bar chart showing parts of a whole, with optional interactivity
  • PeriodStepper: Navigation controls for stepping between periods/months

Replaced the centered PlanTabs component with a full-width PlanHeader that integrates the Plan section navigation directly into the page masthead, improving layout consistency.

Key Changes

New Components

  • HeroCard.svelte: Standardizes the headline statement across planning pages (overline, large figure, supporting line, optional content)
  • Ribbon.svelte: Extracted from RecurringBreakdown, now reusable for any proportional breakdown visualization
  • PeriodStepper.svelte: Unified period navigation (Previous · label · Next) used by Activity, Map, Analytics, and Statement pages

Refactored Pages

  • Recurring & Buckets: Replaced PlanTabs with PlanHeader that includes the section toggle and calendar link in a full-width layout
  • RecurringBreakdown: Now uses HeroCard and Ribbon components instead of inline markup
  • Income: Added HeroCard headline and Ribbon breakdown by person
  • Buckets: Added HeroCard headline with on-hand and lifetime saved figures, plus ribbon showing accruing buckets
  • Analytics & Map: Replaced custom period navigation with PeriodStepper
  • Statement: Replaced custom month navigation with PeriodStepper

UI Improvements

  • Plan pages now have consistent masthead layout with actions on the right
  • Segmented control for Recurring/Buckets moved below the heading for better one-handed usability
  • Improved spacing and sizing consistency (h-10 w-10 icons, adjusted padding on forms)
  • Better text wrapping on item names with flex-wrap and separate gap-x/gap-y
  • Help page reorganized with one card per group instead of one per topic
  • Ledger movements preference now server-persisted per member instead of localStorage

Implementation Details

  • PeriodStepper supports both link-based navigation (map, statement) and handler-based (analytics)
  • Ribbon component handles animation on mount and respects prefers-reduced-motion
  • HeroCard accepts optional icon, line snippet, and children for flexible content
  • Improved accessibility with proper aria-labels on buttons and icon buttons
  • Ledger query logic updated to distinguish between explicit URL parameters and saved preferences

https://claude.ai/code/session_019iNojndGyPD9Kt2Db6gCCf

claude added 2 commits October 4, 2026 01:36
- Plan's masthead sits where every tab's does, with the calendar and the
  page's actions beside it and a full-width Recurring | Buckets switch under
  it (PlanTabs becomes PlanHeader).
- Buckets and Income open on the same hero Recurring does: a shared
  HeroCard and Ribbon, with on-hand by bucket and monthly income by person.
- The recurring chip rail no longer snaps "All" flush to the card edge.
- Bucket activity no longer pops into the ledger after arrival: an absent
  `movements` param now defers to the saved preference on the server, so the
  first paint has the rows and the post-mount second navigation is gone.
- Inline edit forms are inset inside their cards; list tiles, action order
  and small meta text match across Recurring, Buckets and Income.
- New purchase: the currency symbol hugs the amount. Statement: a zero
  figure carries no "+". Categories: the "Bought" caption no longer clips.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019iNojndGyPD9Kt2Db6gCCf
- Activity, the map and the statement share a PeriodStepper on the square
  .icon-btn the calendar already used, replacing three hand-rolled steppers
  (two with inline SVG chevrons) that used the round "close" shape.
- The Ledger title is 28px like every other tab's.
- Recurring rows drop "needs confirming" from every confirm-by-hand rule and
  instead show a pending "To confirm" tag, linked to the Ledger, only on a
  rule with one of your charges actually waiting (counted per rule).
- Help groups its topics into one card per section with hairline dividers,
  instead of a separate card per topic.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019iNojndGyPD9Kt2Db6gCCf
@coderabbitai

coderabbitai Bot commented Oct 4, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5cd7786c-b232-4939-8dd5-8299c52c73e6
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zenatron
zenatron merged commit db8f289 into main Oct 4, 2026
2 of 3 checks passed
@zenatron
zenatron deleted the claude/zealous-wright-37zgm5 branch October 4, 2026 01:56
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.

2 participants