Skip to content

Add PeriodSelector to Overview, OverviewIncome, and ExpenseChecklist pages#660

Draft
maraf wants to merge 7 commits into
mainfrom
maraf/add-period-selector
Draft

Add PeriodSelector to Overview, OverviewIncome, and ExpenseChecklist pages#660
maraf wants to merge 7 commits into
mainfrom
maraf/add-period-selector

Conversation

@maraf
Copy link
Copy Markdown
Owner

@maraf maraf commented May 5, 2026

Several pages have period parameters (month/year routing) but lacked the PeriodSelector UI that Summary and Balances already use. This makes it harder for users to jump to a specific period without manually editing the URL or relying solely on swipe gestures.

Approach

Added PeriodSelector to the following page families by extending their base classes with the required properties and abstract methods:

  • Overview<T> (expenses list) -- adds PeriodGuesses, CreatePeriodGuesses(), CreatePeriodsQuery(), GetPeriodsAsync(), and UrlOverview() to the base; implemented in OverviewMonth (uses ListMonthWithExpenseOrIncome) and OverviewYear (uses ListYearWithExpenseOrIncome)
  • OverviewIncome<T> (incomes list) -- same pattern; implemented in OverviewMonthIncome and OverviewYearIncome
  • ExpenseChecklistMonth -- standalone page, adds PeriodGuesses and GetMonthsAsync() directly

The selector is placed in a d-flex justify-content-between container above the nav tabs, matching the visual pattern used in Summary and Balances. Existing swipe navigation is preserved as-is -- the PeriodSelector is purely additive.

Notes

  • The LinkFactory for Overview pages accounts for the optional category filter (passes CategoryKey when non-empty).
  • Period guesses follow the same convention as SummaryMonth: show the two preceding periods as quick-access links.

maraf and others added 7 commits May 5, 2026 13:46
…pages

Add PeriodSelector component to pages that have period parameters but
previously lacked the selector UI:

- Overview<T> base class: Add PeriodGuesses, CreatePeriodGuesses(),
  CreatePeriodsQuery(), GetPeriodsAsync(), and UrlOverview() abstracts
- OverviewMonth: Implement with MonthModel periods and month queries
- OverviewYear: Implement with YearModel periods and year queries
- OverviewIncome<T> base class: Add PeriodGuesses, CreatePeriodGuesses(),
  CreatePeriodsQuery(), GetPeriodsAsync(), and UrlOverviewIncomes() abstracts
- OverviewMonthIncome: Implement with MonthModel periods
- OverviewYearIncome: Implement with YearModel periods
- ExpenseChecklistMonth: Add PeriodGuesses, GetMonthsAsync(), and selector

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Guard against MaxAmount == 0 in the bar size calculation, matching the
existing pattern in TrendsYear.razor.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds year period selector to the month trends view, allowing users to
quickly navigate between years for category trend comparison.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
On Overview, OverviewIncome, and ExpenseChecklistMonth, merge the period
selector and tab navigation into a single d-flex line with the selector
on the left and nav pills on the right.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move the 'Year overview' link from the title button area into a nav
pills row alongside the PeriodSelector, consistent with other pages.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
On Overview and OverviewIncome, move the SortButton into the same flex
line as the PeriodSelector and nav pills, eliminating the extra row.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Change flex layout so PeriodSelector and nav pills are start-aligned
together, while only the sort button is pushed to the end with ms-auto.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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