Skip to content

feat(ComboBox): popup placement modes (#3795)#5128

Merged
shai-almog merged 1 commit into
masterfrom
fix-3795-combobox-popup-top
May 31, 2026
Merged

feat(ComboBox): popup placement modes (#3795)#5128
shai-almog merged 1 commit into
masterfrom
fix-3795-combobox-popup-top

Conversation

@shai-almog
Copy link
Copy Markdown
Collaborator

Summary

  • Add POPUP_PLACEMENT_AUTO (default), _ABOVE, _BELOW, _TOP_OF_FORM, _BOTTOM_OF_FORM constants on `ComboBox`.
  • Add `setPopupPlacement(int)` / `getPopupPlacement()`.
  • `showPopupDialog` honors the placement instead of always anchoring above/below based on `top > formHeight/2`.

Fixes #3795 — callers can now force the popup to the top of the form (or any other edge) without subclassing or reaching into package-private internals.

Test plan

  • Core compiles
  • Manual smoke in simulator with `combo.setPopupPlacement(ComboBox.POPUP_PLACEMENT_TOP_OF_FORM)`

🤖 Generated with Claude Code

…orm (#3795)

Adds POPUP_PLACEMENT_ABOVE / _BELOW / _TOP_OF_FORM / _BOTTOM_OF_FORM
constants and setPopupPlacement/getPopupPlacement so callers can force
the popup list to a specific edge instead of relying on the
"center of form" heuristic that pinned long lists to inconvenient
locations. POPUP_PLACEMENT_AUTO remains the default and preserves the
existing behavior.

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

shai-almog commented May 30, 2026

Compared 122 screenshots: 122 matched.

Native Android coverage

  • 📊 Line coverage: 12.85% (7478/58189 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 10.44% (37424/358309), branch 4.37% (1472/33720), complexity 5.46% (1774/32474), method 9.52% (1453/15256), class 15.56% (331/2127)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6327 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.ClassReader – 0.00% (0/1519 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1148 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.MethodWriter – 0.00% (0/923 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/730 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/623 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.Frame – 0.00% (0/564 lines covered)
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysJvmKt – 0.00% (0/495 lines covered)
      • kotlinx.coroutines.kotlinx.coroutines.JobSupport – 0.00% (0/423 lines covered)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 12.85% (7478/58189 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 10.44% (37424/358309), branch 4.37% (1472/33720), complexity 5.46% (1774/32474), method 9.52% (1453/15256), class 15.56% (331/2127)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6327 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.ClassReader – 0.00% (0/1519 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1148 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.MethodWriter – 0.00% (0/923 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/730 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/623 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.Frame – 0.00% (0/564 lines covered)
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysJvmKt – 0.00% (0/495 lines covered)
      • kotlinx.coroutines.kotlinx.coroutines.JobSupport – 0.00% (0/423 lines covered)

Benchmark Results

Detailed Performance Metrics

Metric Duration
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 native encode 723.000 ms
Base64 CN1 encode 181.000 ms
Base64 encode ratio (CN1/native) 0.250x (75.0% faster)
Base64 native decode 814.000 ms
Base64 CN1 decode 319.000 ms
Base64 decode ratio (CN1/native) 0.392x (60.8% faster)
Image encode benchmark status skipped (SIMD unsupported)

@shai-almog
Copy link
Copy Markdown
Collaborator Author

shai-almog commented May 30, 2026

Compared 122 screenshots: 122 matched.
✅ Native Mac screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 101 seconds

Detailed Performance Metrics

Metric Duration
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 native encode 817.000 ms
Base64 CN1 encode 1244.000 ms
Base64 encode ratio (CN1/native) 1.523x (52.3% slower)
Base64 native decode 479.000 ms
Base64 CN1 decode 1050.000 ms
Base64 decode ratio (CN1/native) 2.192x (119.2% slower)
Base64 SIMD encode 382.000 ms
Base64 encode ratio (SIMD/native) 0.468x (53.2% faster)
Base64 encode ratio (SIMD/CN1) 0.307x (69.3% faster)
Base64 SIMD decode 409.000 ms
Base64 decode ratio (SIMD/native) 0.854x (14.6% faster)
Base64 decode ratio (SIMD/CN1) 0.390x (61.0% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 69.000 ms
Image createMask (SIMD on) 9.000 ms
Image createMask ratio (SIMD on/off) 0.130x (87.0% faster)
Image applyMask (SIMD off) 165.000 ms
Image applyMask (SIMD on) 106.000 ms
Image applyMask ratio (SIMD on/off) 0.642x (35.8% faster)
Image modifyAlpha (SIMD off) 169.000 ms
Image modifyAlpha (SIMD on) 98.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.580x (42.0% faster)
Image modifyAlpha removeColor (SIMD off) 193.000 ms
Image modifyAlpha removeColor (SIMD on) 81.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.420x (58.0% faster)
Image PNG encode (SIMD off) 1054.000 ms
Image PNG encode (SIMD on) 881.000 ms
Image PNG encode ratio (SIMD on/off) 0.836x (16.4% faster)
Image JPEG encode 489.000 ms

@github-actions
Copy link
Copy Markdown
Contributor

✅ Continuous Quality Report

Test & Coverage

Static Analysis

  • SpotBugs [Report archive]
    • ByteCodeTranslator: 0 findings (no issues)
    • android: 0 findings (no issues)
    • codenameone-maven-plugin: 0 findings (no issues)
    • core-unittests: 0 findings (no issues)
    • ios: 0 findings (no issues)
  • PMD: 0 findings (no issues) [Report archive]
  • Checkstyle: 0 findings (no issues) [Report archive]

Generated automatically by the PR CI workflow.

@shai-almog
Copy link
Copy Markdown
Collaborator Author

shai-almog commented May 30, 2026

Compared 122 screenshots: 122 matched.
✅ Native iOS screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 197 seconds

Build and Run Timing

Metric Duration
Simulator Boot 65000 ms
Simulator Boot (Run) 1000 ms
App Install 12000 ms
App Launch 2000 ms
Test Execution 323000 ms

Detailed Performance Metrics

Metric Duration
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 native encode 879.000 ms
Base64 CN1 encode 1473.000 ms
Base64 encode ratio (CN1/native) 1.676x (67.6% slower)
Base64 native decode 406.000 ms
Base64 CN1 decode 1171.000 ms
Base64 decode ratio (CN1/native) 2.884x (188.4% slower)
Base64 SIMD encode 459.000 ms
Base64 encode ratio (SIMD/native) 0.522x (47.8% faster)
Base64 encode ratio (SIMD/CN1) 0.312x (68.8% faster)
Base64 SIMD decode 433.000 ms
Base64 decode ratio (SIMD/native) 1.067x (6.7% slower)
Base64 decode ratio (SIMD/CN1) 0.370x (63.0% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 66.000 ms
Image createMask (SIMD on) 12.000 ms
Image createMask ratio (SIMD on/off) 0.182x (81.8% faster)
Image applyMask (SIMD off) 214.000 ms
Image applyMask (SIMD on) 73.000 ms
Image applyMask ratio (SIMD on/off) 0.341x (65.9% faster)
Image modifyAlpha (SIMD off) 153.000 ms
Image modifyAlpha (SIMD on) 75.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.490x (51.0% faster)
Image modifyAlpha removeColor (SIMD off) 163.000 ms
Image modifyAlpha removeColor (SIMD on) 76.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.466x (53.4% faster)
Image PNG encode (SIMD off) 1058.000 ms
Image PNG encode (SIMD on) 883.000 ms
Image PNG encode ratio (SIMD on/off) 0.835x (16.5% faster)
Image JPEG encode 560.000 ms

@shai-almog
Copy link
Copy Markdown
Collaborator Author

shai-almog commented May 30, 2026

Compared 122 screenshots: 122 matched.
✅ Native iOS Metal screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 147 seconds

Build and Run Timing

Metric Duration
Simulator Boot 67000 ms
Simulator Boot (Run) 1000 ms
App Install 12000 ms
App Launch 6000 ms
Test Execution 278000 ms

Detailed Performance Metrics

Metric Duration
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 native encode 509.000 ms
Base64 CN1 encode 1261.000 ms
Base64 encode ratio (CN1/native) 2.477x (147.7% slower)
Base64 native decode 247.000 ms
Base64 CN1 decode 814.000 ms
Base64 decode ratio (CN1/native) 3.296x (229.6% slower)
Base64 SIMD encode 353.000 ms
Base64 encode ratio (SIMD/native) 0.694x (30.6% faster)
Base64 encode ratio (SIMD/CN1) 0.280x (72.0% faster)
Base64 SIMD decode 353.000 ms
Base64 decode ratio (SIMD/native) 1.429x (42.9% slower)
Base64 decode ratio (SIMD/CN1) 0.434x (56.6% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 55.000 ms
Image createMask (SIMD on) 8.000 ms
Image createMask ratio (SIMD on/off) 0.145x (85.5% faster)
Image applyMask (SIMD off) 111.000 ms
Image applyMask (SIMD on) 46.000 ms
Image applyMask ratio (SIMD on/off) 0.414x (58.6% faster)
Image modifyAlpha (SIMD off) 118.000 ms
Image modifyAlpha (SIMD on) 60.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.508x (49.2% faster)
Image modifyAlpha removeColor (SIMD off) 138.000 ms
Image modifyAlpha removeColor (SIMD on) 75.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.543x (45.7% faster)
Image PNG encode (SIMD off) 1442.000 ms
Image PNG encode (SIMD on) 921.000 ms
Image PNG encode ratio (SIMD on/off) 0.639x (36.1% faster)
Image JPEG encode 517.000 ms

@shai-almog shai-almog merged commit ed2bc55 into master May 31, 2026
23 of 24 checks passed
@shai-almog shai-almog deleted the fix-3795-combobox-popup-top branch May 31, 2026 00:49
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.

Combox doesn't allow Y placement at the top

1 participant