Repository navigation
refactor: move ProgressRing onto the shared control core - #94
Merged
AdamMusa merged 3 commits intoNov 2, 2026
Merged
Conversation
Record the legacy ProgressRing renderers (CircularProgressIndicator on Android, CupertinoActivityIndicator on iOS) as JSON snapshots: geometry, semantics, the native indicator's state (value, progress, radius, animating), what they send to Ruby during a tap and invoke outcomes. Fixtures cover determinate, labelled, value plus progress, maximal and layout-keyword rings, and, without settling, indeterminate, progress-only, paused and radius rings, recording whether the indicator still spins. The migration onto the shared control core may change them only as listed in its parity table.
ProgressRingCore now owns everything Ruby sends for ProgressRing (the progress_ring and cupertino_activity_indicator DSL names): one fraction for both designs (`progress` wins over `value`, clamped to 0..1) and the accessibility value both announce (`semantics_value`, or the determinate percentage). The Material skin maps the core onto CircularProgressIndicator and the Cupertino skin onto CupertinoActivityIndicator, wrapped in the same semantics the Material ring exposes. The registry entry has the canonical shape (create: ProgressRingCore.new). Android now honors `progress`; iOS announces semantics_label and the progress value to accessibility and no longer fails an assertion on an out-of-range value. Unknown methods fail fast. Snapshots change only for those rows.
This was referenced Oct 29, 2026
…-core Brings in the PRs merged since, so #94 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
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.
Depends on #91 (IconButton family), which stacks on #90 → #88 → #81. Until those merge, this PR's diff also shows their commits; review the last two.
What
Item 8 of the decoupling plan: ProgressRing (DSL names
progress_ringandcupertino_activity_indicator) moves onto the shared core. Exactly two own commits:test: snapshot ProgressRing renderer behaviour: JSON snapshots of the legacy renderers (test/widgets/progress_ring_snapshot_test.dart,test/snapshots/ProgressRing/*.json), 9 fixtures × iOS/Android:determinate(scripted pointer tap,invoke focus, unfocus),labelled(semantics_label+semantics_value),value_and_progress(both keys),maximal(every key),layout(layout keywords);indeterminate,progress_only,paused,radius): pumped for 100 ms by a local capture that records size, semantics, the native indicator's state and whether a frame is still scheduled (ticking). The shared harness (mountWire) is not changed.CircularProgressIndicator.value;CupertinoActivityIndicator.progress/animating/radius).refactor: move ProgressRing onto the shared control core: the migration. Snapshots change only per the parity table below.Design
controls/progress_ring_core.dart(new)progressRingSpec,ProgressRingProps,ProgressRingCore. The core owns the one determinate fraction both designs show (progresswins overvalue, the iOS rule; clamped to 0..1, the Material rule) and the accessibility value both announce (semantics_value, or the determinate percentage, Material's rule). No events, no methods.controls/progress_ring.dartMaterialProgressRingSkin→CircularProgressIndicator.controls/cupertino_activity_indicator.dartCupertinoProgressRingSkin→CupertinoActivityIndicator(partially revealed while determinate), wrapped in the sameSemantics(label, value, role, min/max) the Material ring builds for itself.controls/adaptive_progress_ring.dartcreate: ProgressRingCore.new, C1e).Core-consumed:
value,progress(the fraction),semantics_value(the accessibility value). Material-only, with reasons:bgcolor,stroke_width,stroke_cap,stroke_align,track_gap(iOS spokes have no stroked track),size_constraints,padding,year_2023. Cupertino-only:radius(the Material ring sizes fromsize_constraints),animating(an indeterminateCircularProgressIndicatoralways spins). Both skins:color,semantics_label. Both skin files leavelegacy_renderers.txt.Manifest entry: a determinate, labelled fixture (so the harness can settle it and C7 compares what both designs announce), native widgets
CircularProgressIndicator/CupertinoActivityIndicator, parity scripttap native+unfocus. There are no core-sourced events.Parity changes (DC-5)
semantics_labeland the value (semantics_value, or the determinate percentage) announced, as on Androiddeterminate.ios,labelled.ios,maximal.ios,layout.ios,progress_only.ios,value_and_progress.ios(semantics)progressignored (the ring kept spinning indeterminately)progress_ring(progress: 0.3)shows 30 % on Androidprogress_only.android(native.valuenull → 0.3,tickingtrue → false, semantics value 30)valuewon when bothvalueandprogresswere sentprogresswins on both designs (the iOS rule)value_and_progress.android(0.2 → 0.8)value/progressoutside 0..1 failedCupertinoActivityIndicator's assertionruby_progress_ring_keys_test.dartinvokeon the ring waited for the timeout (no listener)UnsupportedErrortextdeterminate.*invoke focusUnchanged on both designs (identical snapshots): geometry everywhere, the indeterminate/paused/radius rings, Android semantics, the maximal Material ring.
Tests
test/widgets/ruby_progress_ring_keys_test.dart(+3): Android honorsprogress, iOS clamps an out-of-range value, iOS announces label and percentage. The existingyear_2023tests pass unchanged.team/verify_pr.shon head ff96126 with rufletorigin/mainfb29afbc: PASS: engineflutter test+1144 all passed,flutter analyze lib testno issues, ruflet_core 161/161 files. Wire-key audit: the 26 "new" findings are all Column/GridView/ListView/Row refresh and end-reached keys, which ruflet main has (ruflet #43/#45) but this stack's engine base (81609d0) predates (engine #27/#30). Against ruflet 43928509 (the tree #81–#91 were verified with) the audit reports 0 new.Gate
No open PR touches
adaptive_progress_ring.dart,progress_ring.dart,cupertino_activity_indicator.dartorruby_progress_ring_keys_test.dart; checked before starting and before opening.core_manifest.dartandlegacy_renderers.txtare only touched by the decoupling stack (#81–#91): expect adjacent-line conflicts with #84/#86/#87 (and developer 1's SegmentedButton/picker PRs); keep both sides, entries alphabetical.