-
Notifications
You must be signed in to change notification settings - Fork 0
feat(ui): add StreamAvatarGroup and StreamBadgeCount #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ui): add StreamAvatarGroup and StreamBadgeCount #43
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
📝 WalkthroughWalkthroughTwo new Flutter components (StreamAvatarGroup and StreamBadgeCount) are introduced with comprehensive theme support and gallery showcases. Existing avatar and indicator components are updated with size variants and border enhancements. The gallery application is restructured with text direction configuration support and expanded UI controls for component preview configuration. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Disable text scaling in `StreamAvatarGroup` and `StreamAvatarStack` to prevent text from overflowing when the system text scale factor is large.
Adds a new control to the gallery toolbar that allows toggling the text direction between LTR (Left-to-Right) and RTL (Right-to-Left). This helps in testing component layouts for different reading directions. The changes include: - A new `TextDirectionSelector` widget in the toolbar. - Updating the `PreviewConfiguration` to manage the text direction state. - Wrapping the preview content with a `Directionality` widget to apply the selected text direction.
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (4.12%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main-design-system #43 +/- ##
=====================================================
Coverage ? 42.02%
=====================================================
Files ? 77
Lines ? 1951
Branches ? 0
=====================================================
Hits ? 820
Misses ? 1131
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In
`@packages/stream_core_flutter/lib/src/components/avatar/stream_avatar_group.dart`:
- Around line 103-145: The build method in StreamAvatarGroup currently relies
only on an assert to ensure children is not empty (which is stripped in
release), so add a runtime guard at the top of build (before computing
colorScheme/size) to handle empty children; for example, if (children.isEmpty)
throw ArgumentError.value(children, 'children', 'StreamAvatarGroup must have at
least one child') or return a placeholder (e.g., SizedBox.shrink()) depending on
desired behavior—update the StreamAvatarGroup.build function to perform this
check so downstream calls to children.length / .first in _buildForOne,
_buildForTwo, _buildForThree, _buildForFour, and _buildForFourOrMore are safe in
release builds.
🧹 Nitpick comments (2)
apps/design_system_gallery/lib/semantics/typography.dart (1)
432-436: Consider deriving size labels from the theme to avoid drift.
The quick‑reference size string is manual; pulling sizes fromtextTheme.numeric*(fontSize) would keep it in sync automatically.packages/stream_core_flutter/lib/src/components/avatar/stream_avatar_stack.dart (1)
110-110: Consider usingList<Widget>instead ofIterable<Widget>.Using
Iterable<Widget>and then calling.length(line 145) can be O(n) for lazy iterables, since the collection must be fully traversed. Given that this widget targets small avatar counts, the impact is minimal, but usingList<Widget>would be more explicit about expectations and avoid redundant iteration.
Summary by CodeRabbit
Release Notes
New Features
Enhancements
UI/UX Improvements