feat(ui): Move draftlist from sdk to sample app.#2637
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 ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@sample_app/lib/widgets/stream_draft_list_view.dart`:
- Around line 274-283: The _LoadMoreError widget currently hardcodes
Colors.white for the Text and Icon causing poor contrast in light themes; update
the build so both the Text(error) and Icon use theme-based foreground colors
instead (e.g., replace Colors.white with Theme.of(context).colorScheme.onSurface
or IconTheme.of(context).color) so the row respects current Theme brightness and
accessibility; ensure you access Theme.of(context) inside the widget's build
method and apply it to the TextStyle and Icon color.
🪄 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: 89458776-9b99-4084-9282-279707ad4860
⛔ Files ignored due to path filters (2)
packages/stream_chat_flutter/test/src/scroll_view/draft_scroll_view/goldens/ci/stream_draft_list_tile_dark.pngis excluded by!**/*.pngpackages/stream_chat_flutter/test/src/scroll_view/draft_scroll_view/goldens/ci/stream_draft_list_tile_light.pngis excluded by!**/*.png
📒 Files selected for processing (12)
docs/docs_screenshots/test/draft_list/draft_list_view_test.dartpackages/stream_chat_flutter/CHANGELOG.mdpackages/stream_chat_flutter/lib/src/theme/draft_list_tile_theme.dartpackages/stream_chat_flutter/lib/src/theme/stream_chat_theme.dartpackages/stream_chat_flutter/lib/src/theme/themes.dartpackages/stream_chat_flutter/lib/stream_chat_flutter.dartpackages/stream_chat_flutter/test/src/scroll_view/draft_scroll_view/stream_draft_list_tile_test.dartpackages/stream_chat_flutter/test/src/theme/draft_list_tile_theme_test.dartsample_app/lib/pages/draft_list_page.dartsample_app/lib/widgets/stream_draft_list_tile.dartsample_app/lib/widgets/stream_draft_list_tile_theme.dartsample_app/lib/widgets/stream_draft_list_view.dart
💤 Files with no reviewable changes (7)
- packages/stream_chat_flutter/lib/src/theme/themes.dart
- packages/stream_chat_flutter/test/src/theme/draft_list_tile_theme_test.dart
- packages/stream_chat_flutter/lib/stream_chat_flutter.dart
- docs/docs_screenshots/test/draft_list/draft_list_view_test.dart
- packages/stream_chat_flutter/test/src/scroll_view/draft_scroll_view/stream_draft_list_tile_test.dart
- packages/stream_chat_flutter/lib/src/theme/draft_list_tile_theme.dart
- packages/stream_chat_flutter/lib/src/theme/stream_chat_theme.dart
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v10.0.0 #2637 +/- ##
===========================================
+ Coverage 66.88% 66.91% +0.02%
===========================================
Files 410 408 -2
Lines 24887 24731 -156
===========================================
- Hits 16646 16548 -98
+ Misses 8241 8183 -58 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…st-to-sample-app # Conflicts: # sample_app/lib/widgets/stream_draft_list_view.dart
…t list Export StreamScrollViewLoadMoreError and StreamScrollViewLoadMoreIndicator from the public API (their EmptyWidget/ErrorWidget/LoadingWidget siblings were already exported). The sample app's draft list view now uses the public API for these widgets and the rest of its empty/error/loading builders, and drops the boilerplate SDK-style customization hooks it didn't need. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Export StreamTimestamp along with its DateFormatter typedef and the formatDate / formatRecentDateTime helpers from the public API, then use StreamTimestamp in the sample app's StreamDraftListTile instead of a hand-rolled Jiffy formatter. The default formatter also adds a "Yesterday" case the inline version was missing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Submit a pull request
CLA
Description of the pull request
Draft list was not supposed to be part of the sdk, so this is moved to the sample app.
Summary by CodeRabbit
Breaking Changes
Chores