Skip to content

fix: destructive modal close behavior#1138

Merged
carddev81 merged 1 commit into
mainfrom
CK-7vn/modal-esc
May 28, 2026
Merged

fix: destructive modal close behavior#1138
carddev81 merged 1 commit into
mainfrom
CK-7vn/modal-esc

Conversation

@CK-7vn

@CK-7vn CK-7vn commented May 26, 2026

Copy link
Copy Markdown
Member

Pre-Submission PR Checklist

  • No debug/console/fmt.Println statements
  • Unnecessary development comments removed
  • All acceptance criteria verified
  • Functions according to ticket specifications
  • Tested manually where applicable
  • Branch rebased with latest main
  • No business logic exists within the database layer

Description of the change

Fixes modal escape behavior on destructive actions like bulk user actions, and user transfers. Users can now only exit the modal through the x button, cancel, and escape key.

@CK-7vn CK-7vn requested a review from a team as a code owner May 26, 2026 20:57
@CK-7vn CK-7vn requested review from calisio and removed request for a team May 26, 2026 20:57
@coderabbitai

coderabbitai Bot commented May 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@CK-7vn, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 59 minutes and 36 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b45ecd0d-0f1d-4b13-9b75-dd37321be33a

📥 Commits

Reviewing files that changed from the base of the PR and between d98e622 and 8cc87ad.

📒 Files selected for processing (3)
  • frontend/src/components/residents/BulkActionDialogs.tsx
  • frontend/src/components/residents/ResidentDialogs.tsx
  • frontend/src/pages/class-detail/DeleteClassModal.tsx
📝 Walkthrough

Walkthrough

This PR adds the preventOutsideClose prop to FormModal instances across seven dialogs in three files: bulk action dialogs (reset password, deactivate, delete), resident dialogs (deactivate, delete, transfer), and the class deletion modal. The prop prevents users from closing these dialogs by clicking outside the modal content.

Changes

Modal Outside-Click Prevention Configuration

Layer / File(s) Summary
Bulk action dialog modal configuration
frontend/src/components/residents/BulkActionDialogs.tsx
Added preventOutsideClose prop to FormModal in BulkResetPasswordDialog, BulkDeactivateDialog, and BulkDeleteDialog to prevent dismissal on outside clicks.
Resident management dialog modal configuration
frontend/src/components/residents/ResidentDialogs.tsx
Added preventOutsideClose prop to FormModal in DeactivateDialog, DeleteDialog, and TransferDialog to prevent dismissal on outside clicks.
Class deletion modal configuration
frontend/src/pages/class-detail/DeleteClassModal.tsx
Added preventOutsideClose prop to FormModal in DeleteClassModal to prevent dismissal on outside clicks.
🚥 Pre-merge checks | ✅ 4 | ❌ 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 (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: destructive modal close behavior' directly and clearly summarizes the main change: preventing outside-click modal closing for destructive actions across multiple dialogs.
Description check ✅ Passed The description is well-related to the changeset, providing context about the modal escape behavior fix, listing affected files with line numbers, and referencing the related Asana task.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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


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.

@CK-7vn CK-7vn force-pushed the CK-7vn/modal-esc branch from d98e622 to 8cc87ad Compare May 28, 2026 17:44
@carddev81 carddev81 requested review from carddev81 and removed request for calisio May 28, 2026 19:37

@carddev81 carddev81 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Amazing work!!! Tested Good.

@carddev81 carddev81 merged commit 75aa0b1 into main May 28, 2026
10 checks passed
@carddev81 carddev81 deleted the CK-7vn/modal-esc branch May 28, 2026 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants