Skip to content

style jar badges using their respective jar colors#1308

Open
kishore08-07 wants to merge 4 commits into
develfrom
kishore/jar-label-colors
Open

style jar badges using their respective jar colors#1308
kishore08-07 wants to merge 4 commits into
develfrom
kishore/jar-label-colors

Conversation

@kishore08-07

@kishore08-07 kishore08-07 commented Jul 3, 2026

Copy link
Copy Markdown
Member
  • Added CSS variables (--color-jar0 to --color-jar4) mapping jar indices to the new brand colors in index.css.
  • Created a getJarBgClass helper to map a jar's index to its Tailwind class (bg-jar0 to bg-jar4).
  • Updated the badges in the Receive Page and Send Form to use these CSS classes.
  • Refactored the jar labels across review/confirmation dialogs (PaymentConfirmDialog, CreateFidelityBondDialogSteps, MoveToJarDialog, and RenewBondDialog) to use styled badge elements, replacing the previous plain-text index representation.

Closes #1306

Signed-off-by: kishore08-07 <kishorebsm8@gmail.com>
@kishore08-07 kishore08-07 self-assigned this Jul 3, 2026
@kishore08-07 kishore08-07 added enhancement New feature or request SoB Issues, PRs, tasks, and discussions related to Summer of Bitcoin. WIP Work in Progress labels Jul 3, 2026
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 88.01% (🎯 80%) 4290 / 4874
🔵 Statements 87.97% (🎯 80%) 4849 / 5512
🔵 Functions 86.13% (🎯 80%) 1522 / 1767
🔵 Branches 80.07% (🎯 80%) 2757 / 3443
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/components/earn/MoveToJarDialog.tsx 81.7% 89.83% 66.66% 82.89% 76, 104-105, 112-113, 120-121, 141, 193-197, 378-391, 406, 422
src/components/earn/RenewBondDialog.tsx 82.52% 81.31% 65.51% 84.04% 77, 97, 123-124, 131-132, 139-140, 160, 212-216, 428-464, 479, 495
src/components/earn/CreateFidelityBondDialog/CreateFidelityBondDialogSteps.tsx 56.81% 70.49% 41.66% 54.76% 103-105, 127-129, 191-203, 271-317, 460-484, 546-574
src/components/receive/ReceivePage.tsx 87.17% 94.11% 78.57% 86.48% 86-88, 109, 228-229
src/components/send/PaymentConfirmDialog.tsx 100% 83.33% 100% 100%
src/components/send/SendForm.tsx 92.17% 80.58% 93.33% 92.45% 84, 257, 327-328, 330, 423-424, 564-579
src/components/ui/jam/jarColors.ts 100% 100% 100% 100%
Generated in workflow #3309 for commit 9bc5458 by the Vitest Coverage Report Action

Signed-off-by: kishore08-07 <kishorebsm8@gmail.com>
@kishore08-07 kishore08-07 removed the WIP Work in Progress label Jul 3, 2026
…ents

Signed-off-by: kishore08-07 <kishorebsm8@gmail.com>
@kishore08-07 kishore08-07 marked this pull request as ready for review July 3, 2026 18:30
Copilot AI review requested due to automatic review settings July 3, 2026 18:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aligns jar-specific label/badge styling with each jar’s brand color across the Receive and Send flows and several jar-related dialogs, addressing the UI consistency request in #1306.

Changes:

  • Added Tailwind v4 theme color variables for jar colors (--color-jar0--color-jar4, plus --color-jar-unknown) in src/index.css.
  • Introduced a getJarBgClass helper (with tests) to map jar indices to bg-jar* classes.
  • Refactored multiple jar labels (Receive/Send + dialogs) to render as colored Badge components using the new jar background classes.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/index.css Defines jar color theme variables (and unknown fallback) for Tailwind utilities.
src/components/ui/jam/jarColors.ts Adds getJarBgClass helper mapping jar index → bg-jar* class.
src/components/ui/jam/jarColors.test.ts Unit tests for jar index → class mapping and unknown handling.
src/components/send/SendForm.tsx Applies jar background classes to jar badges in the send form UI.
src/components/send/PaymentConfirmDialog.tsx Renders source/destination jar labels as colored badges in the confirm dialog.
src/components/receive/ReceivePage.tsx Updates receive jar label badge to use the jar color class (based on selected/displayed jar).
src/components/earn/RenewBondDialog.tsx Updates jar label in review/confirm UI to a colored badge.
src/components/earn/MoveToJarDialog.tsx Updates source/destination jar labels in confirm UI to colored badges.
src/components/earn/MoveToJarDialog.test.tsx Adjusts test expectations to match updated jar label rendering.
src/components/earn/CreateFidelityBondDialog/CreateFidelityBondDialogSteps.tsx Updates review-step jar label to a colored badge and uses selected jar metadata when available.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/receive/ReceivePage.tsx Outdated
Comment thread src/components/ui/jam/jarColors.ts Outdated
Signed-off-by: kishore08-07 <kishorebsm8@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request SoB Issues, PRs, tasks, and discussions related to Summer of Bitcoin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ui: align jar label colors

3 participants