Skip to content

fix: present the inline date picker from Ruby's inline prop - #98

Merged
AdamMusa merged 3 commits into
codex/engine-initializationfrom
fix/date-picker-inline
Nov 2, 2026
Merged

AdamMusa merged 3 commits into
codex/engine-initializationfrom
fix/date-picker-inline

Conversation

@AdamMusa

@AdamMusa AdamMusa commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Pairs with AdamMusa/ruflet#62 (Ruby). This is a legacy-renderer fix in the same class as #93, not part of the control-core stack.

Depends on #92 and #93.

Bug

Since b9e52ff7, Ruby's cupertino_date_picker sends the canonical DatePicker wire type. Both renderers chose the inline picker only when the raw control.type == "CupertinoDatePicker", which no longer matches:

  • iOS always built CupertinoDatePickerDialogControl, so the inline wheel picker was unreachable. A cupertino_date_picker placed in a layout rendered nothing until open: true, and then showed a popup.
  • Material had the same check, so MaterialInlineDatePickerControl was unreachable too.

Fix

  • Declared property: both renderers choose inline vs dialog from inline, which the paired Ruby PR declares. cupertino_date_picker defaults it to true, and date_picker takes it through the canonical keyword union. No renderer reads the wire name any more, per the owner's rule.
    • iOS: inline: true renders CupertinoDatePicker in place; otherwise it is the dialog.
    • Material: inline: true renders the inline CalendarDatePicker; otherwise it is the dialog.
  • Legacy clients (gems older than b9e52ff7) still send the raw CupertinoDatePicker wire name. The alias-properties table from fix: render the iOS sliding segmented control from Ruby's sliding prop #93 gains CupertinoDatePicker → {inline: true}, applied in Control.fromMap with putIfAbsent, so an explicit value still wins.

Behaviour change

Ruby call Before (since b9e52ff7) After
cupertino_date_picker(...) on iOS no inline picker; only a popup when open: true inline CupertinoDatePicker in place, as before b9e52ff7
cupertino_date_picker(...) on Android no inline picker; only a dialog when open: true inline CalendarDatePicker in place, as before b9e52ff7
date_picker(...) (no inline) dialog dialog (unchanged)
date_picker(inline: true) dialog (key ignored) inline on both designs
raw CupertinoDatePicker wire (old gems) inline inline (now via the alias table)

Tests

test/widgets/ruby_date_picker_inline_test.dart (4):

  • iOS, inline: true: renders CupertinoDatePicker in place, with no CupertinoPopupSurface. Geometry: the wheel is laid out (height > 100).
  • iOS, open: true without inline: presents the dialog (a CupertinoPopupSurface is shown).
  • Legacy CupertinoDatePicker wire name: gets inline == true and renders in place.
  • Android, inline: true: renders CalendarDatePicker, with no Dialog.

team/verify_pr.sh with the paired ruflet 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 flutter test +1094, analyze clean.
  • Wire-key audit: no DatePicker finding. The 23 findings that are new against the baseline come from elsewhere:

Ruby's cupertino_sliding_segmented_button sends the canonical SegmentedButton
wire type, so the Cupertino renderer's check for the raw
CupertinoSlidingSegmentedButton wire name never matched and every sliding
control rendered as the plain segmented control on iOS. Select the sliding
control from the declared sliding property instead. Material has no sliding
equivalent and keeps rendering SegmentedButton.

Clients from before the canonical wire types still send the legacy wire
name: the alias table in control_type.dart now carries the properties an
alias implies (sliding: true for CupertinoSlidingSegmentedButton), applied
when the Control is built, so no renderer branches on a wire name.
Ruby's cupertino_date_picker sends the canonical DatePicker wire type, so the
renderers' check for the raw CupertinoDatePicker wire name never matched:
iOS always presented the date picker as a dialog and the inline picker was
unreachable (on Material too). Choose inline vs dialog from the declared
inline property on both designs, and let the alias table imply inline: true
for the legacy CupertinoDatePicker wire name.
Brings in the PRs merged since, so #98 merges; conflicts take the resolution tested on the full merge of the open PRs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
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