style jar badges using their respective jar colors#1308
Open
kishore08-07 wants to merge 4 commits into
Open
Conversation
Signed-off-by: kishore08-07 <kishorebsm8@gmail.com>
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Signed-off-by: kishore08-07 <kishorebsm8@gmail.com>
…ents Signed-off-by: kishore08-07 <kishorebsm8@gmail.com>
Contributor
There was a problem hiding this comment.
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) insrc/index.css. - Introduced a
getJarBgClasshelper (with tests) to map jar indices tobg-jar*classes. - Refactored multiple jar labels (Receive/Send + dialogs) to render as colored
Badgecomponents 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.
Signed-off-by: kishore08-07 <kishorebsm8@gmail.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.
--color-jar0to--color-jar4) mapping jar indices to the new brand colors inindex.css.getJarBgClasshelper to map a jar's index to its Tailwind class (bg-jar0tobg-jar4).PaymentConfirmDialog,CreateFidelityBondDialogSteps,MoveToJarDialog, andRenewBondDialog) to use styled badge elements, replacing the previous plain-text index representation.Closes #1306