Skip to content

fix: close get-prompt modal on backdrop click#179

Merged
tomasz-tomczyk merged 1 commit intomainfrom
fix-prompt-modal-click-outside
May 5, 2026
Merged

fix: close get-prompt modal on backdrop click#179
tomasz-tomczyk merged 1 commit intomainfrom
fix-prompt-modal-click-outside

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

@tomasz-tomczyk tomasz-tomczyk commented May 5, 2026

Summary

  • Add phx-click-away={JS.hide(to: "#crit-prompt-panel")} on the prompt dialog body so clicking the backdrop dismisses the "Get prompt" / "Act on comments" overlay.
  • Update AGENTS.md to recommend phx-click-away over a colocated hook for click-outside-to-close (the binding only fires when the bound element is visible, so there's no race with the open click).

Review

  • Code review: passed
  • Parity audit: passed

Test plan

  • Open Get prompt panel, click on the dimmed backdrop → panel closes
  • Click inside the dialog body → panel stays open
  • Open then immediately re-open → no race with the show animation

See also: tomasz-tomczyk/crit#470 (companion fix for the Finish Review modal in crit/).

🤖 Generated with Claude Code

Use phx-click-away on the dialog body to dismiss when the user clicks the overlay backdrop. Updates AGENTS.md to recommend phx-click-away over a colocated hook for click-outside-to-close.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.14%. Comparing base (9c1c8b6) to head (873ac90).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #179   +/-   ##
=======================================
  Coverage   79.14%   79.14%           
=======================================
  Files          56       56           
  Lines        1817     1817           
=======================================
  Hits         1438     1438           
  Misses        379      379           
Flag Coverage Δ
unit 79.14% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tomasz-tomczyk tomasz-tomczyk merged commit 6f6ea13 into main May 5, 2026
4 checks passed
@tomasz-tomczyk tomasz-tomczyk deleted the fix-prompt-modal-click-outside branch May 5, 2026 22:02
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.

1 participant