-
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
fix:Change the header for multi-select of expense inside my-expense #3277
Conversation
WalkthroughThe pull request introduces modifications to the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
📒 Files selected for processing (2)
src/app/fyle/my-expenses/my-expenses.page.html
(1 hunks)src/app/fyle/my-expenses/my-expenses.page.scss
(1 hunks)
🔇 Additional comments (2)
src/app/fyle/my-expenses/my-expenses.page.scss (1)
44-47
: Mind it! The style looks good, but let's make it super!
The new multiselect amount style follows our pattern perfectly, like how I follow my scripts! But I notice something interesting - other amount classes use font-weight 500, while this one uses 400. Are you sure about this difference, partner?
Compare with these existing styles:
&--amount {
font-size: 24px;
font-weight: 500;
}
&--homeCurrency {
font-size: 18px;
font-weight: 500;
}
Let me verify the visual impact with this command:
✅ Verification successful
Style! The font-weight 400 is perfectly fine, partner!
After scanning through the entire codebase like a bullet through the air, I can see that font-weight 400 is used extensively across our app's components, especially in similar contexts. Here's what I found, with style:
- Font-weight 400 appears in many form inputs, selects, and numerical displays
- It's consistently used in components that show amounts and statistics
- The pattern matches our app's design system for regular text weight
While some amount displays use 500, that's typically for primary amounts. This being a multiselect context, 400 is the right choice for better visual hierarchy, just like how I know exactly when to make my grand entrance!
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check if this new font-weight is used consistently across the app
rg -g "*.scss" "font-weight: 400"
Length of output: 12063
src/app/fyle/my-expenses/my-expenses.page.html (1)
69-72
: Mind it! This header change is simply superb!
The way you've separated the expense count and amount is stylish, just like how I make my grand entries! The pluralization logic and currency formatting are perfect, like a well-choreographed action sequence.
But listen here, partner! Let me verify if this new CSS class my-expenses--multiselect-amount
is properly styled.
✅ Verification successful
The previous command failed because the file type wasn't recognized. Let's search more broadly to find where this class might be defined and also check what style files exist in the repository.
I see the SCSS file exists in the correct location. Let me check if the class is properly styled, mind it!
Mind it! The style is perfectly defined, just like my signature moves!
The my-expenses--multiselect-amount
class is properly styled in the SCSS file with:
&--multiselect-amount {
font-size: 16px;
font-weight: 400;
}
This gives a clean, readable look to the amount display, making it stand out like a superstar! The changes are working in perfect harmony, partner.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if the CSS class is defined in the SCSS files
rg -l "my-expenses--multiselect-amount" --type scss
Length of output: 80
Script:
#!/bin/bash
# Let's try with a broader search for the CSS class
rg "my-expenses--multiselect-amount"
# Also search for scss/css files specifically
fd "\.(scss|css)$"
Length of output: 14216
Script:
#!/bin/bash
# Let's check the my-expenses.page.scss file specifically for this class
cat src/app/fyle/my-expenses/my-expenses.page.scss
Length of output: 5550
<ng-container *ngIf="allExpensesStats$ | async as allExpensesStats"> | ||
<ion-title class="my-expenses--multiselect-title page-title"> | ||
{{allExpensesStats?.count}} {{(allExpensesStats?.count > 1) ? 'expenses' : 'expense'}} worth | ||
{{(allExpensesStats.amount || 0) | humanizeCurrency: homeCurrency }} | ||
{{allExpensesStats?.count}} {{(allExpensesStats?.count > 1) ? 'expenses' : 'expense'}} | ||
<span class="my-expenses--multiselect-amount"> | ||
({{(allExpensesStats.amount || 0) | humanizeCurrency: homeCurrency }}) | ||
</span> | ||
</ion-title> | ||
</ng-container> |
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.
🧹 Nitpick (assertive)
Macha, let's add a safety net!
Like how I always protect people in my movies, let's protect our code from undefined stats! Consider adding a null check for better error handling.
<ng-container *ngIf="homeCurrency$ | async as homeCurrency">
- <ng-container *ngIf="allExpensesStats$ | async as allExpensesStats">
+ <ng-container *ngIf="(allExpensesStats$ | async) as allExpensesStats">
+ <ng-container *ngIf="allExpensesStats?.count !== undefined">
<ion-title class="my-expenses--multiselect-title page-title">
{{allExpensesStats?.count}} {{(allExpensesStats?.count > 1) ? 'expenses' : 'expense'}}
<span class="my-expenses--multiselect-amount">
({{(allExpensesStats.amount || 0) | humanizeCurrency: homeCurrency }})
</span>
</ion-title>
+ </ng-container>
</ng-container>
Committable suggestion skipped: line range outside the PR's diff.
|
…3277) Co-authored-by: Snehasish <snehasish@Snehasishs-MacBook-Air.local>
Clickup
https://app.clickup.com/t/86cx2wkch
Code Coverage
Please add code coverage here
UI Preview
Previous UI :
Updated UI :
Summary by CodeRabbit
New Features
Bug Fixes
Style