-
Notifications
You must be signed in to change notification settings - Fork 325
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
fix: derive reaction list from reaction_groups and show reaction count while maintaining the order #2523
Conversation
@@ -30,7 +30,7 @@ import type { PreparedQueries, Table } from './types'; | |||
* | |||
*/ | |||
export class QuickSqliteClient { | |||
static dbVersion = 3; | |||
static dbVersion = 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Migration stuff
|
||
export const useProcessReactions = < | ||
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a small documentation of this hook of what it does please.. useful for future maintenance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
package/src/utils/utils.ts
Outdated
export type ReactionData = { | ||
Icon: React.ComponentType<IconProps>; | ||
Icon: React.ComponentType; | ||
type: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this change necessary?, seems like its making the type looser now..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw how this is used
stream-chat-react-native/package/src/components/Message/MessageSimple/ReactionList.tsx
Lines 37 to 38 in 54cccba
const ReactionIcon = | |
supportedReactions.find((reaction) => reaction.type === type)?.Icon || Unknown; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
intuiverly it seems like this removal should not be done to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is better
Icon: React.ComponentType<Partial<IconProps>>;
Supports just a normal Text component and also integrators get to add support for the icon props if they want for SVG override
🎉 This PR is included in version 5.32.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎯 Goal
🛠 Implementation details
🎨 UI Changes
iOS
Android
🧪 Testing
☑️ Checklist
develop
branch