Skip to content

fix: honor Ruby horizontal_lines on DataTable - #13

Merged
AdamMusa merged 2 commits into
codex/engine-initializationfrom
fix/datatable-horizontal-lines
Oct 28, 2026
Merged

AdamMusa merged 2 commits into
codex/engine-initializationfrom
fix/datatable-horizontal-lines

Conversation

@AdamMusa

Copy link
Copy Markdown
Owner

Summary

Ruby's DataTable (materials/datatable_control.rb) declares horizontal_lines and vertical_lines. Both are border-side maps, for example data_table(horizontal_lines: { color: "#666666", width: 1 }). That is the shape data_table_compatibility_test.rb asserts.

material_datatable.dart read vertical_lines correctly, but it looked up horizontal lines under the misspelled key "horizontal_lLines". So horizontal_lines was never read, and the TableBorder.horizontalInside it should drive was always BorderSide.none. The iOS renderer (CupertinoDataTableControl) did not read the key either and always drew a 0.5 px separator.

Fix

  • Material (material_datatable.dart): the code now reads horizontal_lines, parsed with getBorderSide exactly like vertical_lines. The existing TableBorder(horizontalInside:, verticalInside:) wiring is unchanged.
  • Cupertino (cupertino_content_controls.dart): Table.border.horizontalInside now uses horizontal_lines, parsed with cupertinoStyleTheme, when it is set. When it is unset, the table keeps the native CupertinoColors.separator 0.5 px line.

No other core engine code reads the misspelled key. ruflet_datatable2 already reads horizontal_lines correctly.

Tests

New test/widgets/ruby_datatable_keys_test.dart:

  • Material: sends horizontal_lines: {color: "#666666", width: 2} and checks that both DataTable.border.horizontalInside and the built Table.border.horizontalInside match, with verticalInside set to none. A second test combines horizontal_lines and vertical_lines. Both tests failed before the fix.
  • Cupertino: sends horizontal_lines and checks that Table.border.horizontalInside matches. This failed before the fix. Without the key, it checks that the native 0.5 px separator is kept.

verify_pr.sh: flutter test +699, all passed (695 baseline + 4 new). flutter analyze lib test found no issues. Flutter 3.41.2.

Not in scope: the Cupertino DataTable still ignores vertical_lines. That is a separate parity gap, not a misspelling.

QA finding #15

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