Skip to content

feat(ui): Move draftlist from sdk to sample app.#2637

Open
renefloor wants to merge 1 commit intov10.0.0from
feat/move-draft-list-to-sample-app
Open

feat(ui): Move draftlist from sdk to sample app.#2637
renefloor wants to merge 1 commit intov10.0.0from
feat/move-draft-list-to-sample-app

Conversation

@renefloor
Copy link
Copy Markdown
Contributor

@renefloor renefloor commented May 1, 2026

Submit a pull request

CLA

  • I have signed the Stream CLA (required).
  • The code changes follow best practices
  • Code changes are tested (add some information if not applicable)

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

    • Removed draft list widgets and theming from the main library. Users should migrate to the sample app implementation, which provides updated draft list components with improved UI and custom theming.
  • Chores

    • Updated sample app with custom draft list implementations and simplified loading/error state UI.

@renefloor renefloor changed the title Move draftlist from sdk to sample app. feat(ui): Move draftlist from sdk to sample app. May 1, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 1, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a07b54d2-e5b1-4801-a09b-dfd90f7434e1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/move-draft-list-to-sample-app

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a 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

🤖 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

📥 Commits

Reviewing files that changed from the base of the PR and between 45dde33 and c333b4e.

⛔ 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.png is excluded by !**/*.png
  • packages/stream_chat_flutter/test/src/scroll_view/draft_scroll_view/goldens/ci/stream_draft_list_tile_light.png is excluded by !**/*.png
📒 Files selected for processing (12)
  • docs/docs_screenshots/test/draft_list/draft_list_view_test.dart
  • packages/stream_chat_flutter/CHANGELOG.md
  • packages/stream_chat_flutter/lib/src/theme/draft_list_tile_theme.dart
  • packages/stream_chat_flutter/lib/src/theme/stream_chat_theme.dart
  • packages/stream_chat_flutter/lib/src/theme/themes.dart
  • packages/stream_chat_flutter/lib/stream_chat_flutter.dart
  • packages/stream_chat_flutter/test/src/scroll_view/draft_scroll_view/stream_draft_list_tile_test.dart
  • packages/stream_chat_flutter/test/src/theme/draft_list_tile_theme_test.dart
  • sample_app/lib/pages/draft_list_page.dart
  • sample_app/lib/widgets/stream_draft_list_tile.dart
  • sample_app/lib/widgets/stream_draft_list_tile_theme.dart
  • sample_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

Comment on lines +274 to +283
return InkWell(
onTap: onTap,
child: Padding(
padding: const EdgeInsets.all(16),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(error, style: const TextStyle(color: Colors.white)),
const Icon(Icons.refresh, color: Colors.white),
],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, check if the file exists and get its structure
fd -t f "stream_draft_list_view.dart" sample_app/

Repository: GetStream/stream-chat-flutter

Length of output: 124


🏁 Script executed:

# Read the file around the specified lines to verify the code
wc -l sample_app/lib/widgets/stream_draft_list_view.dart

Repository: GetStream/stream-chat-flutter

Length of output: 128


🏁 Script executed:

# Get the specific lines mentioned in the review (274-283)
sed -n '270,290p' sample_app/lib/widgets/stream_draft_list_view.dart

Repository: GetStream/stream-chat-flutter

Length of output: 589


🏁 Script executed:

# Also check for the _LoadMoreError widget definition
rg -n "_LoadMoreError" sample_app/lib/widgets/stream_draft_list_view.dart -A 30

Repository: GetStream/stream-chat-flutter

Length of output: 2179


🏁 Script executed:

# Check if there's any styling or background color applied to the parent widgets
sed -n '200,210p' sample_app/lib/widgets/stream_draft_list_view.dart

Repository: GetStream/stream-chat-flutter

Length of output: 493


🏁 Script executed:

# Search for the parent widget structure and any theming applied
rg -n "StreamDraftListView\|loadMoreErrorBuilder" sample_app/lib/widgets/stream_draft_list_view.dart -B 5 -A 15 | head -60

Repository: GetStream/stream-chat-flutter

Length of output: 55


🏁 Script executed:

# Check for similar hardcoded colors in this file
rg -n "Colors\.white|Colors\.black" sample_app/lib/widgets/stream_draft_list_view.dart

Repository: GetStream/stream-chat-flutter

Length of output: 211


🏁 Script executed:

# Look at the _ErrorWidget definition to see if it uses similar patterns
rg -n "_ErrorWidget" sample_app/lib/widgets/stream_draft_list_view.dart -A 25 | head -70

Repository: GetStream/stream-chat-flutter

Length of output: 1083


Use theme-based colors for load-more error row instead of hardcoded white.

The hardcoded white text and icon at lines 281-282 become unreadable on light backgrounds, making the retry action inaccessible. Unlike _ErrorWidget which uses semantic widgets without hardcoding colors, _LoadMoreError forces white foreground without a guaranteed background, degrading visibility in light themes.

Suggested fix
   `@override`
   Widget build(BuildContext context) {
+    final errorColor = Theme.of(context).colorScheme.error;
+
     return InkWell(
       onTap: onTap,
       child: Padding(
         padding: const EdgeInsets.all(16),
         child: Row(
           mainAxisAlignment: MainAxisAlignment.spaceBetween,
           children: [
-            Text(error, style: const TextStyle(color: Colors.white)),
-            const Icon(Icons.refresh, color: Colors.white),
+            Text(error, style: TextStyle(color: errorColor)),
+            Icon(Icons.refresh, color: errorColor),
           ],
         ),
       ),
     );
   }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@sample_app/lib/widgets/stream_draft_list_view.dart` around lines 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.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.08%. Comparing base (45dde33) to head (c333b4e).

Additional details and impacted files
@@             Coverage Diff             @@
##           v10.0.0    #2637      +/-   ##
===========================================
+ Coverage    67.04%   67.08%   +0.03%     
===========================================
  Files          418      415       -3     
  Lines        25146    24985     -161     
===========================================
- Hits         16860    16762      -98     
+ Misses        8286     8223      -63     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant