Repository navigation
flui-material: buttons and selection controls run on the scenario tester; Switch, Radio and a chip's delete button can be named - #3264
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqfW4DyGdFu4cM4nUks6cZ
Each toggle and chip row names its control as an application would, since the end's audit refuses an unnamed one, and clicks it through semantics.act. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqfW4DyGdFu4cM4nUks6cZ
The toggle motion reads the frame's draw list on the window's clock, the motion policy goes through Tester::platform, and a control without a label of its own is named as an application names it (common::named). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqfW4DyGdFu4cM4nUks6cZ
…ntic_label Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqfW4DyGdFu4cM4nUks6cZ
The toggles of the selection-control tests are named by their own semantic_label; the common tree reads (children_of, nodes_below_window) serve the node-shape claims. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqfW4DyGdFu4cM4nUks6cZ
…ester Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqfW4DyGdFu4cM4nUks6cZ
The cross-fade test stays on the widget harness: no frame read gives a field of each of several render objects of one type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqfW4DyGdFu4cM4nUks6cZ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqfW4DyGdFu4cM4nUks6cZ
A tap that the test places itself (a chip's body clear of its delete icon, a disabled chip) goes to the window through Tester::perform; the delete buttons are named by delete_button_label. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqfW4DyGdFu4cM4nUks6cZ
…its view Switch, Radio, Chip and FilterChip hold their names as Option<Box<ControlNames>>, so the labels they gained cost an unnamed control no inline size: the perf baselines hold. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqfW4DyGdFu4cM4nUks6cZ
…on the scenario tester Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqfW4DyGdFu4cM4nUks6cZ
…mes exactly its node Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqfW4DyGdFu4cM4nUks6cZ
…nd the bare-toggle audit case Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqfW4DyGdFu4cM4nUks6cZ
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqfW4DyGdFu4cM4nUks6cZ
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqfW4DyGdFu4cM4nUks6cZ
…the new builders are listed as added Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqfW4DyGdFu4cM4nUks6cZ
…the head does Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqfW4DyGdFu4cM4nUks6cZ
8 tasks done
Main's rule names a control's own node from a Semantics label around it, so the builders and the ControlNames type this branch added for that go: Switch::semantic_label and Radio::semantic_label are removed, Checkbox, Switch and Radio keep main's fields, and src/control_names.rs is deleted. Chip::delete_button_label and FilterChip's stay, held in a field of their own: the delete button is the chip's, so no Semantics an application writes can name it. The tests that named a toggle through semantic_label wrap it in Semantics::new().label(..) as an application does and find it by that name, Checkbox's included. icon_button's cross-fade test reads each RenderAnimatedOpacity through Frame::read_all and leaves the old harness. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqfW4DyGdFu4cM4nUks6cZ
…tton moved whole The TP6 state and evidence, the ADR-0400 bullet in docs/gaps.md and the changelog no longer name the removed builders or ControlNames; the chip delete-button bullets join the branch's changelog fragment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqfW4DyGdFu4cM4nUks6cZ
WidgetsLocalizations gains delete_button_tooltip ("Delete" by default,
Flutter 3.50.1's MaterialLocalizations.deleteButtonTooltip), and Chip and
FilterChip read it from the ambient Localizations where the delete icon
is built. The delete_button_label builders and their fields go, so a chip
view stores nothing for the name and its byte baselines stay where they
were.
The chip tests find the delete button as "Delete", and
a_chip_names_its_delete_button_from_the_localizations reads it as
"Löschen" under a German delegate.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EqfW4DyGdFu4cM4nUks6cZ
…ions The changelog adds WidgetsLocalizations::delete_button_tooltip and says the delete button is named by the localized tooltip text; the TP6 state and evidence drop delete_button_label and the baseline rise. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqfW4DyGdFu4cM4nUks6cZ
…t and chip.rs's SignalProbe The new localization method is listed as breaking for outside implementors, and its Flutter citation keeps the path in one code span. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqfW4DyGdFu4cM4nUks6cZ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqfW4DyGdFu4cM4nUks6cZ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqfW4DyGdFu4cM4nUks6cZ
…alizations Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqfW4DyGdFu4cM4nUks6cZ
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.
Summary
TP6 of the testing platform (ADR-0400):
flui-material's buttons and selection controls run onflui_testing::scenario::Tester, and the spec splits the crate's 42 test files into three areas (TP6 here, TP7 surfaces, lists, fields, theme and progress, TP8 navigation, dialogs, app and transitions).Reworked onto ADR-0407 (#3269): a control is named the way an application names it, by
Semantics::new().label(..)around it, which names the control's own node. This branch no longer adds a naming builder of its own.Changes
checkbox,radio,switch,elevated_button,floating_action_button,chipandicon_buttonmoved whole.icon_button::a_toggle_cross_fades_to_its_selected_iconreads the opacity of eachRenderAnimatedOpacitythroughFrame::read_all::<RenderAnimatedOpacity, f64>and drops its#[expect(deprecated)].t.finish(), and the end's audit finds no unnamed control.switch,radioandcheckboxtests and the toggle rows oftoggles_and_chips_are_one_node_with_their_stateandmaterial_controls_publish_their_identifierwrap the toggle in aSemanticslabel and find it by that name (find::text). No test of the area callsCheckbox::semantic_label, which ADR-0407 §2's follow-up deletes. In the identifier test the toggle's identifier stays on the node it shares with the label (ADR-0407 §3).Switch::semantic_label,Radio::semantic_labeland theControlNamestype (src/control_names.rs).Checkbox,SwitchandRadioare as on main.WidgetsLocalizations::delete_button_tooltipis a new required method ("Delete" inDefaultWidgetsLocalizations, delegated byGlobalWidgetsLocalizationsand by the German test impl influi-widgets'page_view.rs), and Flutter 3.50.1 names this button withMaterialLocalizations.deleteButtonTooltip.ChipandFilterChipread it from the ambientLocalizationswhere the delete icon is built, so nothing is stored on the view. The delete button belongs to the chip, so noSemanticsan application writes can name it. Nodelete_button_labelbuilder.changelog.d/claude-project-thread-5mrv8h.md, and-control-names.mdis gone. TP6's state and evidence indocs/plans/specs/testing-platform/tasks.mdare rewritten. The ADR-0400 bullet indocs/gaps.mddrops the cross-fade exception and the readFramelacked.Expectations
No perf baseline changed:
flui-material'sperfand the facade's perf scenarios pass underFLUI_PERF_BASELINE=check, with the baseline files untouched. The delete button's name is read from the localizations when the chip builds, so the chip view stores nothing for it.Claims restated, each in its test's doc:
disabledand noFocus.selected.disabledplus a refusedtry_tap.Semanticslabel around them.a_bare_toggle_invents_no_label_and_the_audit_names_it.Test plan
cargo test --locked -p flui-material --tests: 8 + 23 + 12 passed.clippy --all-targets -D warningsandcargo fmt --all --checkare clean.FLUI_PERF_BASELINE=checkonflui-material'sperf: 12 passed. The facade's perf scenarios (--features flui/material,flui/cupertino,flui/native,flui/serde --test perf): 9 passed. No baseline file touched.flui-widgets: thelocalizationandpage_viewtests of the lib and ofwidgets_it, andclippy -p flui-widgets --all-targets -D warnings.ADR-0400modlines intests/main.rs: 22 → 18.next_value→ the tristate cycle test;chiptests. A chip that is only mounted and finished fails the end's audit withUnnamedon the delete button ("this button has no accessible name").a_chip_names_its_delete_button_from_the_localizations;Switchas a container, so the label forms a node of its own → theswitchtests, thecheckboxtable andnamed_by_semantics, through the test's end;IconButtonwithoutSymbolEffect::replace→ the cross-fade test ("one icon at rest");material_it(E1), measured before the rework: 379 → 359 ms on default threads, 1 017 → 1 121 ms on one thread (1.10×).Review
Read at 04661e6 (the reworked change, whole diff against main):
review-before-merge, tiersonnet, seven lenses and a judge, none missing. Answers, fixed in c0d0f6d:#[expect(deprecated)]users and denied a read of a field of several render objects (a document that states what the code does not do). Fixed: the test and the read are gone from the TP4 list.Frame::read_allis that read, and the test uses it.chip.rskeeps oneSignalProbe, whose replacement is not built. Fixed: the evidence names the forms the counter covers and that oneSignalProbeuser.delete_button_tooltipbroke its code span across a line. Fixed.BREAKINGbullet under Changed for outside implementors.GlobalWidgetsLocalizations' forwarders are unpinned. The new one is like every other forwarder: none has a test. That belongs to a table test of all forwarders, which is a follow-up.children_ofis duplicated between cupertino and materialtests/common. The next PR (TP7) moves it intoflui_testing::scenario::treeand deletes both copies.The fix is docs only, so there is no second round.
https://claude.ai/code/session_01EqfW4DyGdFu4cM4nUks6cZ
Generated by Claude Code