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

fix: derive reaction list from reaction_groups and show reaction count while maintaining the order #2523

Merged
merged 7 commits into from
Jun 6, 2024

Conversation

khushal87
Copy link
Member

@khushal87 khushal87 commented May 23, 2024

🎯 Goal

simulator_screenshot_93AA37B9-5747-46B3-8AC2-178127B27233

🛠 Implementation details

🎨 UI Changes

iOS
Before After
Android
Before After

🧪 Testing

☑️ Checklist

  • I have signed the Stream CLA (required)
  • PR targets the develop branch
  • Documentation is updated
  • New code is tested in main example apps, including all possible scenarios
    • SampleApp iOS and Android
    • Expo iOS and Android

@khushal87 khushal87 changed the title fix: reaction list reactions sorting order based on created_at fix: derive reaction list from reaction_groups and show reaction count May 27, 2024
@khushal87 khushal87 changed the title fix: derive reaction list from reaction_groups and show reaction count fix: derive reaction list from reaction_groups and show reaction count while maintaining the order May 27, 2024
@@ -30,7 +30,7 @@ import type { PreparedQueries, Table } from './types';
*
*/
export class QuickSqliteClient {
static dbVersion = 3;
static dbVersion = 4;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Migration stuff

Comment on lines 69 to 71

export const useProcessReactions = <
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment on lines 30 to 32
export type ReactionData = {
Icon: React.ComponentType<IconProps>;
Icon: React.ComponentType;
type: string;
Copy link
Member

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..

Copy link
Member

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

const ReactionIcon =
supportedReactions.find((reaction) => reaction.type === type)?.Icon || Unknown;

Copy link
Member

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

Copy link
Member

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

@khushal87 khushal87 merged commit 46de441 into develop Jun 6, 2024
6 checks passed
@khushal87 khushal87 deleted the reaction-list-order branch June 6, 2024 13:23
@github-actions github-actions bot mentioned this pull request Jun 17, 2024
6 tasks
@stream-ci-bot
Copy link
Contributor

🎉 This PR is included in version 5.32.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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants