Skip to content

Conversation

@WizCoderr
Copy link
Contributor

@WizCoderr WizCoderr commented Nov 14, 2025

Fixes - Jira-#463

Didn't create a Jira ticket, click here to create new.

Please Add Screenshots If there are any UI changes.

Before After
Screenshot_20251114_221401 |

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the static analysis check ./gradlew check or ci-prepush.sh to make sure you didn't break anything

  • If you have multiple commits please combine them into one commit by squashing them.

Summary by CodeRabbit

  • Style
    • Updated greeting text punctuation formatting across all supported languages for improved consistency.
    • Reorganized home screen layout with refined positioning of Beneficiary and FAQ items for better visual organization.

@coderabbitai
Copy link

coderabbitai bot commented Nov 14, 2025

Walkthrough

Punctuation adjustments to greeting strings across 16 localized resource files, moving commas from after the placeholder to after the greeting word. Additionally, HomeScreen.kt layout restructured from a single FlowRow to a Column-based layout with explicit Beneficiary and Faq items rendered in a separate bottom Row.

Changes

Cohort / File(s) Summary
Localized Greeting String Updates
feature/home/src/commonMain/composeResources/values*/strings.xml (16 files: ar, bn, es, fa, fr, hi, id, km, kn, my, pl, pt, ru, sw, te, ur, and default)
Updated feature_home_greet string resource across all locales. Punctuation repositioned: comma moved from after placeholder %1$s, to after the greeting word (e.g., Hello, %1$s). Changes applied consistently across English, Spanish, French, Portuguese, Hindi, Bengali, Arabic, Persian, Urdu, Indonesian, Polish, Russian, Swahili, Khmer, Kannada, Burmese, and Telugu locales.
HomeScreen Layout Restructuring
feature/home/src/commonMain/kotlin/org/mifos/mobile/feature/home/HomeScreen.kt
Replaced single FlowRow layout with Column containing: (1) FlowRow for non-Beneficiary/Faq items with updated spacing (horizontal 16.dp, vertical 12.dp) and item width 72.dp, (2) Spacer and bottom Row explicitly rendering Beneficiary and Faq as separate ServiceItemCard entries with fixed width. Navigation behavior preserved; item width adjusted to wrapContentHeight.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • HomeScreen.kt: Review layout restructuring logic carefully; verify that Beneficiary and Faq items render correctly with fixed width and that spacing/alignment matches design intent. Ensure navigation callbacks are wired correctly for all items.
  • String changes: Repetitive punctuation updates across locales; spot-check one or two files to confirm pattern consistency, then scan remaining files for any deviations.

Poem

🐰 Commas leap before the name,
No longer trailing in the flame—
Hello, friend rings true and bright,
While rows stack neatly, left to right.
A greeting fresh, a layout neat,
Makes every locale feel complete! ✨

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 accurately summarizes the main changes in the PR: reorganizing service items (Beneficiary and FAQ moved to a separate row) and updating greeting punctuation across multiple language files.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 768a6a6 and 8ba97ae.

📒 Files selected for processing (19)
  • feature/home/src/commonMain/composeResources/values-ar/strings.xml (1 hunks)
  • feature/home/src/commonMain/composeResources/values-bn/strings.xml (1 hunks)
  • feature/home/src/commonMain/composeResources/values-es/strings.xml (1 hunks)
  • feature/home/src/commonMain/composeResources/values-fa/strings.xml (1 hunks)
  • feature/home/src/commonMain/composeResources/values-fr/strings.xml (1 hunks)
  • feature/home/src/commonMain/composeResources/values-hi/strings.xml (1 hunks)
  • feature/home/src/commonMain/composeResources/values-id/strings.xml (1 hunks)
  • feature/home/src/commonMain/composeResources/values-km/strings.xml (1 hunks)
  • feature/home/src/commonMain/composeResources/values-kn/strings.xml (1 hunks)
  • feature/home/src/commonMain/composeResources/values-my/strings.xml (1 hunks)
  • feature/home/src/commonMain/composeResources/values-pl/strings.xml (1 hunks)
  • feature/home/src/commonMain/composeResources/values-pt/strings.xml (1 hunks)
  • feature/home/src/commonMain/composeResources/values-ru/strings.xml (1 hunks)
  • feature/home/src/commonMain/composeResources/values-sw/strings.xml (1 hunks)
  • feature/home/src/commonMain/composeResources/values-te/strings.xml (1 hunks)
  • feature/home/src/commonMain/composeResources/values-ur/strings.xml (1 hunks)
  • feature/home/src/commonMain/composeResources/values/strings.xml (1 hunks)
  • feature/home/src/commonMain/kotlin/org/mifos/mobile/feature/home/HomeScreen.kt (2 hunks)
  • feature/home/src/commonMain/kotlin/org/mifos/mobile/feature/home/ServiceItem.kt (0 hunks)
💤 Files with no reviewable changes (1)
  • feature/home/src/commonMain/kotlin/org/mifos/mobile/feature/home/ServiceItem.kt
🔇 Additional comments (11)
feature/home/src/commonMain/composeResources/values-sw/strings.xml (1)

44-44: Consistent localization punctuation update across all locales.

All 8 provided locale files follow the same pattern: repositioning the comma from after the placeholder to immediately after the greeting word. This aligns with standard grammatical conventions across these languages (Swahili, Urdu, Portuguese, Burmese, Persian, French, Indonesian, and Russian).

The format string %1$s remains valid and properly positioned in all files.

Please verify that all 17 locales mentioned in the AI summary are updated consistently (since only 8 files are shown in this review).

feature/home/src/commonMain/composeResources/values-te/strings.xml (1)

44-44: LGTM! Punctuation improvement.

The comma repositioning in the Telugu greeting string improves readability and aligns with the punctuation updates across all locales in this PR.

feature/home/src/commonMain/composeResources/values-pl/strings.xml (1)

44-44: LGTM! Punctuation improvement.

The comma repositioning in the Polish greeting string improves readability and aligns with the punctuation updates across all locales in this PR.

feature/home/src/commonMain/composeResources/values-km/strings.xml (1)

44-44: LGTM! Punctuation improvement.

The comma repositioning in the Khmer greeting string improves readability and aligns with the punctuation updates across all locales in this PR.

feature/home/src/commonMain/composeResources/values-es/strings.xml (1)

44-44: LGTM! Punctuation improvement.

The comma repositioning in the Spanish greeting string improves readability and aligns with the punctuation updates across all locales in this PR.

feature/home/src/commonMain/composeResources/values-bn/strings.xml (1)

44-44: LGTM! Punctuation improvement.

The comma repositioning in the Bengali greeting string improves readability and aligns with the punctuation updates across all locales in this PR.

feature/home/src/commonMain/composeResources/values-hi/strings.xml (1)

44-44: LGTM! Punctuation improvement.

The comma repositioning in the Hindi greeting string improves readability and aligns with the punctuation updates across all locales in this PR.

feature/home/src/commonMain/composeResources/values/strings.xml (1)

46-46: LGTM! Punctuation improvement.

The comma repositioning in the default greeting string improves readability and is grammatically more correct. This change aligns with the punctuation updates across all locales in this PR.

feature/home/src/commonMain/kotlin/org/mifos/mobile/feature/home/HomeScreen.kt (1)

24-24: LGTM! Import used correctly.

The width import is properly used for the Spacer modifier on line 265.

feature/home/src/commonMain/composeResources/values-kn/strings.xml (1)

44-44: String format change preserves placeholder functionality.

The repositioned comma maintains the %1$s placeholder format correctly, so runtime string injection for the client name remains functional. Verify that this punctuation change is applied consistently across all 17 locales mentioned in the PR summary.

feature/home/src/commonMain/composeResources/values-ar/strings.xml (1)

44-44: Verify RTL rendering of repositioned comma in Arabic.

Arabic is a right-to-left language, and moving the comma from after %1$s to after the greeting word may affect visual rendering in the UI. The format spec %1$s remains functional, but test on RTL devices to confirm the comma placement appears as intended.

Comment on lines 252 to 271

Row(
modifier = Modifier
.padding(DesignToken.padding.medium)
.fillMaxWidth(2f),
horizontalArrangement = Arrangement.spacedBy(DesignToken.spacing.medium),
verticalAlignment = Alignment.CenterVertically
){
ServiceItemCard(
title = ServiceItem.Beneficiary.title,
icon = ServiceItem.Beneficiary.icon,
onClick = { onAction(HomeAction.OnNavigate(ServiceItem.Beneficiary.route)) }
)
Spacer(modifier = Modifier.width(DesignToken.spacing.medium))
ServiceItemCard(
title = ServiceItem.Faq.title,
icon = ServiceItem.Faq.icon,
onClick = { onAction(HomeAction.OnNavigate(ServiceItem.Faq.route)) }
)
}
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Refactor to maintain consistent layout pattern.

This implementation introduces several layout inconsistencies:

  1. Incorrect modifier value: Line 256 uses fillMaxWidth(2f), but the fraction parameter should be between 0 and 1.
  2. Inconsistent pattern: Existing service items are dynamically rendered from the items list within the FlowRow, but Beneficiary and Faq are now hardcoded in a separate Row, breaking the uniform grid layout.
  3. Missing modifiers: The new ServiceItemCard instances lack the weight(1f) modifier used by dynamically generated items (line 242).
  4. Grid disruption: The FlowRow specifies maxItemsInEachRow = 4, but the additional Row breaks this pattern.

Consider either:

  • Option 1: Keep Beneficiary and Faq in the serviceCards collection and render them dynamically with the rest.
  • Option 2: If these items require special positioning, refactor the entire ServiceBox layout to accommodate this design consistently.

Apply this diff to restore consistency (Option 1):

-
-        Row(
-            modifier = Modifier
-                .padding(DesignToken.padding.medium)
-                .fillMaxWidth(2f),
-            horizontalArrangement = Arrangement.spacedBy(DesignToken.spacing.medium),
-            verticalAlignment = Alignment.CenterVertically
-        ){
-            ServiceItemCard(
-                title = ServiceItem.Beneficiary.title,
-                icon = ServiceItem.Beneficiary.icon,
-                onClick = { onAction(HomeAction.OnNavigate(ServiceItem.Beneficiary.route)) }
-            )
-            Spacer(modifier = Modifier.width(DesignToken.spacing.medium))
-            ServiceItemCard(
-                title = ServiceItem.Faq.title,
-                icon = ServiceItem.Faq.icon,
-                onClick = { onAction(HomeAction.OnNavigate(ServiceItem.Faq.route)) }
-            )
-        }
     }
 }

Then restore Beneficiary and Faq to the serviceCards collection in ServiceItem.kt.

Committable suggestion skipped: line range outside the PR's diff.

@biplab1
Copy link
Contributor

biplab1 commented Nov 14, 2025

@coderabbitai can you improve the PR title and add this to PR description: Fixes - Jira-#463

Follow these docs:

@coderabbitai
Copy link

coderabbitai bot commented Nov 14, 2025

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Get current PR details
gh pr view 3002 --json title,body

# Update PR title to be more descriptive
gh pr edit 3002 --title "Reorganize service items and update greeting string formatting"

# Get current body and append Jira link
CURRENT_BODY=$(gh pr view 3002 --json body -q .body)
NEW_BODY="${CURRENT_BODY/Fixes - \[Jira-#Issue_Number\](https:\/\/mifosforge.jira.com\/browse\/MM-)/Fixes - [Jira-#463](https://mifosforge.jira.com/browse/MM-463)}"

# Update PR description
gh pr edit 3002 --body "$NEW_BODY"

# Verify changes
echo "=== Updated PR details ==="
gh pr view 3002 --json title,body

Length of output: 3514


@biplab1, I'm unable to update the PR title and description due to workflow restriction settings on the repository. The gh pr edit command is blocked.

However, I can suggest the changes you can make manually:

Suggested PR Title:

Reorganize service items and update greeting string formatting

Updated PR Description:
Replace this line:

Fixes - [Jira-#Issue_Number](https://mifosforge.jira.com/browse/MM-)

With:

Fixes - [Jira-#463](https://mifosforge.jira.com/browse/MM-463)

The suggested title better reflects the actual changes in this PR:

  • Reorganization of service items (Beneficiary and FAQ moved to a separate row)
  • Updated greeting string punctuation across 16 language localizations

If you'd like me to be able to make these changes directly in the future, you may need to adjust the workflow permissions for the CodeRabbit GitHub App in your repository settings.

@coderabbitai
Copy link

coderabbitai bot commented Nov 14, 2025

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Fetch the commit style guide from the repository
curl -s "https://raw.githubusercontent.com/openMF/mobile-wallet/refs/heads/master/wiki/Commit-style-guide.md" || \
curl -s "https://raw.githubusercontent.com/openMF/mobile-wallet/refs/heads/main/wiki/Commit-style-guide.md"

# Also check if there's a similar guide in the mifos-mobile repository
fd -t f "CONTRIBUTING" -x cat {} \;
fd -t f "commit.*guide" -i -x cat {} \;

Length of output: 15085


🏁 Script executed:

#!/bin/bash
# Try to update the PR title and description
gh pr view 3002 --json title,body

# Update PR title following conventional commits format
gh pr edit 3002 --title "feat(home): reorganize service items and update greeting punctuation"

# Get current body and update Jira link
CURRENT_BODY=$(gh pr view 3002 --json body -q .body)
NEW_BODY="${CURRENT_BODY/Fixes - \[Jira-#Issue_Number\](https:\/\/mifosforge.jira.com\/browse\/MM-)/Fixes - [Jira-#463](https://mifosforge.jira.com/browse/MM-463)}"

# Update PR description
gh pr edit 3002 --body "$NEW_BODY"

# Verify changes
echo "=== Updated PR details ==="
gh pr view 3002 --json title,body

Length of output: 3514


@biplab1, I'm unable to update the PR title and description directly due to workflow restriction settings on the repository. The gh pr edit command is blocked.

However, based on the commit style guide and the CONTRIBUTING.md guidelines, here are the changes you should make manually:

Suggested PR Title:

feat(home): reorganize service items and update greeting punctuation

Rationale:

  • Type: feat - This is a new feature/UI change for the end user
  • Scope: home - Changes are in the home feature module
  • Subject: Describes the two main changes: service items reorganization and greeting string updates

Updated PR Description:

Replace this line:

Fixes - [Jira-#Issue_Number](https://mifosforge.jira.com/browse/MM-)

With:

Fixes - [Jira-#463](https://mifosforge.jira.com/browse/MM-463)

The title follows the semantic commit message format: <type>(<scope>): <subject> where:

  • The subject is in present tense and lowercase
  • It clearly describes what the PR does (reorganizes service items and updates greeting punctuation across 16 language localizations)

If you'd like me to be able to make these changes directly in the future, you may need to adjust the workflow permissions for the CodeRabbit GitHub App in your repository settings.

@biplab1
Copy link
Contributor

biplab1 commented Nov 14, 2025

@WizCoderr Please update PR title and PR description (like Jira ticket) as suggested above.

@biplab1
Copy link
Contributor

biplab1 commented Nov 14, 2025

@WizCoderr It is always better to address the issues raised by @coderabbitai recommendations first, before asking anyone for a final review.

@coderabbitai
Copy link

coderabbitai bot commented Nov 14, 2025

Tip

For best results, initiate chat on the files or code changes.

@biplab1, understood! I'm here to help clarify any of my recommendations if @WizCoderr has questions while addressing them.

For reference, the main items to address from my review are:

  1. PR title and description updates - Following the conventional commits format as suggested above
  2. Any code review comments - If there are specific code-related recommendations in the review

Feel free to tag me if you need any clarifications on the suggestions! 😊

@WizCoderr WizCoderr changed the title Ui/Ux updated feat(home): reorganize service items and update greeting punctuation Nov 15, 2025
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

🧹 Nitpick comments (1)
feature/home/src/commonMain/kotlin/org/mifos/mobile/feature/home/HomeScreen.kt (1)

233-283: ServiceBox layout restructuring looks sound; consider deduping magic numbers and “special” items.

The new Column + FlowRow + Row structure correctly keeps Beneficiary and Faq in a dedicated bottom row, avoids duplication via filtering, and wires navigation as expected. To make this easier to maintain, you could:

  • Extract the repeated 72.dp into a shared constant (e.g., SERVICE_CARD_WIDTH).
  • Centralize the “secondary” items (Beneficiary/Faq) in a small collection used both in the filter and the bottom Row, instead of referencing them in two places.

These are optional cleanups; behavior as written is consistent and correct.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8ba97ae and a9b3ca9.

📒 Files selected for processing (1)
  • feature/home/src/commonMain/kotlin/org/mifos/mobile/feature/home/HomeScreen.kt (2 hunks)
🔇 Additional comments (1)
feature/home/src/commonMain/kotlin/org/mifos/mobile/feature/home/HomeScreen.kt (1)

24-24: Import of width matches usage in ServiceBox.

The added width import is correctly used for card sizing below and looks good.

@WizCoderr
Copy link
Contributor Author

WizCoderr commented Nov 15, 2025

@coderabbitai can you review my pr

@coderabbitai
Copy link

coderabbitai bot commented Nov 15, 2025

@WizCoderr, I'll review the PR for you now! I'll analyze the code changes, check for any issues, and provide feedback on the implementation.

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai
Copy link

coderabbitai bot commented Nov 15, 2025

@WizCoderr, I'll review the PR for you now! 🐰

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

icon = ServiceItem.Faq.icon,
onClick = { onAction(HomeAction.OnNavigate(ServiceItem.Faq.route)) },
modifier = Modifier.width(72.dp),
)
Copy link
Contributor

@Nagarjuna0033 Nagarjuna0033 Nov 19, 2025

Choose a reason for hiding this comment

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

@WizCoderr I think this is not correct way to organize the items on dashboard because you designed this for a fixed items for now it may work what if it the items increases in future, will UI stay consistence? so find a generic approach instead of this approach

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.

3 participants