Skip to content

feat(flutter): Desktop support for stream_chat_flutter #913

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

Merged
merged 309 commits into from
Jun 27, 2022

Conversation

GroovinChip
Copy link
Contributor

@GroovinChip GroovinChip commented Feb 22, 2022

CLA

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

This PR contains all of my work on stream_chat_flutter to support desktop platforms. The work that needs to be done is as follows:


New tasks as of 5/25/22

  • Pass userAvatarBuilder to MessageWidgetContent
  • Pass usernameBuilder to MessageWidgetContent
  • Fix "reply" context menu action not working in some cases
  • Fix Giphys not loading in QuotedMessageWidget when replying
  • Fix being able to edit someone else's message
  • Fix "show in chat" context menu action not working
  • Fix "scroll to bottom" widget not showing
  • Fix doubled date dividers
  • Fix larger than normal link preview messages
  • Fix larger than normal text-only messages
  • Fix "reply" action not working in gallery
  • Navigate gallery items using left, right arrow keys
  • Fix "enter" key sending an empty message
  • Close gallery by pressing "escape" key
  • Fix StreamMessageListView not scrolling to the bottom when new messages are sent
  • Fix gallery nav control colors
  • Revamp UI for changing an existing reaction & showing other users who've reacted
  • Fix videos not loading in QuotedMessageWidget when replying
  • Fix MessageReactionsModal/MessageActionsModal reaction alignment on mobile #1199
  • Fix broken macOS build - Awaiting Fix broken macOS builds alexmercerind/dart_vlc#301 to be merged

Additionally, this PR contains massive refactoring to existing widgets that are unrelated to the above issues, specifically:

  • Stop using expression syntax for Widget build() methods
  • Break out a metric ton of widgets out into their own classes/files from various Widget build() helper methods
  • Move from Navigator.whatever syntax to Navigator.of(context).whatever syntax
  • Mark any void async functions as Future<void> async that have not already been done so

To check if any of the above issues are compatible with Flutter Web, please view the issue labels.

@GroovinChip GroovinChip added enhancement New feature or request platform: desktop Umbrella label for Flutter Desktop questions labels Feb 22, 2022
@GroovinChip GroovinChip self-assigned this Feb 22, 2022
@GroovinChip GroovinChip changed the title Desktop support for stream_chat_flutter feat(flutter): Desktop support for stream_chat_flutter Feb 22, 2022
@GroovinChip GroovinChip mentioned this pull request Feb 22, 2022
1 task
@codecov
Copy link

codecov bot commented Feb 22, 2022

Codecov Report

Merging #913 (87df3e2) into desktop_beta (c817110) will decrease coverage by 0.33%.
The diff coverage is 40.86%.

@@               Coverage Diff                @@
##           desktop_beta     #913      +/-   ##
================================================
- Coverage         67.87%   67.53%   -0.34%     
================================================
  Files               228      299      +71     
  Lines             23561    25004    +1443     
================================================
+ Hits              15992    16887     +895     
- Misses             7569     8117     +548     
Impacted Files Coverage Δ
...tream_chat/lib/src/db/chat_persistence_client.dart 93.93% <ø> (ø)
...e_positioned_list/src/item_positions_listener.dart 16.66% <ø> (ø)
...crollable_positioned_list/src/positioned_list.dart 98.08% <ø> (ø)
...ib/scrollable_positioned_list/src/scroll_view.dart 90.90% <ø> (ø)
...ositioned_list/src/scrollable_positioned_list.dart 98.02% <ø> (ø)
.../attachment_handler/mobile_attachment_handler.dart 0.00% <0.00%> (ø)
...t_flutter/lib/src/attachment/attachment_title.dart 81.25% <ø> (+81.25%) ⬆️
..._flutter/lib/src/attachment/attachment_widget.dart 100.00% <ø> (+86.95%) ⬆️
.../lib/src/attachment/stream_attachment_package.dart 100.00% <ø> (ø)
...eam_chat_flutter/lib/src/avatars/group_avatar.dart 55.00% <ø> (ø)
... and 234 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c817110...87df3e2. Read the comment docs.

* Make buttons more visible
* Spacing from the sides of the screen
commit 4b880ecb6d4dcbf315a7d41d863174817a9c530a
Author: Reuben Turner <groovinchip@gmail.com>
Date:   Thu Jun 9 12:25:21 2022 -0400

    fix(flutter): fixes for desktop reactions

    * Fix reactions for reverse messages
    * Ensure reactions near the edges of MessageListView show properly

commit f511513
Author: Salvatore Giordano <salvatoregiordanoo@gmail.com>
Date:   Thu Jun 9 16:43:03 2022 +0200

    fix(ui): fix DesktopReactionBuilder and Portal

commit c488564
Merge: 2b710a2 72b34c2
Author: Reuben Turner <groovinchip@gmail.com>
Date:   Wed Jun 8 14:12:44 2022 -0400

    Merge branch 'desk_web_dev' into desktop_reactions

commit 2b710a2
Author: Reuben Turner <groovinchip@gmail.com>
Date:   Mon Jun 6 12:19:12 2022 -0400

    chore(flutter): add debug props

commit e24dabc
Author: Reuben Turner <groovinchip@gmail.com>
Date:   Mon Jun 6 12:00:03 2022 -0400

    feat(flutter): first pass at desktop reactions popup on mouse hover
* Fix bottom row being rendered above reaction buttons
* Fix padding issues related to avatars
# Conflicts:
#	packages/stream_chat_flutter/lib/src/message_widget.dart
#	packages/stream_chat_flutter/lib/src/video/video_thumbnail_image.dart
#	packages/stream_chat_localizations/lib/src/stream_chat_localizations_de.dart
* Show "You" if userId matches the reaction username (per design)
* Ensure long names don't throw off alignment
@imtoori imtoori merged commit 338f907 into desktop_beta Jun 27, 2022
@xsahil03x xsahil03x deleted the desk_web_dev branch May 1, 2023 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request epic platform: desktop Umbrella label for Flutter Desktop questions
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Add new tests for new code added by #913
2 participants