feat(mobile): add bee pull-to-refresh - #5059
Conversation
Signed-off-by: kenny lopez <klopez4212@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 66ba687159
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Addresses Codex review on #5059. Two structural fixes, no behavior change: - Move FlappingBee and its private painter out of tappable_flapping_bee.dart into shared/widgets/flapping_bee.dart, restoring one public widget per file. - Document the public properties on FlappingBee, and BeeRefreshIndicator's onRefresh and child. Signed-off-by: Fizz <50a12680c76f1a52c0b7af8dbb17e02c583227c290fb93b9a3defb456114223f@buzz.block.builderlab.xyz> Co-authored-by: kenny lopez <klopez4212@gmail.com> Signed-off-by: kenny lopez <klopez4212@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a7937cefb8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ); | ||
| } | ||
| return RefreshIndicator( | ||
| return BeeRefreshIndicator( |
There was a problem hiding this comment.
Offset the forum bee below the frosted app bar
In the forum route, ForumPostsView is rendered full-bleed behind the parent FrostedAppBar, and the list itself reserves frostedAppBarHeight(context) at line 103. This call leaves edgeOffset at zero, so once the overscroll springs back during a refresh, the bee settles around the top of the body underneath the overlaid app bar while the content still opens a loading gap below it. Pass the same app-bar height as edgeOffset so the loading indicator remains visible with the forum cards.
Useful? React with 👍 / 👎.
| final nextProgress = (elasticPull / _triggerDistance).clamp(0.0, 1.0); | ||
| pullProgress.value = nextProgress; | ||
| if (nextProgress >= 1) beginExpressionTracking(); |
There was a problem hiding this comment.
Gate armed feedback on the actual refresh status
On taller viewports, the fixed 100-pixel _triggerDistance can be reached before Flutter's viewport-dependent RefreshIndicator.noSpinner threshold, yet this call immediately runs beginExpressionTracking(), fully scales the bee, and emits the medium “armed” haptic. Releasing in that interval cancels rather than refreshing, so the user receives confirmation for an action that will not occur; start armed feedback only when onStatusChange reports RefreshIndicatorStatus.armed.
Useful? React with 👍 / 👎.
Summary
Replace Flutter's standard mobile pull-to-refresh indicator with our animated Buzz bee.
Testing
bin/just mobile-checkbin/just mobile-test(1,248 tests)