Skip to content

fix: Identifier menu UI and added delete confirmation dialog#2577

Merged
therajanmaurya merged 4 commits intoopenMF:developmentfrom
kartikey004:fix/identifier-delete-dialog
Jan 21, 2026
Merged

fix: Identifier menu UI and added delete confirmation dialog#2577
therajanmaurya merged 4 commits intoopenMF:developmentfrom
kartikey004:fix/identifier-delete-dialog

Conversation

@kartikey004
Copy link
Contributor

@kartikey004 kartikey004 commented Jan 17, 2026

Fixes - Jira-#364

Description - Updated MifosActionsListingCardComponent to use string resources, fixing the issue where raw class names like ViewDocument were shown in dropdown menus. Also added a reconfirmation dialog in ClientIdentifiersListScreen to avoid accidental document deletions and improve the overall user experience.

Video -

Reconfirmation_Dialog.webm

Summary by CodeRabbit

  • New Features

    • Added a confirmation dialog to prevent accidental deletion of client identity documents.
    • New action labels: "Pay Outstanding Amount", "Edit", and "Delete".
  • UI Improvements

    • Action menus now show localized text labels with icons for clearer, consistent action descriptions.

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

@coderabbitai
Copy link

coderabbitai bot commented Jan 17, 2026

📝 Walkthrough

Walkthrough

Added three localized action strings, refactored action rendering to use an Actions sealed class with StringResource labels and ActionMenuRow, and introduced a staged delete-confirmation dialog flow for client identifiers.

Changes

Cohort / File(s) Summary
String resources
core/ui/src/commonMain/composeResources/values/strings.xml
Added three new localized strings: core_ui_pay_outstanding_amount, core_ui_edit, and core_ui_delete.
Actions component & UI refactor
core/ui/src/commonMain/kotlin/com/mifos/core/ui/components/MifosActionsListingCardComponent.kt
Sealed class Actions now includes text: StringResource; concrete actions updated to provide string resources (e.g., PayOutstandingAmount, Edit, Delete); introduced ActionMenuRow composable and replaced inline action row rendering with reusable row.
Client identifiers — staged deletion flow
feature/client/src/commonMain/kotlin/com/mifos/feature/client/clientIdentifiersList/ClientIdentifiersListScreen.kt, .../ClientIdentifiersListViewModel.kt
Added DialogState.DeleteConfirmation and ClientIdentifiersListAction.ShowDeleteConfirmation; list screen now shows a delete confirmation dialog and only dispatches DeleteDocument(id, uniqueKey) after confirmation; added related string resources (delete_dialog_*).
Feature strings
feature/client/src/commonMain/composeResources/values/strings.xml
Added delete_dialog_identifier_message (public string) used by the new delete confirmation dialog.

Sequence Diagram(s)

sequenceDiagram
    participant User as User
    participant Screen as ClientIdentifiersListScreen
    participant Dialog as DeleteConfirmationDialog
    participant VM as ClientIdentifiersListViewModel

    User->>Screen: open item menu / select "Delete"
    Screen->>Screen: set dialogState = DeleteConfirmation(id, uniqueKey)
    Screen->>Dialog: show dialog (dialogState)
    User->>Dialog: confirm
    Dialog->>VM: dispatch DeleteDocument(id, uniqueKey)
    VM->>VM: perform delete, update state
    VM->>Screen: emit deletion result
    Screen->>Screen: clear dialogState
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • revanthkumarJ
  • biplab1

Poem

🐰 I nibble labels, tidy and bright,
Rows now hum with language light,
A cautious paw halts the hasty delete,
Confirmed, then hopped — the list is neat,
🥕 small hops, tidy feats.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ 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 two main changes: fixing the identifier menu UI to display proper labels and adding a delete confirmation dialog.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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

🤖 Fix all issues with AI agents
In
`@core/ui/src/commonMain/kotlin/com/mifos/core/ui/components/MifosActionsListingCardComponent.kt`:
- Around line 115-119: The Icon call in MifosActionsListingCardComponent (the
Icon composable using imageVector = menuItem.icon) is decorative but uses
contentDescription = "" which keeps it in accessibility semantics; change it to
contentDescription = null to remove it from the accessibility tree so screen
readers ignore the decorative icon (update the Icon invocation in
MifosActionsListingCardComponent.kt where imageVector = menuItem.icon).

In
`@feature/client/src/commonMain/kotlin/com/mifos/feature/client/clientIdentifiersList/ClientIdentifiersListScreen.kt`:
- Around line 172-174: The DeleteDocument handler currently stages a delete
using (item.id ?: -1) which can produce an invalid -1 id; update the
Actions.DeleteDocument branch in the event handler (the code path that sets
itemToDelete and uses uniqueKeyForHandleDocument) to first check item.id != null
and only assign itemToDelete when id is non-null, otherwise ignore the action
(or surface no Delete option); apply the same null-guard pattern to the other
identical block referenced (the block around the other Actions.DeleteDocument
handling at the 203-209 area).

@kartikey004
Copy link
Contributor Author

@itsPronay

Updated dialog message:

@therajanmaurya therajanmaurya merged commit c204fc4 into openMF:development Jan 21, 2026
3 checks passed
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