-
Notifications
You must be signed in to change notification settings - Fork 363
chore(repo): remove deprecated classes, methods, and properties #2306
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
base: v10.0.0
Are you sure you want to change the base?
Conversation
WalkthroughThis change removes a wide range of deprecated APIs, widgets, classes, and parameters across both the core Changes
Sequence Diagram(s)Not generated: The changes are broad API removals and refactors, not introducing new control flow or features. Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes detected. All modifications are directly related to the removal of deprecated APIs and classes as described in the linked issue. Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@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: 0
🧹 Nitpick comments (2)
packages/stream_chat_flutter/lib/src/message_input/stream_message_send_button.dart (1)
7-9
: Update constructor documentation comment.The documentation comment still references deprecated parameters (
isCommandEnabled
,isEditEnabled
,idleSendButton
,activeSendButton
) that have been removed from the constructor./// Returns a [StreamMessageSendButton] with the given [timeOut], [isIdle], - /// [isCommandEnabled], [isEditEnabled], [idleSendButton], [activeSendButton], - /// [onSendMessage]. + /// [idleSendIcon], [activeSendIcon], and [onSendMessage].packages/stream_chat_flutter/CHANGELOG.md (1)
5-10
: Use 4-space indentation for the nested bullet list to guarantee correct rendering on pub.devMarkdown parsers on pub.dev/CommonMark occasionally mis-interpret 2-space indents, causing the sub-bullets to collapse back to the top level. Shifting the nested list to a 4-space indent (or one tab) keeps the hierarchy intact everywhere.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (54)
packages/stream_chat/CHANGELOG.md
(1 hunks)packages/stream_chat/lib/src/client/channel.dart
(0 hunks)packages/stream_chat/lib/src/client/client.dart
(0 hunks)packages/stream_chat/lib/src/core/api/call_api.dart
(0 hunks)packages/stream_chat/lib/src/core/api/responses.dart
(0 hunks)packages/stream_chat/lib/src/core/api/responses.g.dart
(0 hunks)packages/stream_chat/lib/src/core/api/sort_order.dart
(0 hunks)packages/stream_chat/lib/src/core/api/stream_chat_api.dart
(0 hunks)packages/stream_chat/lib/src/core/models/call_payload.dart
(0 hunks)packages/stream_chat/lib/src/core/models/call_payload.g.dart
(0 hunks)packages/stream_chat/lib/src/core/models/message.dart
(2 hunks)packages/stream_chat/lib/src/core/models/message.g.dart
(0 hunks)packages/stream_chat/lib/src/permission_type.dart
(0 hunks)packages/stream_chat/lib/stream_chat.dart
(0 hunks)packages/stream_chat/test/fixtures/message.json
(1 hunks)packages/stream_chat/test/src/core/api/call_api_test.dart
(0 hunks)packages/stream_chat/test/src/core/api/responses_test.dart
(0 hunks)packages/stream_chat/test/src/core/models/call_payload_test.dart
(0 hunks)packages/stream_chat/test/src/core/models/message_test.dart
(2 hunks)packages/stream_chat_flutter/CHANGELOG.md
(1 hunks)packages/stream_chat_flutter/lib/src/attachment/builder/attachment_widget_builder.dart
(0 hunks)packages/stream_chat_flutter/lib/src/attachment/builder/voice_recording_attachment_builder/stream_voice_recording_list_player.dart
(0 hunks)packages/stream_chat_flutter/lib/src/attachment/builder/voice_recording_attachment_builder/stream_voice_recording_loading.dart
(0 hunks)packages/stream_chat_flutter/lib/src/attachment/builder/voice_recording_attachment_builder/stream_voice_recording_player.dart
(0 hunks)packages/stream_chat_flutter/lib/src/attachment/builder/voice_recording_attachment_builder/stream_voice_recording_slider.dart
(0 hunks)packages/stream_chat_flutter/lib/src/attachment/builder/voice_recording_attachment_builder/voice_recording_attachment_builder.dart
(0 hunks)packages/stream_chat_flutter/lib/src/attachment/handler/stream_attachment_handler_base.dart
(1 hunks)packages/stream_chat_flutter/lib/src/attachment/handler/stream_attachment_handler_html.dart
(0 hunks)packages/stream_chat_flutter/lib/src/attachment/handler/stream_attachment_handler_io.dart
(0 hunks)packages/stream_chat_flutter/lib/src/icons/stream_svg_icon.dart
(2 hunks)packages/stream_chat_flutter/lib/src/indicators/unread_indicator.dart
(1 hunks)packages/stream_chat_flutter/lib/src/message_input/attachment_picker/options/stream_file_picker.dart
(3 hunks)packages/stream_chat_flutter/lib/src/message_input/attachment_picker/stream_attachment_picker_bottom_sheet.dart
(0 hunks)packages/stream_chat_flutter/lib/src/message_input/dm_checkbox.dart
(0 hunks)packages/stream_chat_flutter/lib/src/message_input/stream_message_input.dart
(2 hunks)packages/stream_chat_flutter/lib/src/message_input/stream_message_send_button.dart
(1 hunks)packages/stream_chat_flutter/lib/src/message_list_view/floating_date_divider.dart
(0 hunks)packages/stream_chat_flutter/lib/src/misc/back_button.dart
(1 hunks)packages/stream_chat_flutter/lib/src/theme/stream_chat_theme.dart
(0 hunks)packages/stream_chat_flutter/lib/src/theme/themes.dart
(0 hunks)packages/stream_chat_flutter/lib/src/theme/voice_attachment_theme.dart
(0 hunks)packages/stream_chat_flutter/lib/src/utils/extensions.dart
(0 hunks)packages/stream_chat_flutter/lib/src/video/video_thumbnail_image.dart
(2 hunks)packages/stream_chat_flutter/lib/stream_chat_flutter.dart
(0 hunks)packages/stream_chat_flutter/test/src/indicators/unread_indicator_test.dart
(1 hunks)packages/stream_chat_flutter/test/src/message_input/dm_checkbox_test.dart
(0 hunks)packages/stream_chat_flutter/test/src/utils/extension_test.dart
(0 hunks)sample_app/lib/pages/channel_file_display_screen.dart
(1 hunks)sample_app/lib/pages/channel_list_page.dart
(1 hunks)sample_app/lib/pages/channel_media_display_screen.dart
(1 hunks)sample_app/lib/pages/chat_info_screen.dart
(1 hunks)sample_app/lib/pages/group_info_screen.dart
(6 hunks)sample_app/lib/pages/new_chat_screen.dart
(1 hunks)sample_app/lib/pages/pinned_messages_screen.dart
(1 hunks)
💤 Files with no reviewable changes (33)
- packages/stream_chat_flutter/lib/src/theme/themes.dart
- packages/stream_chat/lib/src/core/models/message.g.dart
- packages/stream_chat_flutter/lib/src/attachment/builder/attachment_widget_builder.dart
- packages/stream_chat/lib/stream_chat.dart
- packages/stream_chat_flutter/test/src/utils/extension_test.dart
- packages/stream_chat_flutter/lib/src/attachment/handler/stream_attachment_handler_html.dart
- packages/stream_chat_flutter/lib/src/message_input/attachment_picker/stream_attachment_picker_bottom_sheet.dart
- packages/stream_chat_flutter/lib/src/message_list_view/floating_date_divider.dart
- packages/stream_chat/test/src/core/models/call_payload_test.dart
- packages/stream_chat/lib/src/core/api/sort_order.dart
- packages/stream_chat/lib/src/core/api/stream_chat_api.dart
- packages/stream_chat_flutter/lib/src/attachment/handler/stream_attachment_handler_io.dart
- packages/stream_chat/test/src/core/api/call_api_test.dart
- packages/stream_chat_flutter/lib/src/attachment/builder/voice_recording_attachment_builder/stream_voice_recording_loading.dart
- packages/stream_chat_flutter/lib/src/utils/extensions.dart
- packages/stream_chat/lib/src/client/channel.dart
- packages/stream_chat/test/src/core/api/responses_test.dart
- packages/stream_chat/lib/src/client/client.dart
- packages/stream_chat_flutter/lib/stream_chat_flutter.dart
- packages/stream_chat_flutter/test/src/message_input/dm_checkbox_test.dart
- packages/stream_chat/lib/src/core/api/responses.g.dart
- packages/stream_chat_flutter/lib/src/attachment/builder/voice_recording_attachment_builder/voice_recording_attachment_builder.dart
- packages/stream_chat/lib/src/permission_type.dart
- packages/stream_chat/lib/src/core/api/responses.dart
- packages/stream_chat/lib/src/core/models/call_payload.g.dart
- packages/stream_chat_flutter/lib/src/attachment/builder/voice_recording_attachment_builder/stream_voice_recording_player.dart
- packages/stream_chat_flutter/lib/src/message_input/dm_checkbox.dart
- packages/stream_chat_flutter/lib/src/attachment/builder/voice_recording_attachment_builder/stream_voice_recording_slider.dart
- packages/stream_chat_flutter/lib/src/attachment/builder/voice_recording_attachment_builder/stream_voice_recording_list_player.dart
- packages/stream_chat/lib/src/core/api/call_api.dart
- packages/stream_chat/lib/src/core/models/call_payload.dart
- packages/stream_chat_flutter/lib/src/theme/voice_attachment_theme.dart
- packages/stream_chat_flutter/lib/src/theme/stream_chat_theme.dart
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: build (android)
- GitHub Check: build (ios)
- GitHub Check: test
- GitHub Check: format
- GitHub Check: analyze
🔇 Additional comments (25)
packages/stream_chat_flutter/lib/src/video/video_thumbnail_image.dart (2)
90-92
: LGTM! Proper API migration from deprecated to current Flutter image decoding.The method name change from
loadBuffer
toloadImage
is more descriptive and the parameter type update fromDecoderBufferCallback
toImageDecoderCallback
correctly aligns with Flutter's current image decoding API. This change maintains the same functionality while using the non-deprecated API.
107-107
: Parameter type correctly updated to match the public method signature.The
_loadAsync
method parameter has been properly updated to useImageDecoderCallback
, maintaining consistency with the publicloadImage
method signature.packages/stream_chat_flutter/lib/src/indicators/unread_indicator.dart (1)
10-12
: LGTM! Clean removal of deprecated parameter.The constructor change properly removes the deprecated
cid
parameter and makes the default constructor const. Users who need channel-specific unread counts can use the.channels()
named constructor instead.packages/stream_chat_flutter/test/src/indicators/unread_indicator_test.dart (1)
41-41
: Good use of const optimization.Adding
const
to the Scaffold aligns with theStreamUnreadIndicator
const constructor change and provides compile-time optimization.packages/stream_chat_flutter/lib/src/misc/back_button.dart (1)
45-45
: Correct const usage.Properly updated to use the new const constructor of
StreamUnreadIndicator
.sample_app/lib/pages/new_chat_screen.dart (1)
32-32
: Proper migration to new SortOption API.The change from the deprecated
SortOption
constructor toSortOption.asc('name')
is correct and more explicit about the sort direction.sample_app/lib/pages/pinned_messages_screen.dart (1)
28-28
: Correct migration to new SortOption API.The change from the deprecated constructor to
SortOption.asc('created_at')
properly migrates to the new API while maintaining the same sorting behavior.sample_app/lib/pages/channel_list_page.dart (1)
50-54
: LGTM! Proper const optimization.Adding
const
to thePositionedDirectional
widget aligns with theStreamUnreadIndicator
becoming a const constructor. This improves performance by allowing Flutter to reuse the widget instance.sample_app/lib/pages/channel_file_display_screen.dart (1)
34-34
: LGTM! Correct migration to new SortOption API.The change properly migrates from the deprecated
SortOption
constructor to the newSortOption.asc('created_at')
named constructor, maintaining the same sorting behavior.sample_app/lib/pages/channel_media_display_screen.dart (1)
36-36
: LGTM! Consistent migration to new SortOption API.This change maintains consistency with other files in the codebase by migrating to the new
SortOption.asc('created_at')
named constructor.sample_app/lib/pages/chat_info_screen.dart (1)
54-54
: LGTM! Improved API simplifies permission checking.The migration from the verbose
channel.ownCapabilities.contains(PermissionType.deleteChannel)
to the concisechannel.canDeleteChannel
improves readability while maintaining the same functionality.packages/stream_chat/test/fixtures/message.json (1)
51-58
: LGTM! Test fixture correctly updated for new reaction data model.The new
reaction_groups
structure consolidates reaction data more effectively than the deprecated separatereaction_counts
andreaction_scores
fields. The fixture includes the proper schema withcount
,sum_scores
, and timestamp metadata.packages/stream_chat_flutter/lib/src/attachment/handler/stream_attachment_handler_base.dart (1)
34-34
: LGTM: Improved API with granular compression control.The replacement of the deprecated boolean
allowCompression
parameter with an integercompressionQuality
parameter provides better control over file compression settings.sample_app/lib/pages/group_info_screen.dart (2)
108-108
: LGTM: Modern factory method for sort options.Using
SortOption.asc('name')
factory method provides a cleaner and more readable API compared to the deprecated constructor.
194-194
: LGTM: Improved permission checking with channel-level methods.The migration from deprecated
PermissionType
constants to high-level boolean getters on the channel object (canUpdateChannelMembers
,canUpdateChannel
,canMuteChannel
,canLeaveChannel
) provides a more intuitive and encapsulated API for permission checks.Also applies to: 219-219, 412-412, 478-478, 564-564
packages/stream_chat_flutter/lib/src/message_input/attachment_picker/options/stream_file_picker.dart (1)
22-22
: LGTM: Consistent API migration for compression control.The replacement of the deprecated
allowCompression
boolean withcompressionQuality
integer parameter is consistent with the handler base class changes and provides better granular control over file compression settings.Also applies to: 46-47, 76-76
packages/stream_chat/test/src/core/models/message_test.dart (2)
27-28
: LGTM: Proper migration to reactionGroups API.The test correctly updates from deprecated
reactionCounts
andreactionScores
properties to the newreactionGroups
approach, accessing count and sum scores through the reaction group objects.
290-316
: LGTM: Comprehensive test coverage for reactionGroups.The test method properly validates the new
reactionGroups
functionality, ensuring that reaction data is correctly stored and accessible through the updated API structure.packages/stream_chat_flutter/lib/src/message_input/stream_message_input.dart (1)
127-128
: LGTM! Successful deprecation cleanup.The removal of deprecated parameters (
idleSendButton
,activeSendButton
,useNativeAttachmentPickerOnMobile
) and retention of their current equivalents (idleSendIcon
,activeSendIcon
,useSystemAttachmentPicker
) successfully simplifies the API surface. This change eliminates the need for parameter validation and merging logic between deprecated and current parameters.Also applies to: 159-159, 163-163
packages/stream_chat/lib/src/core/models/message.dart (2)
37-37
: LGTM! Reaction system successfully consolidated.The removal of deprecated
reactionCounts
andreactionScores
constructor parameters in favor of the unifiedreactionGroups
approach simplifies the reaction data model. This eliminates the complexity of managing separate reaction counts and scores while maintaining all necessary reaction functionality through the reaction groups.
417-417
: LGTM! Clean copyWith implementation.The direct assignment of
reactionGroups
without fallback logic to deprecated reaction fields correctly implements the simplified reaction model. This removes the complexity of merging deprecatedreactionCounts
andreactionScores
data, ensuring consistent use of the unified reaction system.packages/stream_chat/CHANGELOG.md (1)
1-10
: LGTM! Well-documented breaking changes for v10 cleanup.The changelog properly documents the deprecated API removal with clear migration guidance. The format follows established conventions and provides users with the information needed to upgrade.
packages/stream_chat_flutter/lib/src/message_input/stream_message_send_button.dart (1)
14-17
: Clean removal of deprecated constructor parameters.The constructor has been properly simplified to only include the current parameters, maintaining a clean API surface for v10.
packages/stream_chat_flutter/lib/src/icons/stream_svg_icon.dart (2)
16-24
: Clean simplification of constructor parameters.The constructor has been properly simplified by removing deprecated parameters while maintaining all essential functionality for icon rendering.
102-110
: Simplified build method with direct icon usage.The build method is now cleaner with direct icon parameter usage, eliminating legacy code paths and deprecated parameter handling.
@coderabbitai review |
✅ Actions performedReview triggered.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v10.0.0 #2306 +/- ##
==========================================
Coverage ? 64.43%
==========================================
Files ? 410
Lines ? 25222
Branches ? 0
==========================================
Hits ? 16251
Misses ? 8971
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Submit a pull request
Linear: FLU-199
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
reactionGroups
exclusively.Chores
Style
Documentation