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

question: overriding default chat reactions doesn't work as expected for some cases #2159

Closed
SmitNicolas opened this issue Nov 6, 2023 · 3 comments · Fixed by #1947
Closed
Assignees
Labels
bug Something isn't working cluster:emoji Issues related to use of emojis released status:confirmed Described issue has been reproduced by the repo maintainer

Comments

@SmitNicolas
Copy link

Describe the bug

Customizing the reaction list works as long as we don't use the same id than built-in ids.

To Reproduce

Steps to reproduce the behavior:

  1. Have a working local setup of stream chat.
  2. Follow steps in the guide to override default chat reactions.

Expected behavior

Given a reaction id, its icon should be the one provided in imageUrl, not the default one.

Screenshots

Providing an existing reaction id :

  const customReactions: any[] = [
    {
      id: 'fist',
      name: 'fist',
      imageUrl: FistEmoji
    }
  ];

image

Providing a new reaction id :

const customReactions: any[] = [
    {
      id: 'fiesta',
      name: 'fiesta',
      imageUrl: FistEmoji
    }
  ];

image

Package version

  • stream-chat-react: 10.14.0
  • stream-chat-css: n/a
  • stream-chat-js: 8.13.0

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

Add any other context about the problem here.

@SmitNicolas SmitNicolas added bug Something isn't working status: unconfirmed labels Nov 6, 2023
@arnautov-anton arnautov-anton added the cluster:emoji Issues related to use of emojis label Nov 6, 2023
@arnautov-anton arnautov-anton self-assigned this Nov 6, 2023
@arnautov-anton
Copy link
Contributor

Hey, @SmitNicolas, we're aware of this issue and we're currently working on v11 of our SDK which should allow our integrators to adjust reactions much more easier. Try our pre-release version of the v11 (install with yarn add stream-chat-react@rc) and see if the new API works better for you, any feedback regarding the new API would be greatly appreciated.

@arnautov-anton arnautov-anton added status:confirmed Described issue has been reproduced by the repo maintainer and removed status: unconfirmed labels Nov 6, 2023
@SmitNicolas
Copy link
Author

Thanks @arnautov-anton for your answer.
We just tried this rc and following the guide, it is fixing our issue.

arnautov-anton added a commit 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 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 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
github-actions bot pushed a commit that referenced this issue Nov 27, 2023
## [11.0.0](v10.20.1...v11.0.0) (2023-11-27)

### ⚠ BREAKING CHANGES

* **emoji-mart:** `EmojiPicker` & `EmojiIndex` signatures changed, `EmojiIndex` has been renamed to `emojiSearchIndex`, both `EmojiPicker` & `emojiSearchIndex` are now optional, 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
* **emoji-mart:** `useImageFlagEmojisOnWindow` flag now requires extra style sheet import, 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
* **emoji-mart:** `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
* the first argument to `doSendMessageRequest` is now Channel instance instead of `Channel.cid`
* apply the remark plugins `keepLineBreaksPlugin`, `htmlToTextPlugin` as a part of the default message text parsing, upgrade `unified` libraries

### Bug Fixes

* **emoji-mart:** new reactions  ([#1947](#1947)) ([14bef23](14bef23)), closes [#1935](#1935) [#1637](#1637) [#1437](#1437) [#2159](#2159)
* **emoji-mart:** simplify EmojiPicker & emojiSearchIndex ([#2117](#2117)) ([a6e0a87](a6e0a87)), closes [#2116](#2116) [#2094](#2094)

### Features

* apply keepLineBreaksPlugin & htmlToTextPlugin plugins to text rendering by default ([#2169](#2169)) ([e8047f2](e8047f2)), closes [#2170](#2170) [/github.com/GetStream/stream-chat-react/blob/f0bc7ba2532760cabb1db01e685a35bd3b0b64c5/src/components/Message/renderText/renderText.tsx#L158](https://github.com/GetStream//github.com/GetStream/stream-chat-react/blob/f0bc7ba2532760cabb1db01e685a35bd3b0b64c5/src/components/Message/renderText/renderText.tsx/issues/L158)
* export MessageListNotifications and LinkPreviewList components and component props ([#2181](#2181)) ([a5a7e5a](a5a7e5a))
* require Channel instance as the first argument to doSendMessageRequest ([#2171](#2171)) ([2a06b88](2a06b88))

### Chores

* **deps:** bump stream-chat from 8.14.0 to 8.14.2 ([#2179](#2179)) ([4e6a59d](4e6a59d))
* **deps:** bump stream-chat from 8.14.2 to 8.14.3 ([#2185](#2185)) ([3dd8dab](3dd8dab))
@stream-ci-bot
Copy link
Collaborator

🎉 This issue has been resolved in version 11.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cluster:emoji Issues related to use of emojis released status:confirmed Described issue has been reproduced by the repo maintainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants