Skip to content

refactor: make picker item height probe internal - #143

Closed
kez-lab wants to merge 1 commit into
mainfrom
feature/internal-item-height-probe
Closed

kez-lab wants to merge 1 commit into
mainfrom
feature/internal-item-height-probe

Conversation

@kez-lab

@kez-lab kez-lab commented Aug 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Remove the public itemHeightProbeText parameter from PickerItemFormat and the PickerDefaults.*Format(...) factories, introduced in feat: add picker item height probe #133, before it ships in a public release.
  • Keep bounded height probes for the built-in numeric and AM/PM formatters through an internal identity check; custom formatters always use exact per-item measurement so an insufficient caller-supplied probe can no longer clip item text.
  • Update ABI dumps, CHANGELOG, and both READMEs to drop the public performance-contract documentation.

Verification

  • ./gradlew :datetimepicker:test :datetimepicker:testDebugUnitTest :datetimepicker:checkLegacyAbi --no-daemon passed locally.
  • git diff --check origin/main...HEAD clean.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Changed

    • Built-in date, time, and period pickers now use bounded height measurement for smoother handling of large lists.
    • Custom formatting continues to measure items precisely for accurate display.
    • Simplified picker formatting options by removing optional height-probe text configuration.
  • Documentation

    • Updated English and Korean guides and examples to reflect the streamlined formatting options.
    • Updated the changelog with the revised measurement behavior.

Remove the public itemHeightProbeText parameter from PickerItemFormat and
the PickerDefaults format factories. Built-in numeric and period formatters
keep bounded height probes through internal identity checks, while custom
formatters always use exact per-item measurement so fallback-font glyphs
cannot be clipped by an insufficient caller-supplied probe.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 4, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6a86077c-71c0-4800-8ea7-8d7cabed644a

📥 Commits

Reviewing files that changed from the base of the PR and between 6994c14 and 241d731.

📒 Files selected for processing (11)
  • CHANGELOG.md
  • README.md
  • README_KO.md
  • datetimepicker/api/android/datetimepicker.api
  • datetimepicker/api/datetimepicker.klib.api
  • datetimepicker/api/desktop/datetimepicker.api
  • datetimepicker/src/androidUnitTest/kotlin/com/kez/picker/PickerItemHeightRobolectricTest.kt
  • datetimepicker/src/commonMain/kotlin/com/kez/picker/Picker.kt
  • datetimepicker/src/commonMain/kotlin/com/kez/picker/PickerDefaults.kt
  • datetimepicker/src/commonMain/kotlin/com/kez/picker/PickerFormat.kt
  • datetimepicker/src/commonTest/kotlin/com/kez/picker/PickerItemHeightMeasurementTest.kt
💤 Files with no reviewable changes (1)
  • datetimepicker/src/androidUnitTest/kotlin/com/kez/picker/PickerItemHeightRobolectricTest.kt

📝 Walkthrough

Walkthrough

The change removes configurable item-height probe text from picker format APIs. Built-in numeric date/time and period formatters now use bounded probes. Generic and custom formatters retain exact per-item measurement.

Changes

Picker height measurement

Layer / File(s) Summary
Remove configurable probe APIs
datetimepicker/src/commonMain/kotlin/com/kez/picker/PickerFormat.kt, datetimepicker/src/commonMain/kotlin/com/kez/picker/PickerDefaults.kt, datetimepicker/api/desktop/datetimepicker.api
PickerItemFormat and picker format factories no longer accept or store height-probe text.
Select built-in probes
datetimepicker/src/commonMain/kotlin/com/kez/picker/PickerDefaults.kt, datetimepicker/src/commonMain/kotlin/com/kez/picker/Picker.kt
Built-in numeric and period formatters use bounded probes. Generic and custom formatters measure every item.
Validate and update documentation
datetimepicker/src/commonTest/kotlin/com/kez/picker/PickerItemHeightMeasurementTest.kt, CHANGELOG.md, README.md, README_KO.md
Tests cover built-in, generic, custom, and copied custom formatters. Documentation removes the old probe-text API and describes bounded probes.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: making picker item height probes internal.
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.
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch feature/internal-item-height-probe
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/internal-item-height-probe

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.

@kez-lab

kez-lab commented Aug 4, 2026

Copy link
Copy Markdown
Owner Author

Superseded: the same internalization already merged to main as PR #134 (fix: keep picker height probes internal). The local working-tree changes duplicated that work from a stale base.

@kez-lab kez-lab closed this Aug 4, 2026
@kez-lab
kez-lab deleted the feature/internal-item-height-probe branch August 4, 2026 15:08
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