Conversation
…support Made-with: Cursor
Flip the waveform visually in RTL using Transform.flip and use AnimatedPositionedDirectional for the slider thumb so it tracks correctly in both text directions. Made-with: Cursor
Use the same border radius scale across all platforms instead of separate iOS and Android values. This simplifies StreamRadius to a plain const constructor matching the StreamSpacing pattern. Made-with: Cursor
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdded a const-only StreamRadius (removed platform factory); introduced StreamJumpToUnreadButton with theme and factory hook plus Widgetbook demos; implemented StreamIntrinsicFlex (and Row/Column) replacing shrink-wrap columns; applied RTL/directionality fixes and multiple minor layout adjustments. Changes
Sequence Diagram(s)sequenceDiagram
participant Widget as Client Widget
participant Factory as StreamComponentFactory
participant Theme as StreamTheme
participant Default as DefaultStreamJumpToUnreadButton
participant User as User
Widget->>Factory: request jumpToUnreadButton builder (props)
Factory-->>Widget: builder? (nullable)
alt custom builder provided
Widget->>Factory: invoke custom builder(props)
Factory-->>Widget: custom widget
else no builder
Widget->>Theme: resolve jumpToUnreadButtonTheme
Theme-->>Widget: theme data
Widget->>Default: build default UI using theme & props
Default-->>Widget: default widget
end
User->>Widget: tap leading/trailing areas
Widget->>User: invoke provided callbacks (jump/dismiss)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 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 |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@packages/stream_core_flutter/lib/src/components/accessories/stream_audio_waveform.dart`:
- Around line 306-328: The Transform.flip + waveform.reversed unconditionally
flips RTL consumers and conflicts with the inverse parameter; fix by computing
an effective direction and passing that into the painter instead of flipping the
widget: compute effectiveInverse = inverse ^ (Directionality.maybeOf(context) ==
TextDirection.rtl), remove Transform.flip(...) and stop reversing the waveform
before passing it, and pass inverse: effectiveInverse into _WaveformPainter (or
alternatively adjust dx in _WaveformPainter using if (inverse != isRtl) dx =
canvasWidth - dx;), then add RTL unit tests to cover both inverse true/false
cases.
In
`@packages/stream_core_flutter/lib/src/components/message_composer/message_composer_input.dart`:
- Line 136: In MessageComposerInput (the widget using padding:
EdgeInsetsDirectional.only(start: context.streamSpacing.sm)), change the
directional inset from start to end so the spacing sits between the chip and the
TextField in both LTR/RTL; locate the padding property and replace
EdgeInsetsDirectional.only(start: ...) with EdgeInsetsDirectional.only(end: ...)
to apply inner spacing next to the input.
In `@packages/stream_core_flutter/lib/src/theme/primitives/stream_radius.dart`:
- Around line 27-41: The change removed the prior platform-aware constructor
shape from the public API by replacing it with a single const StreamRadius()
signature; restore backwards compatibility by reintroducing the previous
platform-specific constructor overload or factory (keep the new const
StreamRadius() as default) and add a deprecated compatibility
constructor/factory that forwards to the new implementation, documenting
deprecation; update the class StreamRadius and its constructors (and any factory
methods) so existing callers compile, and mark the compatibility constructor as
`@deprecated` with a note to migrate to the new const constructor.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1295f8c4-d945-4dc4-9648-1ea7aec999ca
📒 Files selected for processing (7)
apps/design_system_gallery/lib/core/preview_wrapper.dartpackages/stream_core_flutter/CHANGELOG.mdpackages/stream_core_flutter/lib/src/components/accessories/stream_audio_waveform.dartpackages/stream_core_flutter/lib/src/components/message_composer/message_composer_input.dartpackages/stream_core_flutter/lib/src/theme/primitives/stream_radius.dartpackages/stream_core_flutter/lib/src/theme/primitives/stream_radius.g.theme.dartpackages/stream_core_flutter/lib/src/theme/stream_theme.dart
A floating pill-shaped button for jumping to unread messages, composed of a leading StreamButton (icon + label) and a trailing StreamButton.icon (dismiss), separated by a vertical divider. Includes full theming support, component factory override, context extensions, and Widgetbook use-cases. Made-with: Cursor
Made-with: Cursor
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@apps/design_system_gallery/lib/components/buttons/stream_jump_to_unread_button.dart`:
- Around line 443-448: The Text widget currently uses an escaped apostrophe
('I\'m good, thanks!') which triggers the avoid_escaping_inner_quotes lint;
update the inner string in the child: Text(...) call to use double quotes for
the outer string (e.g., "I'm good, thanks!") so no escape is needed, leaving the
surrounding code (i.isEven condition, style usage of textTheme.bodyDefault and
colorScheme) unchanged.
- Around line 48-54: Replace the escaped single-quoted string `'I\'m good,
thanks!'` with a double-quoted literal `"I'm good, thanks!"` to remove the
unnecessary escape; locate the string inside the widget tree near
StreamJumpToUnreadButtonTheme in stream_jump_to_unread_button.dart and update
that literal only. Leave the slider knob parameters (min, max, description)
unchanged—the reviewer’s note about line 48 is incorrect. Ensure the file lints
cleanly after changing the quote style.
In
`@packages/stream_core_flutter/lib/src/theme/components/stream_jump_to_unread_button_theme.dart`:
- Around line 74-100: Doc comments for StreamJumpToUnreadButtonThemeData mention
a non-existent field `borderColor`; update the docs to reference the actual
field `side` (e.g., use BorderSide) and ensure other examples and mentions
(around backgroundColor, leadingStyle/leadingButtonStyle,
trailingStyle/trailingButtonStyle) match the real property names in
StreamJumpToUnreadButtonThemeData so the sample and descriptions are accurate.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 629252da-5c67-49fc-9563-7ade34cd897b
📒 Files selected for processing (13)
apps/design_system_gallery/lib/app/gallery_app.directories.g.dartapps/design_system_gallery/lib/components/buttons/stream_jump_to_unread_button.dartpackages/stream_core_flutter/CHANGELOG.mdpackages/stream_core_flutter/lib/src/components.dartpackages/stream_core_flutter/lib/src/components/buttons/stream_jump_to_unread_button.dartpackages/stream_core_flutter/lib/src/factory/stream_component_factory.dartpackages/stream_core_flutter/lib/src/factory/stream_component_factory.g.theme.dartpackages/stream_core_flutter/lib/src/theme.dartpackages/stream_core_flutter/lib/src/theme/components/stream_jump_to_unread_button_theme.dartpackages/stream_core_flutter/lib/src/theme/components/stream_jump_to_unread_button_theme.g.theme.dartpackages/stream_core_flutter/lib/src/theme/stream_theme.dartpackages/stream_core_flutter/lib/src/theme/stream_theme.g.theme.dartpackages/stream_core_flutter/lib/src/theme/stream_theme_extensions.dart
✅ Files skipped from review due to trivial changes (5)
- packages/stream_core_flutter/lib/src/theme.dart
- packages/stream_core_flutter/CHANGELOG.md
- apps/design_system_gallery/lib/app/gallery_app.directories.g.dart
- packages/stream_core_flutter/lib/src/components.dart
- packages/stream_core_flutter/lib/src/theme/components/stream_jump_to_unread_button_theme.g.theme.dart
Made-with: Cursor
…hemeData docs Made-with: Cursor
Add full main-axis flex behavior (Expanded, Flexible, MainAxisAlignment, MainAxisSize) and CrossAxisAlignment.baseline support to StreamIntrinsicFlex, matching RenderFlex semantics while retaining cross-axis shrink-wrapping. Includes Widgetbook playground with interactive knobs and showcase sections for shrink-wrap, size candidates, cross-axis alignment, baseline alignment, and negative spacing. Made-with: Cursor
StreamFlex/StreamRow/StreamColumn now default to MainAxisSize.min instead of MainAxisSize.max, matching common usage patterns where shrink-wrapping is desired. Remove now-redundant explicit mainAxisSize: MainAxisSize.min across all call sites. Also adds @Protected to NullableState.nullableBuild and uses sizedByParent in _RenderCollapsed for efficiency. Made-with: Cursor
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
packages/stream_core_flutter/lib/src/components/common/stream_intrinsic_flex.dart (1)
383-386: Unnecessary ignore comment on private class.The
// ignore: type_annotate_public_apiscomment is on a private class (_IntrinsicFlexParentData), where the lint rule wouldn't apply. The comment can be removed.🧹 Proposed cleanup
class _IntrinsicFlexParentData extends FlexParentData { - // ignore: type_annotate_public_apis - var isSizeCandidate = false; + bool isSizeCandidate = false; }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/stream_core_flutter/lib/src/components/common/stream_intrinsic_flex.dart` around lines 383 - 386, Remove the unnecessary ignore comment on the private class _IntrinsicFlexParentData: delete the line "// ignore: type_annotate_public_apis" above the class declaration and leave the class as "class _IntrinsicFlexParentData extends FlexParentData { var isSizeCandidate = false; }" (the lint does not apply to a private class and the suppression can be removed for cleanliness).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/stream_core_flutter/lib/src/components/common/stream_flex.dart`:
- Line 107: The constructor default for mainAxisSize on StreamFlex was changed
to MainAxisSize.min causing broad layout regressions; revert the constructor
default back to MainAxisSize.max (i.e., change the default value of the
mainAxisSize parameter in StreamFlex back to MainAxisSize.max) and update only
the specific callsites that require shrink-wrapping (e.g., where
StreamRow/StreamColumn need MainAxisSize.min such as in usages inside
StreamMessageContent, StreamAvatarStack, StreamTextInput) to explicitly pass
mainAxisSize: MainAxisSize.min; ensure the symbol references are StreamFlex
(constructor parameter mainAxisSize), StreamRow and StreamColumn callsites.
In
`@packages/stream_core_flutter/lib/src/components/common/stream_intrinsic_flex.dart`:
- Around line 122-127: Update the doc comment on the StreamIntrinsicFlex class
where it references non-existent types StreamRow and StreamColumn: change those
references to the correct class names StreamIntrinsicRow and
StreamIntrinsicColumn so the links point to actual classes; ensure the summary
and bracketed references in the comment above the final Axis direction field are
replaced accordingly.
- Around line 216-232: The updateRenderObject implementation sets textDirection
inconsistently with createRenderObject; instead of directly using textDirection
?? Directionality.maybeOf(context), call the same helper used in
createRenderObject (getEffectiveTextDirection) so the _needTextDirection check
is honoured and the _RenderStreamIntrinsicFlex.textDirection stays null when
direction isn't needed; update the updateRenderObject chain to assign
textDirection = getEffectiveTextDirection(context) (or use the same
logic/function) to match createRenderObject.
---
Nitpick comments:
In
`@packages/stream_core_flutter/lib/src/components/common/stream_intrinsic_flex.dart`:
- Around line 383-386: Remove the unnecessary ignore comment on the private
class _IntrinsicFlexParentData: delete the line "// ignore:
type_annotate_public_apis" above the class declaration and leave the class as
"class _IntrinsicFlexParentData extends FlexParentData { var isSizeCandidate =
false; }" (the lint does not apply to a private class and the suppression can be
removed for cleanliness).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 0de390d0-feb4-427d-a4f6-cf6fc31a8c54
📒 Files selected for processing (13)
apps/design_system_gallery/lib/app/gallery_app.directories.g.dartapps/design_system_gallery/lib/components/buttons/stream_jump_to_unread_button.dartapps/design_system_gallery/lib/components/common/stream_flex.dartapps/design_system_gallery/lib/components/common/stream_intrinsic_flex.dartpackages/stream_core_flutter/CHANGELOG.mdpackages/stream_core_flutter/lib/src/components.dartpackages/stream_core_flutter/lib/src/components/avatar/stream_avatar_stack.dartpackages/stream_core_flutter/lib/src/components/common/stream_flex.dartpackages/stream_core_flutter/lib/src/components/common/stream_intrinsic_flex.dartpackages/stream_core_flutter/lib/src/components/common/stream_text_input.dartpackages/stream_core_flutter/lib/src/components/message/stream_message_content.dartpackages/stream_core_flutter/lib/src/components/reaction/stream_reactions.dartpackages/stream_core_flutter/lib/src/theme/components/stream_jump_to_unread_button_theme.dart
💤 Files with no reviewable changes (4)
- packages/stream_core_flutter/lib/src/components/message/stream_message_content.dart
- packages/stream_core_flutter/lib/src/components/common/stream_text_input.dart
- packages/stream_core_flutter/lib/src/components/avatar/stream_avatar_stack.dart
- apps/design_system_gallery/lib/components/common/stream_flex.dart
✅ Files skipped from review due to trivial changes (3)
- apps/design_system_gallery/lib/app/gallery_app.directories.g.dart
- packages/stream_core_flutter/CHANGELOG.md
- packages/stream_core_flutter/lib/src/theme/components/stream_jump_to_unread_button_theme.dart
🚧 Files skipped from review as they are similar to previous changes (1)
- apps/design_system_gallery/lib/components/buttons/stream_jump_to_unread_button.dart
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@packages/stream_core_flutter/lib/src/components/common/stream_intrinsic_flex.dart`:
- Around line 193-196: Doc references the wrong class name: update the doc
comment that mentions [StreamFlex] to reference the actual class
[StreamIntrinsicFlex] so the documentation links resolve correctly; locate the
protected method comment in StreamIntrinsicFlex (the block starting "This method
exists so that subclasses of [StreamFlex]...") and replace the bracketed
identifier to [StreamIntrinsicFlex].
- Around line 367-377: The isSizeCandidate flag is only ever set to true in
applyParentData and never cleared, causing stale true values when a child loses
the StreamIntrinsicSizeCandidate wrapper; fix this by (1) overriding
setupParentData on the parent RenderObject to initialize/reset
_IntrinsicFlexParentData.isSizeCandidate = false when new parent data is
created/attached, and (2) additionally clear all children’s
_IntrinsicFlexParentData.isSizeCandidate flags at the start of performLayout so
only currently-wrapped children are treated as candidates; keep applyParentData
to set true for wrapped children but ensure explicit initialization/reset paths
exist via setupParentData and performLayout.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 295d9166-90d9-4b11-bce9-edac95f64070
📒 Files selected for processing (5)
packages/stream_core_flutter/lib/src/components/badge/stream_badge_count.dartpackages/stream_core_flutter/lib/src/components/badge/stream_badge_notification.dartpackages/stream_core_flutter/lib/src/components/badge/stream_online_indicator.dartpackages/stream_core_flutter/lib/src/components/common/stream_intrinsic_flex.dartpackages/stream_core_flutter/lib/src/components/message_composer/attachment/message_composer_media_file_attachment.dart
Replace incorrect [StreamFlex] reference with [StreamIntrinsicFlex] in the getEffectiveTextDirection method's documentation. Made-with: Cursor
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (3.08%) 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 #104 +/- ##
==========================================
+ Coverage 24.68% 24.69% +0.01%
==========================================
Files 152 155 +3
Lines 5639 5588 -51
==========================================
- Hits 1392 1380 -12
+ Misses 4247 4208 -39 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
# Conflicts: # packages/stream_core_flutter/CHANGELOG.md # packages/stream_core_flutter/test/components/message_composer/goldens/ci/message_composer_attachment_link_preview_dark_matrix.png # packages/stream_core_flutter/test/components/message_composer/goldens/ci/message_composer_attachment_link_preview_light_matrix.png # packages/stream_core_flutter/test/components/message_composer/goldens/ci/message_composer_attachment_reply_dark_matrix.png # packages/stream_core_flutter/test/components/message_composer/goldens/ci/message_composer_attachment_reply_light_matrix.png
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Documentation