Skip to content

Redesign budget bar with card layout, gradients, and legend#3533

Open
Rolling2405 wants to merge 6 commits into
DARIAEngineering:mainfrom
Rolling2405:feature/budget-bar-redesign
Open

Redesign budget bar with card layout, gradients, and legend#3533
Rolling2405 wants to merge 6 commits into
DARIAEngineering:mainfrom
Rolling2405:feature/budget-bar-redesign

Conversation

@Rolling2405

@Rolling2405 Rolling2405 commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

I rule and have completed some work on Case Manager that's ready for review!

This redesigns the dashboard budget bar with a card layout, gradient progress bars, and a color-coded legend, making it easier for case managers to see at a glance how fund budgets are being used.

This pull request makes the following changes:

  • Replace inline budget bar with a card-based layout
  • Add gradient progress bars for visual clarity
  • Add a legend explaining the color codes
  • Use Bootstrap 5 utility classes and data attributes

Notes:

(If there are changes to the views, please include a screenshot so we know what to look for!)

For reviewer:

  • Adjust the title to explain what it does for the notification email to the listserv.
  • Tag this PR:
    • feature if it contains a feature, fix, or similar. This is anything that contains a user-facing fix in some way, such as frontend changes, alterations to backend behavior, or bug fixes.
    • dependencies if it contains library upgrades or similar. This is anything that upgrades any dependency, such as a Gemfile update or npm package upgrade.
  • If it contains neither, no need to tag this PR.

Rolling2405 and others added 2 commits April 7, 2026 18:03
- Wrap budget bar in a card component with shadow and title
- Show fund cap amount in card header
- Add gradient fills to progress bar segments (warning/success)
- Add smooth width animation on page load
- Replace inline statistics row with color-coded legend badges
- Show spent/remaining totals in a bordered footer section
- Update data-toggle to data-bs-toggle for Bootstrap 5
- Replace expenditure-block class with budget-bar-segment
- Improve responsive layout with flex utilities

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fix popover attributes: data-bs-toggle -> data-toggle, data-bs-content ->
  data-content, data-bs-placement -> data-placement, data-bs-html -> data-html
  (DARIA uses Bootstrap 4.6.2 which requires data-* not data-bs-*)
- Fix text-end -> text-right (BS4 utility class)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rolling2405 and others added 4 commits April 9, 2026 16:09
Update data attributes (data-toggle → data-bs-toggle, etc.) and
utility classes (text-right → text-end) for Bootstrap 5 compatibility.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace data-bs-* attributes with BS4 data-* equivalents
- Replace text-end with text-right for BS4 compatibility
- Add nil guard in sum_fund_pledges to return 0 for nil input
- Use fetch(:key, []) in budget_bar_remaining for missing keys

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add tests for nil expenditures, nil pledges, missing hash keys
- Add tests for negative values, float values, zero ceiling
- Add tests for budget_bar_remaining with nil input
- 21 new test cases covering 9 identified coverage gaps

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