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

Added modal bottom sheet that shows list of users and their reaction #1283

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

E-m-i-n-e-n-c-e
Copy link

@E-m-i-n-e-n-c-e E-m-i-n-e-n-c-e commented Jan 15, 2025

See who left an emoji reaction #740

This PR adds a new feature that shows detailed information about message reactions when long-pressing a reaction button. Users can see who reacted with which emoji in a bottom sheet.

Closes #740

Feature Description

When a user long-presses on a reaction:

  1. A bottom sheet appears showing:

    • A row of filterable reaction buttons at the top
    • A list of users who reacted below
  2. Each user row shows:

    • User's profile picture
    • User's name
  3. Tapping on a user's row navigates to their profile

Implementation Details

The implementation consists of two main parts:

  1. ReactionUsersSheet - The bottom sheet UI component
  2. Long-press handler in ReactionChip - Triggers the bottom sheet

ReactionUserSheet is in test\widgets\reaction_users_sheet_test.dart

Tests are in test\widgets\reaction_users_sheet_test.dart

Testing

  1. displays emoji buttons correctly

    • Verifies emoji buttons display with correct counts
  2. displays user list correctly

    • Verifies user names are displayed
  3. handles unknown users gracefully

    • Tests fallback text for unknown users
  4. navigates to user profile on tap

    • Tests navigation to profile page
  5. switches between reactions

    • Tests reaction switching functionality
    • Verifies user list updates
  6. handles horizontal overflow with many reactions

    • Tests horizontal scrolling behavior
    • Verifies emoji button visibility
  7. handles vertical overflow with many users

    • Tests vertical scrolling behavior
    • Verifies user list scrolling
  8. handles long user names without overflow

    • Tests text overflow handling
  9. displays different types of emojis correctly

    • Tests Unicode emoji display
    • Tests custom/image emoji display
    • Tests text emoji display

Screenshots

image

image

image

@E-m-i-n-e-n-c-e
Copy link
Author

E-m-i-n-e-n-c-e commented Jan 15, 2025

Do tell me if you need any changes to the design or something like that. I think i should change the flexible widget to an expanded so that it works something like this

image

I have made the change locally and can push if you want me to. Also tell me if you want me to reorganize the code in any of ways mentioned in the previous comment under the header Code Organization Discussion

@PIG208
Copy link
Member

PIG208 commented Jan 15, 2025

@E-m-i-n-e-n-c-e, thanks for working on this! We do have an issue for this feature: #740. It specifies the exact design we want for the feature. However, this is a Post-Launch issue so we might not spend as much time on implementing it.

@PIG208 PIG208 added the maintainer review PR ready for review by Zulip maintainers label Jan 15, 2025
@gnprice
Copy link
Member

gnprice commented Jan 15, 2025

@E-m-i-n-e-n-c-e E-m-i-n-e-n-c-e force-pushed the main branch 2 times, most recently from ee9df72 to 8ae5f36 Compare January 16, 2025 07:57
@E-m-i-n-e-n-c-e
Copy link
Author

E-m-i-n-e-n-c-e commented Jan 16, 2025

@E-m-i-n-e-n-c-e, thanks for working on this! We do have an issue for this feature: #740. It specifies the exact design we want for the feature. However, this is a Post-Launch issue so we might not spend as much time on implementing it.

Updated the design to match the figma design

Chat thread: https://chat.zulip.org/#narrow/channel/516-mobile-dev-help/topic/view-reactions.20sheet/near/2043883

Please check the updated pr description

@E-m-i-n-e-n-c-e E-m-i-n-e-n-c-e force-pushed the main branch 3 times, most recently from 607fa50 to 54da4c1 Compare January 16, 2025 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintainer review PR ready for review by Zulip maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

See who left an emoji reaction
3 participants