Skip to content

fix: honor Ruby delete_icon_tooltip on Chip - #3

Merged
AdamMusa merged 2 commits into
codex/engine-initializationfrom
fix/chip-delete-icon-tooltip
Oct 28, 2026
Merged

AdamMusa merged 2 commits into
codex/engine-initializationfrom
fix/chip-delete-icon-tooltip

Conversation

@AdamMusa

Copy link
Copy Markdown
Owner

Summary

Ruby's Chip (materials/chip_control.rb) declares delete_icon_tooltip, a string. material_chip.dart read delete_button_tooltip, which Ruby cannot send, because Ruby rejects that keyword. As a result chip(on_delete:, delete_icon_tooltip: "Remove") never showed a tooltip on the delete button.

Fix

  • Material (material_chip.dart): InputChip.deleteButtonTooltipMessage now reads delete_icon_tooltip.
  • Cupertino (cupertino_content_controls.dart): the iOS chip did not read the key at all. iOS has no hover tooltips, so the delete CupertinoButton is now wrapped in Semantics(tooltip: delete_icon_tooltip). VoiceOver announces the same text, and the Material Tooltip adds that same semantics property. No Material widget is used.

No other engine code reads delete_button_tooltip.

Tests

New test/widgets/ruby_chip_keys_test.dart. Both tests failed before the fix.

  • Material: sends delete_icon_tooltip: "Remove tag" and checks that RawChip.deleteButtonTooltipMessage == "Remove tag" and that find.byTooltip("Remove tag") finds the tooltip.
  • Cupertino: checks that the delete CupertinoButton has a Semantics ancestor whose tooltip is "Remove tag", and that no Material Tooltip is built.

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

QA finding #9

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