Add PeriodSelector to Overview, OverviewIncome, and ExpenseChecklist pages#660
Draft
maraf wants to merge 7 commits into
Draft
Add PeriodSelector to Overview, OverviewIncome, and ExpenseChecklist pages#660maraf wants to merge 7 commits into
maraf wants to merge 7 commits into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several pages have period parameters (month/year routing) but lacked the
PeriodSelectorUI 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
PeriodSelectorto the following page families by extending their base classes with the required properties and abstract methods:PeriodGuesses,CreatePeriodGuesses(),CreatePeriodsQuery(),GetPeriodsAsync(), andUrlOverview()to the base; implemented inOverviewMonth(usesListMonthWithExpenseOrIncome) andOverviewYear(usesListYearWithExpenseOrIncome)OverviewMonthIncomeandOverviewYearIncomePeriodGuessesandGetMonthsAsync()directlyThe selector is placed in a
d-flex justify-content-betweencontainer 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
LinkFactoryfor Overview pages accounts for the optional category filter (passesCategoryKeywhen non-empty).