Skip to content
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

Chat-NG Reactions #2498

Merged
merged 13 commits into from
Jan 21, 2025
Merged

Chat-NG Reactions #2498

merged 13 commits into from
Jan 21, 2025

Conversation

gtalha07
Copy link
Contributor

@gtalha07 gtalha07 commented Jan 15, 2025

Description:

  • Brings out fresh new emoji selector row UX along with implementing reactions view on messages in Chat-NG.
  • Most of the backend logic is same, the only new changes are on the emoji-row UX side (frost/blurred effect) when long pressing the message. I have pointed that out in change-set.
  • With these new changes, also fixes chat react-emoji UX #2204 as a part of tracking issue [Tracking] Chat-NG #2137.
  • Moved Edited indicator in the message bubble body.

Preview/Screenshots:

Video showcasing reactions view (on long-press message):

Screen.Recording.2025-01-16.at.18.20.44.mov

Emoji Selector view on messages:

Screenshot 2025-01-16 at 18 30 52 Screenshot 2025-01-16 at 18 33 24

Reaction UI on messages:

Screenshot 2025-01-16 at 18 34 03 Screenshot 2025-01-16 at 18 35 25

Detailed reaction view (on long press reaction UI) Updated:

Screenshot 2025-01-17 at 18 22 37

Copy link

codecov bot commented Jan 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 28.92%. Comparing base (0064430) to head (6354d3e).
Report is 46 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2498      +/-   ##
==========================================
- Coverage   29.48%   28.92%   -0.57%     
==========================================
  Files         680      687       +7     
  Lines       45488    45695     +207     
==========================================
- Hits        13413    13218     -195     
- Misses      32075    32477     +402     
Flag Coverage Δ
integration-test 39.82% <ø> (ø)
unittest 19.98% <ø> (-0.73%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@@ -113,19 +119,21 @@ class ChatBubble extends StatelessWidget {
const SizedBox(height: 10),
],
child,
if (isEdited) ...[
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved Edited indicator inside bubble for better UX.

show ReactionRecord;
import 'package:flutter/material.dart';

class ReactionChipsWidget extends StatelessWidget {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This part is logically same and pasted from legacy but more linear and structured.

import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

class ReactionDetailsSheet extends ConsumerStatefulWidget {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is also same logic-wise but have been split because of its complexity.


final _log = Logger('a3::chat::reactions_selector_row');

class ReactionSelectorRow extends ConsumerWidget {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is same as EmojiRow widget logic-wise but have been more degraded for simplicity and structured.

@gtalha07 gtalha07 marked this pull request as ready for review January 16, 2025 13:57
@gnunicorn
Copy link
Contributor

Just from the UI I notice the following:

  1. the user-counter is flickering when you click an emoji in the window. Do we know why? That seems like something we want to fix (if not this in this PR then at least record it so we do it later).
  2. why not show display name & avatar for the users in the emoji overview dialog?

@gtalha07
Copy link
Contributor Author

Just from the UI I notice the following:

  1. the user-counter is flickering when you click an emoji in the window. Do we know why? That seems like something we want to fix (if not this in this PR then at least record it so we do it later).
  2. why not show display name & avatar for the users in the emoji overview dialog?
  1. It was from memberIdsProvider .when:
 membersLoader.when(
              data: (members) => Text(
                lang.membersCount(members.length),
                style: Theme.of(context).textTheme.bodySmall,
              ),
              skipLoadingOnReload: true,  --> previous was false
              error: (e, s) {
                _log.severe('Failed to load active members', e, s);
                return Text(lang.errorLoadingMembersCount(e));
              },
              loading: () => Skeletonizer(
                child: Text(lang.membersCount(100)),
              ),
            ),
  1. Emoji overview dialog inner UI is unchanged and been copied as it is from before. I can probably put that here now since we have more refined avatar providers.

Copy link
Contributor

@kumarpalsinh25 kumarpalsinh25 left a comment

Choose a reason for hiding this comment

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

Taking bit of time to review and understand the things. Added few comments related to suggestion/queries.

Here are some more UI Feedback.

  1. Reaction on PDF file: Reaction on this file look off.
    Screenshot 2025-01-17 at 4 50 23 PM

  2. Reaction Details : I don't see which tab is selected. Also as @gnunicorn mentioned it will be good if we show User avatar and Display name here. And overall UI-UX can be improve for this dialog.
    Screenshot 2025-01-17 at 4 51 41 PM

  3. Reaction Chip Design : Chip design looks different for send and receiver messages. Also ReactionList overlaying/position and overall design can be improve by taking references of well-known social media app.
    Screenshot 2025-01-17 at 4 51 31 PM

Copy link
Contributor

@gnunicorn gnunicorn left a comment

Choose a reason for hiding this comment

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

Generally looks fine to me, but there's a few things to be addressed.

Copy link
Contributor

Choose a reason for hiding this comment

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

You nicely split the reactions up into their own subfolder ... but I wonder: are these chat specific? We do (later) want users to be able to react to all types of things (pins, comments, tasks and tasklists), doesn't it make sense to put these out into their own features folder already?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You nicely split the reactions up into their own subfolder ... but I wonder: are these chat specific? We do (later) want users to be able to react to all types of things (pins, comments, tasks and tasklists), doesn't it make sense to put these out into their own features folder already?

So, reaction toggling is operated through timelineStreamProvider which is from Convo object. Do we have support of reaction API on other room objects? If so, I can maybe change this action a bit and separate it neatly as singleton.

Copy link
Contributor

Choose a reason for hiding this comment

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

keep it for the future, @gtalha07 . leave it as is.

@@ -139,3 +141,18 @@ final repliedToMsgProvider = AsyncNotifierProvider.autoDispose
.family<RepliedToMessageNotifier, RepliedToMsgState, RoomMsgId>(() {
return RepliedToMessageNotifier();
});

final messageReactionsProvider = StateProvider.autoDispose
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if that should be per item object or rather be bound to the roomId+eventId combination ... not sure yet.

@gtalha07 gtalha07 enabled auto-merge January 21, 2025 16:40
@gtalha07 gtalha07 merged commit 19af7d9 into acterglobal:main Jan 21, 2025
20 of 23 checks passed
@gtalha07 gtalha07 deleted the chat_ng-reactions branch January 21, 2025 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Recently Done
Development

Successfully merging this pull request may close these issues.

chat react-emoji UX
3 participants