WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@TapanYadav000
Copy link

@TapanYadav000 TapanYadav000 commented Dec 23, 2025

Summary

This PR improves spacing and layout consistency in the Loan Account Summary screen by aligning paddings, spacers, and component sizes with Material Design guidelines.

Changes

  • Standardized horizontal and vertical paddings
  • Improved spacing between UI sections for better readability
  • Updated button height to match Material Design recommendations
  • Reduced use of arbitrary spacing values for a cleaner layout

Motivation

The previous layout used inconsistent spacing values (e.g. 2dp, 4dp, 6dp), which affected visual consistency and readability. These changes make the screen more polished and consistent with modern Compose UI practices.

Testing

  • Built and ran the app locally
  • Verified Loan Account Summary screen layout visually
  • No functional behavior was changed

Screenshots

N/A (visual spacing improvement only)

Summary by CodeRabbit

  • Style
    • Refined spacing and padding across the Loan Account Summary screen for improved visual hierarchy—reduced content inset, increased vertical spacing for client name and dividers, and larger spacer gaps.
    • Updated button sizing and horizontal padding for more consistent touch targets and better visual balance.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 23, 2025

Walkthrough

Adjusts UI spacing and component dimensions in LoanAccountSummaryScreen: reduces container horizontal padding, increases vertical paddings for text and divider, enlarges Canvas padding and Spacer heights, and changes Button padding and height.

Changes

Cohort / File(s) Summary
UI Spacing & Dimension Adjustments
feature/loan/src/commonMain/kotlin/com/mifos/feature/loan/loanAccountSummary/LoanAccountSummaryScreen.kt
Reduced main container horizontal padding (24.dp → 16.dp); increased client name vertical padding (top/bottom 8.dp → vertical 12.dp); Canvas padding (top/end 4.dp → 8.dp); HorizontalDivider top padding (2.dp → 8.dp); spacer heights (8.dp → 12.dp, 4.dp → 12.dp); Button horizontal padding (8.dp → 16.dp) and height (45.dp → 48.dp).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: improving Material Design spacing in the LoanAccountSummaryScreen, which matches the padding and layout adjustments detailed in the changeset.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 19e9a66 and ddce4a5.

📒 Files selected for processing (1)
  • feature/loan/src/commonMain/kotlin/com/mifos/feature/loan/loanAccountSummary/LoanAccountSummaryScreen.kt
🚧 Files skipped from review as they are similar to previous changes (1)
  • feature/loan/src/commonMain/kotlin/com/mifos/feature/loan/loanAccountSummary/LoanAccountSummaryScreen.kt

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
feature/loan/src/commonMain/kotlin/com/mifos/feature/loan/loanAccountSummary/LoanAccountSummaryScreen.kt (1)

286-312: Fix accessibility: provide meaningful contentDescription for status indicator.

While the padding increase from 4dp to 8dp improves spacing consistency, the Canvas element's contentDescription is set to an empty string. This Canvas draws a color-coded status indicator (green for active, yellow for pending approval, blue for waiting for disbursal, black otherwise) that conveys important loan status information visually. Screen reader users need a textual description of this status.

🔎 Proposed fix for accessibility
+val statusDescription = stringResource(
+    when {
+        loanWithAssociations.status.active == true -> {
+            // Add appropriate string resource for "Loan is active"
+            Res.string.feature_loan_status_active
+        }
+        loanWithAssociations.status.pendingApproval == true -> {
+            // Add appropriate string resource for "Loan pending approval"
+            Res.string.feature_loan_status_pending_approval
+        }
+        loanWithAssociations.status.waitingForDisbursal == true -> {
+            // Add appropriate string resource for "Loan waiting for disbursal"
+            Res.string.feature_loan_status_waiting_disbursal
+        }
+        else -> {
+            // Add appropriate string resource for "Loan closed"
+            Res.string.feature_loan_status_closed
+        }
+    }
+)
 Canvas(
     modifier = Modifier
         .size(22.dp)
         .padding(top = 8.dp, end = 8.dp),
-    contentDescription = "",
+    contentDescription = statusDescription,
     onDraw = {

Note: You'll need to add the corresponding string resources to your resource files.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 78b3242 and 19e9a66.

📒 Files selected for processing (1)
  • feature/loan/src/commonMain/kotlin/com/mifos/feature/loan/loanAccountSummary/LoanAccountSummaryScreen.kt
🔇 Additional comments (6)
feature/loan/src/commonMain/kotlin/com/mifos/feature/loan/loanAccountSummary/LoanAccountSummaryScreen.kt (6)

269-269: LGTM! Aligns with Material Design guidelines.

The reduction from 24dp to 16dp for horizontal padding aligns with Material Design 3's standard screen edge margins, providing consistent spacing across the app.


275-277: LGTM! Improved spacing and cleaner code.

The change from 8dp to 12dp vertical padding improves visual hierarchy for the client name, and the unified vertical padding is more concise than separate top/bottom values.


320-324: LGTM! Improved spacing consistency.

The change from 2dp to 8dp aligns with the 4dp grid system and provides better visual separation between sections.


355-355: LGTM! Better visual separation.

Increasing the spacer from 8dp to 12dp provides improved visual separation before the data table section.


362-362: LGTM! Improved visual hierarchy.

Increasing the spacer from 4dp to 12dp provides better separation between the data table and the action button, improving visual hierarchy.


364-396: LGTM! Aligns with Material Design touch target guidelines.

The button height increase from 45dp to 48dp aligns with Material Design's recommended minimum touch target size of 48dp, improving accessibility and usability. The horizontal padding increase from 8dp to 16dp also provides better spacing for button content.

@TapanYadav000
Copy link
Author

Thanks for the review!
I’ve addressed the formatting issues flagged by Spotless and verified the UI changes locally.
Happy to make any further adjustments if needed.

Copy link
Collaborator

@itsPronay itsPronay left a comment

Choose a reason for hiding this comment

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

@TapanYadav000 , thank you for your contribution, but can you confirm if the changes you have made are according to the Figma file? We are currently following the Figma design and want it to stay consistent in every screen

Copy link
Contributor

@revanthkumarJ revanthkumarJ left a comment

Choose a reason for hiding this comment

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

use paddings from DesignToken

@therajanmaurya
Copy link
Member

Closing in reference of #2562

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.

4 participants