fix: display subcategories under their parent in dashboard budget table (#23) #27

Closed
medic-bot wants to merge 1 commit from fix/simpl-resultat-23-budget-category-sorting into main
Collaborator

Summary

Fixes #23

  • Budget table sorting: Level 3+ subcategories (e.g. assurance-maison under assurances) now appear directly under their parent instead of at the bottom of the section. The sort was flattening all child rows alphabetically, breaking depth-2 groups from their depth-1 parent.
  • Pie chart space reduction: Chart height reduced from 280px to 200px, legend hidden by default and shown only on hover. Tooltip now includes percentage.
  • Dashboard layout: Grid ratio changed from 1:1 to 2:3 to give more space to the budget table.

Changes

  • src/services/budgetService.ts: Group-aware sorting that keeps depth-2 children attached to their depth-1 parent subtotal
  • src/components/dashboard/CategoryPieChart.tsx: Smaller chart, hover-only legend, percentage in tooltip
  • src/pages/DashboardPage.tsx: Grid layout adjusted to 2fr:3fr ratio
  • CHANGELOG.md / CHANGELOG.fr.md: Updated

Test plan

  • Verify subcategories (e.g. assurance-maison) appear under their parent (assurances) in the dashboard budget vs actual table
  • Verify pie chart legend appears only on hover
  • Verify pie chart tooltip shows percentage
  • Verify budget table has more horizontal space than before
## Summary Fixes #23 - **Budget table sorting**: Level 3+ subcategories (e.g. assurance-maison under assurances) now appear directly under their parent instead of at the bottom of the section. The sort was flattening all child rows alphabetically, breaking depth-2 groups from their depth-1 parent. - **Pie chart space reduction**: Chart height reduced from 280px to 200px, legend hidden by default and shown only on hover. Tooltip now includes percentage. - **Dashboard layout**: Grid ratio changed from 1:1 to 2:3 to give more space to the budget table. ## Changes - `src/services/budgetService.ts`: Group-aware sorting that keeps depth-2 children attached to their depth-1 parent subtotal - `src/components/dashboard/CategoryPieChart.tsx`: Smaller chart, hover-only legend, percentage in tooltip - `src/pages/DashboardPage.tsx`: Grid layout adjusted to 2fr:3fr ratio - `CHANGELOG.md` / `CHANGELOG.fr.md`: Updated ## Test plan - [ ] Verify subcategories (e.g. assurance-maison) appear under their parent (assurances) in the dashboard budget vs actual table - [ ] Verify pie chart legend appears only on hover - [ ] Verify pie chart tooltip shows percentage - [ ] Verify budget table has more horizontal space than before
medic-bot added 1 commit 2026-03-09 04:06:44 +00:00
- Fix group-aware sorting for depth-2 children in budget vs actual data
- Reduce pie chart height and show legend only on hover
- Add percentage to pie chart tooltip
- Adjust dashboard grid layout to give more space to the budget table

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
maximus closed this pull request 2026-03-09 23:45:27 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: maximus/Simpl-Resultat#27
No description provided.