-
Notifications
You must be signed in to change notification settings - Fork 433
Fix Sheet failing to block events for native components behind it #4334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Fix Sheet failing to block events for native components behind it #4334
Conversation
…ent. This change adds a transparent Button component behind the Sheet in its container. This ensures that native components (like BrowserComponent) correctly detect that they are covered by another component when checking `getComponentAt(x, y)`, preventing unwanted event propagation. The blocker also handles the standard "tap to dismiss" behavior.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
Android screenshot updatesCompared 30 screenshots: 28 matched, 2 updated.
Native Android coverage
|
…ent only when peers are present. This change conditionally adds a transparent Button component behind the Sheet in its container if Form.activePeerCount > 0. This ensures that native components (like BrowserComponent) correctly detect that they are covered by another component when checking `getComponentAt(x, y)`, preventing unwanted event propagation. The blocker is not added for lightweight-only forms to minimize overhead.
1. Conditionally add a background blocker in Sheet.java if Form.activePeerCount > 0. 2. Update KotlinUiTest.kt to demonstrate Sheet overlay. 3. Update BrowserComponentScreenshotTest.java to demonstrate Sheet over BrowserComponent. 4. Verify logic with unit tests (SheetPeerBlockingTest).
1. Refine blocker identification using a client property to avoid accidental removal of other components. 2. Update KotlinUiTest.kt and BrowserComponentScreenshotTest.java to use sheet.show(0) to prevent potential animation-related hangs on iOS. 3. Verify core logic with SheetPeerBlockingTest.
…ocker. 1. In `Sheet.java`: Add a transparent `Button` (blocker) to the Sheet container if `Form.activePeerCount > 0`. This intercepts pointer events for native peers. 2. Ensure blocker is removed if peers are no longer present. 3. Update `KotlinUiTest.kt` (lightweight only) and `BrowserComponentScreenshotTest.java` (with peer) to include Sheet display, verifying both scenarios. 4. Use `sheet.show(0)` in tests to prevent animation-related instability.
0d95f8b to
672e9ad
Compare
672e9ad to
af03dde
Compare









The fix involves:
Sheet.javashow()method.cnt) already has a blocker component.Buttonwith a large preferred size and adding it toBorderLayout.CENTERat index 0 (behind the sheet).PR created automatically by Jules for task 1567887631545379297 started by @shai-almog