Releases: sendbird/sendbird-uikit-react
[email protected] [June 05 2023]
[v3.4.9] (June 02 2023)
Fixes:
-
ChannelList
- Display a channel on channel list only when there's a message
- Remove edited message from ChannelPreview
-
MarkAsRead & MarkAsDelivered
- Batch markAsRead & markAsDelivered requests
-
Scrolling
- Various scroll issues in Channel component
- Shaky scroll on messages when fetching messages
- Scroll into view when starting point is set
- Scroll into message on clicking quote reply
- Inconsistent rendering on scrollToBottom button
-
Mention
- Improve max mention count logic in Messages
- Improve mention detection when there are curly braces in user's name Mentions
were not working when user nickname had curly braces
-
Special channels
- Disable mention in the broadcast channel
- Change OpenChannelInput muted state notice text in broadcast channel
-
Reply
- Apply ellipsis to a sender of quote and admin message
-
Thread
- Add border bottom to the ParentMessageInfo component
- Modify string set for thread menu "Reply to Thread" -> "Reply in Thread"
Do not display "Reply in Thread" to the reply messages - Prevent hover style of ParentMessageInfo component
-
OpenChannel
- Apply theme to the OpenChannelList header
Chores:
- Add a sample with router
- Add dataId to the every menu items
Contributors: @AhyoungRyu @HoonBaek @sravan-s
3.5.0-mobile-web-0 (npm)
Nightly for mobile ~
[v3.4.8] (May 19 2023)
Fixes:
- Prevent white space only text sending
- Mentioned user Regex parsing
Mention will now work even if userId has.*+?^${}()|[\]\\
characters. - ChannelList blink when when message is send
Happened when there were two channelLists in the same page with
different query params. - ChannelSetting
renderUserProfile
prop
We were applyingrenderChannelProfile
in place ofrenderUserProfile
. - MessageBody: Words break mid word
Words were breaking midword because all white spaces were converted into nbsps.
CSS couldnt distinguish nbsps as whitespaces, so wrapping didnt work well.
Chores:
- Setup CircleCI
- We are moving from Github Actions to CircleCI
- Setup Husky
- Setup lint on post push
- Auto run yarn install on post pull
- Update EsLint
- Update version to 8.40.x
- Apply more strict rules
Contributors: @chrisallo, @HoonBaek , @AhyoungRyu , @sravan-s
Link to 3.4.7
Jira comments points here, But release note is in
https://github.com/sendbird/sendbird-uikit-react/releases/tag/3.4.7
[v3.4.7] (May 4 2023)
Important Notes:
- @sendbird/[email protected] has an issue with
abortcontroller-polyfill
plugin. Please use version 4.7.2 or install it separately.
Features:
- Set Chat SDK v4.3.0 as the minimum required version.
- Add a new UI component, Toggle:
ToggleContainer
: A context provider component that manages only the toggle status.ToggleUI
: A UI component that does not include the status managing logic.Toggle
: A combination of ToggleContainer and ToggleUI components.useToggleContext
: A custom useContext hook that provides context from ToggleContainer.
import { Toggle, ToggleContainer, ToggleUI, useToggleContext } from '@sendbird/ui/Toggle';
Fixes:
- Apply
isMuted
to the participant list. Operators can now unmute the muted participants from the participant list. - Update the max mention count notice message.
- Modify the URL Regex to filter various types of formats.
- Give a left margin to the link text inside the message.
- Move the message list scroll after the OG image is loaded.
- Specify that getSdk returns SendbirdGroupChannel or SendbirdOpenChannel.
- Fix the issue where the current channel flickers on the ChannelList while creating a new group channel.
Chores:
- Rewrite the connection logic in sdk/thunks to hooks/useConnect
const reconnect = useConnect({ appId, userId, accessToken, }, { logger, nickname, profileUrl, configureSession, customApiHost, customWebSocketHost, sdk: sdkStore?.sdk, sdkDispatcher, userDispatcher, });
- Rename
smart-components/
tomodules/
. - Modify Logger method:
- The first parameter (log message) of the method is now required.
- Any other values can be passed to the second parameter of the method in a key-value format.
[v3.4.6] (Apr 21 2023)
Fixes:
- Use markAsReadScheduler in MessageList:
markAsReadScheduler
method throttlesmarkAsRead
calls.- Reduces cmd no ack error.
- Apply common scroll hook to GroupChannel MessageList:
- Prevent whole page from scrolling when
<GroupChannel />
scrolls.
This issue occurs when customer implements an<GroupChannel />
in a web page with scroll. - This is a same fix that we fixed OpenChannel in
v3.4.4
.
- Prevent whole page from scrolling when
- To unify message sending policies with ios & android:
- Do not show send button when there is only new line or empty space in the input.
- Do not trim leading white spaces in message text.
- Optimize lamjs import:
- Lazy load the audio converting processor(lamejs) only when
isVoiceMessageEnabled
is true. - This saves 106KB Gzipped(85KB Brotli) if you are not using the VoiceMessage feature.
- Lazy load the audio converting processor(lamejs) only when
[v3.4.5] (Apr 07 2023)
Features:
-
Add a message list filter of UI level in the
Channel
module-
Add
Channel.filterMessageList?: (messages: BaseMessage): boolean;
, a UI level filter prop
to Channel. This function will be used to filter messages in<MessageList />
example:
// set your channel URL const channel = ""; export const ChannelWithFilter = () => { const channelFilter = useCallback((message) => { const now = Date.now(); const twoWeeksAgo = now - 1000 * 60 * 60 * 24 * 14; return message.createdAt > twoWeeksAgo; }, []); return ( <Channel channelUrl={channel} filterMessageList={channelFilter} /> ); };
-
-
Improve structure of message UI for copying
Before:- The words inside messages were kept in separate spans
- This would lead to unfavourable formatting when pasted in other applications
After:
- Remove span for wrapping simple strings in message body
- Urls and Mentions will still be wrapped in spans(for formatting)
- Apply new logic & components(TextFragment) to tokenize strings
- Improve keys used in rendering inside message,
- UUIDs are not the optimal way to improve rendering
- Create a composite key with message.updatedAt
- Refactor usePaste hook to make mentions work ~
- Fix overflow of long strings
- Deprecate
Word
andconvertWordToStringObj
-
Export MessageProvider, a simple provider to avoid prop drilling into Messages
Note - this is still in works, but these props will remain- In the future, we will add methods - to this module - to:
- Edit & delete callbacks
- Menu render options(ACLs)
- Reaction configs
- This will improve the customizability and remove a lot of prop drilling in Messages
export type MessageProviderProps = { children: React.ReactNode; message: BaseMessage; isByMe?: boolean; } import { MessageProvider, useMessageContext } from '@sendbird/uikit-react/Message/context'
Incase if you were using MessageComponents and see error message
useMessageContext must be used within a MessageProvider
use:<MessageProvider message={message}><CustomMessage /></MessageProvider>
- In the future, we will add methods - to this module - to:
-
Add a scheduler for calling markAsRead intervally
- The
markAsRead
is called on individual channels is un-optimal(causes command ack. error)
because we have a list of channels that do this
ideally this should be fixed in server/SDK
this is a work around for the meantime to un-throttle the customer
- The
Fixes:
- Set current channel on
ChannelList
when opening channel from the parent message ofThread
- Issue: The ChannelPreview item is not selected when opening the channel from
the ParentMessage of the Thread - Fix: Set activeChannelUrl of ChannelList
- Issue: The ChannelPreview item is not selected when opening the channel from
- Detect new lines in safari on the
MessageInput
component- Safari puts
<div>text</div>
for new lines inside content editable div(input) - Other browsers put newline or
br
- Safari puts
Thanks @HoonBaek @AhyoungRyu
[v3.4.4] (Mar 31 2023)
Features:
- Increase default maximum recording time of Voice Message to 10 minutes
- Add logger to VoicePlayer, VoiceRecorder, and useSendVoiceMessage hook
Fixes:
- Prevent whole page from scrolling when OpenChannel scrolls
This issue occurs when customer implements an OpenChannel in a web page with scroll - Fix edgecase in which voice messages were sent twice
- Clean up Thread interface
If message.parentMessage doesnt exist, treat message as parentMessage
<Thread message={message} />
[v3.4.3] (Mar 24 2023)
Features:
- Add rollup-plugin-size-snapshot for bundle-size
Run rollup-plugin-size-snapshot on build,
we will check bundle size before every release - Move old samples to use vite
React team these days are using vite for their samples,
CRA is discourged - Run code coverage on commenting
./coverage
Check code coverage on PR comment - Add prop to disable Channel & Thread inputs
Add prop:disabled?: false
for Channel & Thread MessageInputWrapper - Replace renderToString(react-dom) with custom fn
Replace renderToString from react-dom/server with custom function
This function was creating issue in customers with cra@4 & react@17
Fixes:
- Replace outdated CSS rules
justify-content: start;
andheight: fill-available;
- Menu position in tight screens
- Condition where some menus get clipped in left side:
- Usually user profile in channel moderation
- Context menu of last item in channel gets clipped in the bottom
- Condition where some menus get clipped in left side: