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

feat: add new message action list and reaction selector UI #2686

Merged
merged 21 commits into from
Oct 9, 2024

Conversation

khushal87
Copy link
Member

@khushal87 khushal87 commented Sep 25, 2024

🎯 Goal

This PR introduces a new message menu, removing the previous MessageOverlay.

Screenshot 2024-10-02 at 9 07 20 PM

The new components, as per the diagram, are introduced:

Screenshot 2024-10-03 at 10 19 11 AM

🛠 Implementation details

  • Remove props MessageActionList, MessageActionListItem, MessageOverlay, messageTextNumberOfLines, OverlayReactions, OverlayReactionsAvatar, OverlayReactionsItem from the OverlayProvider and add them to Channel component through MessagesContext.
    The message Menu is brought down the hierarchy, so we removed the message overlay context completely.
  • Remove usage of setData, setOverlay, onLongPress, onPress, and onPressIn prop from Message.tsx. The last three are removed in favour of similar props on MessagesContext and are, therefore, not needed. The setData, setOverlay props are removed as we removed the message overlay context and the overlay prop in overlay context accepts 'alert' | 'gallery' | 'none' now on. The MessageOverlay prop is introduced.
  • The useMessageActions hook doesn’t take setOverlay anymore but takes in dismissOverlay.
  • The MessageContext has a new prop - dismissOverlay. The definition of showMessageOverlay is changed to (showMessageReactions?: boolean) => void;.
  • The isMessageActionsVisible is changed to showMessageReactions in messageAction.ts.
  • Add a UI component, BottomSheetModal
  • Remove the error, isMyMessage, isThreadMessage, message, and messageReactions props from OverlayContext.

Also fixes #1734

☑️ Checklist

  • I have signed the Stream CLA (required)
  • PR targets the develop branch
  • Documentation is updated
  • New code is tested in main example apps, including all possible scenarios
    • SampleApp iOS and Android
    • Expo iOS and Android

@Stream-SDK-Bot
Copy link
Contributor

Stream-SDK-Bot commented Sep 25, 2024

SDK Size

title develop branch diff status
js_bundle_size 446.7021484375 KB 440 KB -7274 B 🚀

@khushal87 khushal87 marked this pull request as ready for review October 3, 2024 04:44
@khushal87 khushal87 merged commit 8b0b4f4 into v6.0.0 Oct 9, 2024
4 checks passed
@khushal87 khushal87 deleted the new-message-action-list-ui branch October 9, 2024 15:31
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.

3 participants