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

Web <> Mobile Reactions are not compatible #2023

Closed
TaharS opened this issue Mar 23, 2023 · 6 comments · Fixed by GetStream/stream-chat-react#1947
Closed

Web <> Mobile Reactions are not compatible #2023

TaharS opened this issue Mar 23, 2023 · 6 comments · Fixed by GetStream/stream-chat-react#1947
Labels
Awaiting Confirmation Issues where questions are answered, but awaiting confirmation from author

Comments

@TaharS
Copy link

TaharS commented Mar 23, 2023

Describe the bug
Our applications leverage the whole Stream suite - Mobile and Web. Our users are cross-platform and we give access to messaging via Stream to all of them.
The issue we are seeing here is that Reactions are actually not synced between mobile and web
The culprit of this, is simply how the data is stored:

Screen Shot 2023-03-23 at 10 10 27 AM

Is this intended behaviour?

Dev environment info (please complete/provide the following information):

  • Package version
    "stream-chat": "8.2.1",
    "stream-chat-react-native": "^5.11.2",
  • react-native or expo version
    "react-native": "0.70.3",
  • Device/Emulator (android/ios) and OS version
  • Android Emulator Pixel 5 API 33/iOS iPhone 14 Pro Max iOS 16

To Reproduce
Steps to reproduce the behavior:

  1. Open a mobile application and add a reaction
  2. Open a web application with the same conversation
  3. Observe reactions on web
  4. From the web application apply a 👍 emoji
  5. Observe reactions on mobile

Expected behavior
Reactions should be showing cross platform

Additional context
n/a

Screenshots
n/a

@khushal87
Copy link
Member

Hey @TaharS, we couldn't reproduce this behaviour on our side after a couple of attempts. Sharing a video on how it works on our side. I would like to know if you are adding in customization or modifying some behaviour.

Screen.Recording.2023-03-24.at.11.30.11.mov

@vanGalilea vanGalilea added Awaiting Confirmation Issues where questions are answered, but awaiting confirmation from author and removed Needs Triaging labels Mar 27, 2023
@TaharS
Copy link
Author

TaharS commented Mar 27, 2023

Thank you for the quick answer.

We have reduced the number of reaction the web to match 5 reactions (against 6 for web)

const customReactions = [
  {
    colons: ':heart:',
    emoticons: [],
    id: 'heart',
    name: 'Red Heart',
    native: '❤️',
    skin: null,
    unified: '2764'
  },
  {
    colons: ':+1:',
    emoticons: [],
    id: '+1',
    name: 'Thumbs Up Sign',
    native: '👍',
    skin: null,
    unified: '1f44d'
  },
  {
    colons: ':-1:',
    emoticons: [],
    id: '-1',
    name: 'Thumbs Down Sign',
    native: '👎',
    skin: null,
    unified: '1f44e'
  },
  {
    colons: ':joy:',
    emoticons: [],
    id: 'joy',
    name: 'Laughing',
    native: '😂',
    skin: null,
    unified: '1f602'
  },
  {
    colons: ':interrobang:',
    emoticons: [],
    id: 'interrobang',
    name: 'Red Exclamation Mark and Question Mark',
    native: '⁉️',
    skin: null,
    unified: '2049'
  }
]

const CustomReactionsList = (props: { reverse: true }) => {
  return (
    <ReactionsList
      reactionOptions={customReactions}
      {...props}
    />
  )
}

const CustomReactionSelector = () => (
  <ReactionSelector reactionOptions={customReactions} />
)

export const MessagesChannel = () => {
  const { channel: activeChannel } = useChatContext('MessageChannel')

  return activeChannel ? (
    <Channel
      ReactionSelector={CustomReactionSelector}
      ReactionsList={CustomReactionsList}
    >
      <Window>
        <ChannelHeader channel={activeChannel} />
        <MessageList />
        <MessageInput />
      </Window>
    </Channel>

When doing this it seems to create a new field in the DB

Screen Shot 2023-03-27 at 10 16 08 AM

@nandorojo
Copy link

@TaharS did this end up getting fixed for you? Just wondering what the status is, as I've faced some web & mobile inconsistencies with unread messages as well.

@TaharS
Copy link
Author

TaharS commented May 22, 2023

@TaharS did this end up getting fixed for you? Just wondering what the status is, as I've faced some web & mobile inconsistencies with unread messages as well.

Hey @nandorojo, so if we talk about the reactions here, we cut scope and removed the custom work. Therefore we went with the out of the box reaction on both mobile/web. They work well on that side
We haven't had any issues/inconsistencies with unread messages to this date.

GetStream/stream-chat-react#1947 seems to be in the work to have a better custom reaction experience? Not really sure there though

@vanGalilea
Copy link
Contributor

The issue is solved and I'll be closing this issue for now.
Please don't hesitate to contact us in the future if this issue or any questions arise.

@tanishadandona
Copy link

I want to Customize message Reactions . how to do this?

arnautov-anton added a commit to GetStream/stream-chat-react that referenced this issue Nov 27, 2023
BREAKING CHANGE: `reactionOptions` signature has changed, see release
guide for more information

### 🎯 Goal

Refactor and fix the way reactions work, introduce new way of
customizing with better DX.

Fixes: #1935
Closes: #1637
Closes: #1437
Closes: #2159
Closes:
GetStream/stream-chat-react-native#2023

### 🛠 Implementation details

- ditch EmojiMart implementation, use native/sprite-sheet solution
arnautov-anton added a commit to GetStream/stream-chat-react that referenced this issue Nov 27, 2023
BREAKING CHANGE: `reactionOptions` signature has changed, see [release
guide](https://github.com/GetStream/stream-chat-react/blob/v11.0.0/docusaurus/docs/React/release-guides/upgrade-to-v11.mdx) for more information

Refactor and fix the way reactions work, introduce new way of
customizing with better DX.

Fixes: #1935
Closes: #1637
Closes: #1437
Closes: #2159
Closes:
GetStream/stream-chat-react-native#2023

- ditch EmojiMart implementation, use native/sprite-sheet solution
arnautov-anton added a commit to GetStream/stream-chat-react that referenced this issue Nov 27, 2023
Refactor and fix the way reactions work, introduce new way of
customizing with better DX.

Fixes: #1935
Closes: #1637
Closes: #1437
Closes: #2159
Closes:
GetStream/stream-chat-react-native#2023

- ditch EmojiMart implementation, use native/sprite-sheet solution

BREAKING CHANGE: `reactionOptions` signature has changed, see [release guide](https://github.com/GetStream/stream-chat-react/blob/v11.0.0/docusaurus/docs/React/release-guides/upgrade-to-v11.mdx) for more information
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Confirmation Issues where questions are answered, but awaiting confirmation from author
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants