-
Notifications
You must be signed in to change notification settings - Fork 371
feat(ui)!: refactor poll message into attachment #2296
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
Conversation
This commit refactors the `PollMessage` widget into a new `PollAttachment` widget and introduces a `PollAttachmentBuilder`. The `PollMessage` widget has been removed. The `hasPoll` property has been removed from `MessageWidget`, `MessageCard`, and `MessageWidgetContent`. The `PollAttachmentBuilder` is now responsible for building poll attachments and is included in the default attachment builders.
|
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 WalkthroughThe changes refactor the poll message handling in the chat UI by removing the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant MessageWidget
participant AttachmentWidgetCatalog
participant PollAttachmentBuilder
participant PollAttachment
User->>MessageWidget: Sends/Views message
MessageWidget->>AttachmentWidgetCatalog: Build attachment widgets
AttachmentWidgetCatalog->>PollAttachmentBuilder: canHandle(message, attachments)
PollAttachmentBuilder-->>AttachmentWidgetCatalog: true (if poll present)
AttachmentWidgetCatalog->>PollAttachmentBuilder: build(context, message, attachments)
PollAttachmentBuilder->>PollAttachment: Render poll UI with shape/constraints
PollAttachment-->>User: Displays poll attachment
Assessment against linked issues
Poem
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.
|
packages/stream_chat_flutter/lib/src/attachment/poll_attachment.dart
Outdated
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v10.0.0 #2296 +/- ##
==========================================
Coverage ? 64.03%
==========================================
Files ? 409
Lines ? 25563
Branches ? 0
==========================================
Hits ? 16368
Misses ? 9195
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Submit a pull request
Linear: FLU-182
Description of the pull request
This PR refactors the
PollMessagewidget into a newPollAttachmentwidget and introduces aPollAttachmentBuilder.The
PollMessagewidget has been removed.The
hasPollproperty has been removed fromMessageWidget,MessageCard, andMessageWidgetContent.The
PollAttachmentBuilderis now responsible for building poll attachments and is included in the default attachment builders.Screenshots / Videos
Summary by CodeRabbit
New Features
Breaking Changes
Improvements
Documentation