Repository navigation
fix: send inline from cupertino_date_picker - #62
Merged
Merged
Conversation
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).
This was referenced Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pairs with AdamMusa/ruflet-engine#98 (engine).
Bug
cupertino_date_pickersends the canonicalDatePickerwire type (b9e52ff), with nothing that tells it apart from the dialogdate_picker. The engine therefore always presented it as a dialog, and the inline iOS picker was unreachable.Fix
CupertinoDatePickerControldeclares aninlinekeyword with a default oftrue, in the generated style (the same way #61 gavecupertino_sliding_segmented_buttonsliding: true). The canonicaldate_pickercontract takes the union of the date-picker classes' KEYWORDS, soinlineis a canonical DatePicker keyword too:date_picker(inline: true)renders in place on both designs. An explicitinline: falseis kept.Usage
Tests
test/cupertino_date_picker_compatibility_test.rb(+1): the inline variant sendsinline: trueon the canonical wire type,date_pickerdoes 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.The change is mruby-safe: plain keyword and default lines in the generated style.