Conversation
SDK Size
|
| return channel; | ||
| }; | ||
|
|
||
| describe('useLatestMessagePreview', () => { |
There was a problem hiding this comment.
Why are we deleting a bunch of tests ? I can't see them moved elsewhere (might be wrong though)
There was a problem hiding this comment.
This hook is not relevant any more so its deleted. We have to properly write tests for MessagePreview component. I have it in my todo and there are a lot of edge cases, so I will handle it later. If you want I can spend time to add now. But the reason this is deleted, is the hook is non-relevant anymore.
There was a problem hiding this comment.
Hmm okay, and is there a hook that replaces it ? Or what's the deal ?
There was a problem hiding this comment.
MessagePreview replaces it
There was a problem hiding this comment.
In that case instead of using a hook (which returns an atomic string) we're relying on the component itself deciding. I would definitely move this inside of a hook to make sure that updates do not happen where they should not
| "{{ index }} of {{ photoLength }}": "{{ index }} sur {{ photoLength }}", | ||
| "{{ replyCount }} Replies": "{{ replyCount }} Réponses", | ||
| "{{ user }} is typing": "{{ user }} est en train d'écrire", | ||
| "You voted: {{ option }}": "Vous avez voté: {{ option }}", |
There was a problem hiding this comment.
Are we also removing the old translations which are no longer relevant ?
There was a problem hiding this comment.
Not yet, we can do that cleanup later. Once we know what's not used finally.
There was a problem hiding this comment.
I can run over a check later to remove onces that are not used.
There was a problem hiding this comment.
Okay, but we're leaving a lot of stuff to do "later". It worries me a bit that we'll have too much on our plate to clean up later on and it'll introduce issues. Right now we're just bloating the SDK with redundant stuff.
package/src/components/ChannelPreview/ChannelPreviewMessage.tsx
Outdated
Show resolved
Hide resolved
package/src/components/ChannelPreview/ChannelPreviewMessage.tsx
Outdated
Show resolved
Hide resolved
package/src/components/ChannelPreview/ChannelPreviewMessage.tsx
Outdated
Show resolved
Hide resolved
| return lastMessage?.type === 'deleted' ? semantics.textTertiary : semantics.textSecondary; | ||
| }, [semantics.textTertiary, semantics.textSecondary, lastMessage?.type]); | ||
|
|
||
| const textStyle = useMemo(() => { |
There was a problem hiding this comment.
This should come from useStyles preferably, we're doing an extra useMemo for no reason here.
For iconProps it's a bit different, but we can think about fixing this later I guess.
This pull request introduces significant improvements to the channel preview and messaging experience, focusing on richer message previews, enhanced delivery status indicators, and improved flexibility in UI customization. The changes modernize the
ChannelPreviewandChannelListcomponents to better support draft messages, typing indicators, poll previews, and message delivery statuses, while also providing more control over the layout and appearance of muted status indicators.Enhancements to Channel Preview and Message Status:
ChannelPreviewand related components now support richer message previews, including draft messages, typing indicators, poll previews, and error states. Message delivery status (sent, delivered, read) is now visually indicated for the latest message sent by the current user. [1] [2] [3] [4] [5] [6] [7]UI Customization and Layout Improvements:
mutedStatusPositionprop is added throughout the channel list and preview components, allowing the muted status indicator to be positioned either inline with the title or at the bottom of the preview. This prop is now part of theChannelListPropsand is passed through context to all relevant components. [1] [2] [3] [4] [5] [6] [7] [8]Visual and Interaction Tweaks:
Pressableinstead ofTouchableOpacityfor better feedback and flexibility, and the avatar size is increased for improved visibility. Layout and styling are modernized for consistency and accessibility. [1] [2]Minor UI Adjustments:
UserAddicon in the new direct messaging screen is now explicitly sized for consistency.