Skip to content

fix: send inline from cupertino_date_picker - #62

Merged
AdamMusa merged 1 commit into
mainfrom
fix/date-picker-inline
Nov 2, 2026
Merged

AdamMusa merged 1 commit into
mainfrom
fix/date-picker-inline

Conversation

@AdamMusa

Copy link
Copy Markdown
Owner

Pairs with AdamMusa/ruflet-engine#98 (engine).

Bug

cupertino_date_picker sends the canonical DatePicker wire type (b9e52ff), with nothing that tells it apart from the dialog date_picker. The engine therefore always presented it as a dialog, and the inline iOS picker was unreachable.

Fix

CupertinoDatePickerControl declares an inline keyword with a default of true, in the generated style (the same way #61 gave cupertino_sliding_segmented_button sliding: true). The canonical date_picker contract takes the union of the date-picker classes' KEYWORDS, so inline is a canonical DatePicker keyword too: date_picker(inline: true) renders in place on both designs. An explicit inline: false is kept.

Usage

cupertino_date_picker(value: Time.now)   # sends inline: true, renders in place
date_picker(open: true)                   # the dialog, unchanged
date_picker(inline: true)                 # inline calendar on Material, wheel on iOS

Tests

test/cupertino_date_picker_compatibility_test.rb (+1): the inline variant sends inline: true on the canonical wire type, date_picker does not, and explicit values are kept both ways.

team/verify_pr.sh (paired with the engine branch, RUBY_PKGS="ruflet_core ruflet ruflet_server ruflet_rails"): PASS.

  • ruflet_core 166/166 files (773 runs), ruflet 13/13, ruflet_server 11/11, ruflet_rails 15/15.
  • engine +1094, analyze clean.

The change is mruby-safe: plain keyword and default lines in the generated style.

cupertino_date_picker sends the canonical DatePicker wire type, so the engine
could not tell the inline picker from the dialog date_picker and always
presented a dialog. Declare an inline keyword on cupertino_date_picker with a
default of true; the canonical date_picker contract takes it through its
keyword union (date_picker(inline: true) works too).
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