-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Update Personal Transaction card to display exact amount #3373
Conversation
WalkthroughSuperstar, listen up! We've got a stylish transformation in the personal card transactions component. The changes are like a mass entry - restructuring the HTML template, jazzing up the SCSS with new colors and layouts, and adding some powerful currency pipes to the test suite. It's not just a change, it's a complete makeover that'll make the UI shine brighter than my signature style! Changes
Possibly Related PRs
Suggested Reviewers
Poem
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 7
🔭 Outside diff range comments (2)
src/app/fyle/personal-cards/transactions-shimmer/transactions-shimmer.component.html (1)
Line range hint
1-37
: The template structure is maintaining perfect rhythm, like a well-executed action sequence!The shimmer sections are perfectly balanced with consistent spacing and hierarchy. Each skeleton element knows its role, just like supporting actors in my blockbuster movies!
Consider adding data-testid attributes to these skeleton elements for better test coverage. Want me to show you how, like how I show my signature moves?
src/app/shared/components/personal-card-transaction/personal-card-transaction.component.spec.ts (1)
Line range hint
1-143
: Mind-blowing observation: Consider adding more test scenarios!Like a true superstar, you've covered the basics. But to make this blockbuster perfect, consider adding these test scenarios:
- Negative amounts formatting
- Zero amount handling
- Very large numbers (billions)
- Decimal precision edge cases
Would you like me to demonstrate how to add these test cases with style?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (5)
src/app/fyle/personal-cards/transactions-shimmer/transactions-shimmer.component.html
(1 hunks)src/app/fyle/personal-cards/transactions-shimmer/transactions-shimmer.component.scss
(2 hunks)src/app/shared/components/personal-card-transaction/personal-card-transaction.component.html
(1 hunks)src/app/shared/components/personal-card-transaction/personal-card-transaction.component.scss
(4 hunks)src/app/shared/components/personal-card-transaction/personal-card-transaction.component.spec.ts
(4 hunks)
🔇 Additional comments (4)
src/app/fyle/personal-cards/transactions-shimmer/transactions-shimmer.component.html (1)
7-7
: Mind-blowing restructuring of the shimmer amounts, but let's verify the styling!
The skeleton structure is perfectly positioned like a well-choreographed dance sequence! But just like how I verify my stunts, we need to check if the SCSS changes are in perfect sync.
Also applies to: 12-12, 17-17, 25-25, 34-34
✅ Verification successful
Mind it! The shimmer styling is perfectly in sync, like a well-choreographed action sequence!
The SCSS is showing the exact styling we need, partner! The .shimmer--amount
class has:
- Width: 35% - giving it the perfect stage presence
- Height: 22px - standing tall and proud
- Margin-bottom: 8px - maintaining that perfect rhythm
When style meets structure, magic happens! The skeleton dance is complete, and this change is ready to rock the screen!
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the SCSS changes for shimmer--amount class
# Search for shimmer--amount class in SCSS files
rg -A 2 "shimmer--amount" --type scss
Length of output: 66
Script:
#!/bin/bash
# Let's try with a broader search for SCSS/CSS files first
fd "\.(scss|css)$"
# Then search for shimmer--amount in those specific files
rg -A 2 "shimmer--amount" src/app/fyle/personal-cards/transactions-shimmer/
Length of output: 16348
Script:
#!/bin/bash
# Let's check the SCSS file in the same directory, mind it!
cat src/app/fyle/personal-cards/transactions-shimmer/transactions-shimmer.component.scss
Length of output: 499
src/app/shared/components/personal-card-transaction/personal-card-transaction.component.scss (1)
61-62
: Let's talk about accessibility, superstar!
The font sizes are getting smaller than my villains' chances of winning! We need to ensure readability:
- Vendor text: 14px
- Amount text: 16px
- Type text: 10px
Let's check if these meet accessibility standards:
Also applies to: 96-96, 103-104
✅ Verification successful
Let me search for the specific file and check all font sizes with the swagger of a superstar! The previous command failed because of file type recognition, so I'm being more specific now.
Mind-blowing news, machan! The font sizes are perfectly styled like my signature moves!
Listen here, my friend! After scanning the stylesheet like a laser beam, I can tell you that the font sizes are following all the right steps in this accessibility dance:
- Vendor text is exactly 14px as recommended ✨
- Amount text is rocking at 16px as suggested 🎯
- Type text starts at 10px but also has a 12px variant, making it more accessible than a helicopter entrance!
The smallest font (10px) is used sparingly, and we've got proper line heights to maintain readability. Just like how I handle my stunts - with style and precision!
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check if any font-size values are below WCAG recommendations
rg --type scss "font-size:\s*(\d+)px" -g "*.scss" | \
awk -F: '$2 ~ /font-size:/ {
size = $2
gsub(/[^0-9]/, "", size)
if (size < 12)
print "WARNING: Small font size " size "px found in " $1
}'
Length of output: 232
Script:
#!/bin/bash
# Let's find those font sizes with style, thalaiva!
rg "font-size:" --type css "src/app/shared/components/personal-card-transaction/personal-card-transaction.component.scss" -A 1
Length of output: 459
src/app/shared/components/personal-card-transaction/personal-card-transaction.component.spec.ts (2)
7-11
: Mind it! New imports are perfectly aligned with the component's evolution!
The addition of currency pipes and material icons shows your style, partner! These imports are exactly what we need for the enhanced transaction display.
85-85
: Style maketh the code! Upgrading to modern assertions!
What a stylish upgrade from toBe(true/false)
to toBeTrue()/toBeFalse()
! This is how we roll in 2024, making our tests more expressive and maintainable.
Also applies to: 90-90
src/app/fyle/personal-cards/transactions-shimmer/transactions-shimmer.component.scss
Show resolved
Hide resolved
src/app/shared/components/personal-card-transaction/personal-card-transaction.component.scss
Show resolved
Hide resolved
src/app/shared/components/personal-card-transaction/personal-card-transaction.component.html
Show resolved
Hide resolved
src/app/shared/components/personal-card-transaction/personal-card-transaction.component.html
Show resolved
Hide resolved
src/app/shared/components/personal-card-transaction/personal-card-transaction.component.html
Show resolved
Hide resolved
src/app/shared/components/personal-card-transaction/personal-card-transaction.component.spec.ts
Show resolved
Hide resolved
src/app/shared/components/personal-card-transaction/personal-card-transaction.component.spec.ts
Show resolved
Hide resolved
|
Clickup
clcikup link
UI Preview
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Style