Skip to content

Conversation

@google-labs-jules
Copy link
Contributor

The fix involves:

  1. Modifying Sheet.java show() method.
  2. Checking if the Sheet's container (cnt) already has a blocker component.
  3. If not, creating a transparent Button with a large preferred size and adding it to BorderLayout.CENTER at index 0 (behind the sheet).
  4. Ensuring the blocker hides the sheet on action events.
  5. Updating the sheet replacement logic to account for the presence of the blocker component in the container.

PR created automatically by Jules for task 1567887631545379297 started by @shai-almog

…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.
@google-labs-jules
Copy link
Contributor Author

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

@github-actions
Copy link

github-actions bot commented Dec 22, 2025

✅ Continuous Quality Report

Test & Coverage

Static Analysis

Generated automatically by the PR CI workflow.

@shai-almog
Copy link
Collaborator

shai-almog commented Dec 22, 2025

Android screenshot updates

Compared 30 screenshots: 28 matched, 2 updated.

  • BrowserComponent — updated screenshot. Screenshot differs (320x616 px, bit depth 8).

    BrowserComponent
    Preview info: JPEG preview quality 70; JPEG preview quality 70.
    Full-resolution PNG saved as BrowserComponent.png in workflow artifacts.

  • kotlin — updated screenshot. Screenshot differs (320x616 px, bit depth 8).

    kotlin
    Preview info: Preview provided by instrumentation.
    Full-resolution PNG saved as kotlin.png in workflow artifacts.

Native Android coverage

  • 📊 Line coverage: 24.75% (2645/10688 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 24.39% (12302/50433), branch 15.41% (717/4652), complexity 17.53% (741/4227), method 32.82% (596/1816), class 34.65% (105/303)
    • Lowest covered classes
      • com.codename1.impl.android.com.codename1.impl.android.AndroidContactsManager – 0.00% (0/400 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidImplementation$Video – 0.00% (0/168 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.IntentIntegrator – 0.00% (0/139 lines covered)
      • com.codename1.impl.android.util.com.codename1.impl.android.util.Base64 – 0.00% (0/117 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidImplementation$SocketImpl – 0.00% (0/77 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidTextureView – 0.00% (0/76 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidSurfaceView – 0.00% (0/73 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.LocalNotificationPublisher – 0.00% (0/65 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.FridaDetectionUtil – 0.00% (0/64 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidDB – 0.00% (0/57 lines covered)

@shai-almog
Copy link
Collaborator

shai-almog commented Dec 22, 2025

iOS screenshot updates

Compared 28 screenshots: 21 matched, 6 updated, 1 missing reference.

  • BrowserComponent — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    BrowserComponent
    Preview info: Preview provided by instrumentation.
    Full-resolution PNG saved as BrowserComponent.png in workflow artifacts.

  • graphics-draw-arc — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    graphics-draw-arc
    Preview info: JPEG preview quality 20; JPEG preview quality 20; downscaled to 603x1311.
    Full-resolution PNG saved as graphics-draw-arc.png in workflow artifacts.

  • graphics-draw-gradient — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    graphics-draw-gradient
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 844x1835.
    Full-resolution PNG saved as graphics-draw-gradient.png in workflow artifacts.

  • graphics-draw-round-rect — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots/graphics-draw-round-rect.png.

    graphics-draw-round-rect
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 844x1835.
    Full-resolution PNG saved as graphics-draw-round-rect.png in workflow artifacts.

  • graphics-draw-string — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    graphics-draw-string
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 422x918.
    Full-resolution PNG saved as graphics-draw-string.png in workflow artifacts.

  • graphics-draw-string-decorated — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    graphics-draw-string-decorated
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 603x1311.
    Full-resolution PNG saved as graphics-draw-string-decorated.png in workflow artifacts.

  • kotlin — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    kotlin
    Preview info: Preview provided by instrumentation.
    Full-resolution PNG saved as kotlin.png in workflow artifacts.

Benchmark Results

  • VM Translation Time: 273 seconds
  • Compilation Time: 64 seconds

Detailed Performance Metrics

Metric Duration
Build Time Statistics
Setup & Unzip 25088 ms
Extract Extensions 16 ms
Google Services Setup 3 ms
Scan Classes 469 ms
Extract Libs 883 ms
Inject Build Hints 19 ms
Generate Unit Tests 3 ms
Generate Stubs 854 ms
Compile Stubs 2085 ms
Generate Icons 940 ms
Prepare ParparVM 133 ms
ParparVM Execution 159769 ms
Post-VM Setup 116 ms
CocoaPods 4244 ms
Finalize 12 ms
Total Time 194635 msMaven Overhead : 79000 ms
CocoaPods Install (Script) 1000 ms
Simulator Boot (Run) 70000 ms
App Install 13000 ms
App Launch 7000 ms
Test Execution 186000 ms

…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.
@shai-almog shai-almog force-pushed the sheet-native-blocking-fix-1567887631545379297 branch from 0d95f8b to 672e9ad Compare December 24, 2025 09:11
@shai-almog shai-almog force-pushed the sheet-native-blocking-fix-1567887631545379297 branch from 672e9ad to af03dde Compare December 24, 2025 09:47
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.

2 participants