Typing indicator: continuous dot animation, safe visibility fallback, layout branch by controller - #271
Open
byaletheya-sudo wants to merge 1 commit into
Conversation
… layout branch by controller - The dots looped by listening for AnimationStatus.completed and calling forward(from: 0.0) from the status callback, which stops and restarts the Ticker; the first tick after a restart reports zero elapsed time, so every dot froze for a frame every 700 ms. AnimationController.repeat() runs the same 0..pi tween on one ticker. - (widget.controller?.showTypingIndicatorFor.isNotEmpty ?? widget.visible)! threw when neither argument was given; now falls back to false. - The layout branch tested iOS || cm.activeChat == null, but the only callers without a controller are the chat-list tiles, and activeChat is non-null whenever a chat is open in the other pane (tablet mode), so tiles drew an empty avatar group next to the dots. Branch on widget.controller == null, which is the intended distinction. - The app-icon container in the ClipPath branch had no height and overflowed the 50 px row; set to 20 like its sibling. AnimatedSize is anchored to the leading edge so the dots do not slide sideways while it resizes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Four small defects in
typing_indicator.dart, all visible from the code:AnimationStatus.completedand callingforward(from: 0.0)from the status callback, which stops and restarts theTicker; the first tick after a restart reports zero elapsed time, so every dot froze for one frame every 700 ms.AnimationController.repeat()runs the identical 0..pi tween on one continuous ticker, and the status listener (which could callforward()on a controller being torn down) goes away.(widget.controller?.showTypingIndicatorFor.isNotEmpty ?? widget.visible)!throws if a caller passes neither argument; now?? false.iOS || cm.activeChat == null, but the only call sites without a controller are the chat-list tiles, andactiveChatis non-null whenever a chat is open in the other pane. On a wide screen the tiles took the Material branch, whereparticipantsis an empty list, and drew an empty avatar group beside the dots. Branching onwidget.controller == nullis the intended distinction.ClipPathbranch had no height while its Material sibling hasheight: 25; with 10/20 padding in a 50 px row, an undecoratedImage.memoryoverflowed. Set to 20.AnimatedSizeis anchored to the leading edge so the dots no longer slide sideways while it resizes.Verification. One file. Built as a release APK (arm64) from this branch and installed on a Galaxy Z Fold 8; the app runs. I could not observe a live typing indicator in a sideloaded build (registration needs the hosted service), so the fixes are argued from the code above; the periodic hitch is reproducible by reasoning about
Tickerrestart and should be visible in any 1:1 chat while the other side types.flutter analyzereports no new diagnostics againstrustpush.🤖 Generated with Claude Code