glific / mobile

8 stars 17 forks source link

Feat/collection messaging #117

Closed ajaman190 closed 1 year ago

ajaman190 commented 1 year ago

Pull Request: Implement Send Message to a Collection

Description: This pull request addresses the issue #113 of implementing the "Send Message to a Collection" feature. This PR will make chat screen components dynamic, allowing them to send and receive messages for both contacts and collections.

Changes Made:

  1. Modified chat screen components to handle messages for both contacts and collections dynamically.
  2. Implemented the "Send Message to a Collection" feature, enabling users to send messages to specific collections.
  3. Added tests specifically targeted at collection messages to maintain code integrity and stability.

Screenshots:

https://github.com/glific/mobile/assets/84832565/f5ac8566-ecae-4f7f-ba81-2887f0a24b9b

Closes Issue: Closes: #113

@mdshamoon @VishalZ123 Review this PR and let me know your feedbacks.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 47.61% and project coverage change: -0.62 :warning:

Comparison is base (057d359) 70.04% compared to head (d1cd6e8) 69.42%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #117 +/- ## ========================================== - Coverage 70.04% 69.42% -0.62% ========================================== Files 59 61 +2 Lines 918 942 +24 Branches 204 210 +6 ========================================== + Hits 643 654 +11 - Misses 268 281 +13 Partials 7 7 ``` | [Impacted Files](https://app.codecov.io/gh/glific/mobile/pull/117?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=glific) | Coverage Δ | | |---|---|---| | [components/CollectionCard.tsx](https://app.codecov.io/gh/glific/mobile/pull/117?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=glific#diff-Y29tcG9uZW50cy9Db2xsZWN0aW9uQ2FyZC50c3g=) | `80.00% <ø> (ø)` | | | [components/ContactCard.tsx](https://app.codecov.io/gh/glific/mobile/pull/117?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=glific#diff-Y29tcG9uZW50cy9Db250YWN0Q2FyZC50c3g=) | `90.00% <ø> (ø)` | | | [components/ui/Loading.tsx](https://app.codecov.io/gh/glific/mobile/pull/117?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=glific#diff-Y29tcG9uZW50cy91aS9Mb2FkaW5nLnRzeA==) | `100.00% <ø> (ø)` | | | [graphql/queries/Contact.ts](https://app.codecov.io/gh/glific/mobile/pull/117?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=glific#diff-Z3JhcGhxbC9xdWVyaWVzL0NvbnRhY3QudHM=) | `100.00% <ø> (ø)` | | | [components/messages/ChatInput.tsx](https://app.codecov.io/gh/glific/mobile/pull/117?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=glific#diff-Y29tcG9uZW50cy9tZXNzYWdlcy9DaGF0SW5wdXQudHN4) | `52.94% <19.04%> (-7.93%)` | :arrow_down: | | [components/headers/ChatHeader.tsx](https://app.codecov.io/gh/glific/mobile/pull/117?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=glific#diff-Y29tcG9uZW50cy9oZWFkZXJzL0NoYXRIZWFkZXIudHN4) | `56.75% <42.85%> (+15.09%)` | :arrow_up: | | [components/messages/Message.tsx](https://app.codecov.io/gh/glific/mobile/pull/117?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=glific#diff-Y29tcG9uZW50cy9tZXNzYWdlcy9NZXNzYWdlLnRzeA==) | `93.75% <100.00%> (ø)` | | | [components/messages/MessageList.tsx](https://app.codecov.io/gh/glific/mobile/pull/117?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=glific#diff-Y29tcG9uZW50cy9tZXNzYWdlcy9NZXNzYWdlTGlzdC50c3g=) | `80.76% <100.00%> (+0.76%)` | :arrow_up: | | [graphql/mutations/Chat.ts](https://app.codecov.io/gh/glific/mobile/pull/117?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=glific#diff-Z3JhcGhxbC9tdXRhdGlvbnMvQ2hhdC50cw==) | `100.00% <100.00%> (ø)` | | | [graphql/queries/Chat.ts](https://app.codecov.io/gh/glific/mobile/pull/117?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=glific#diff-Z3JhcGhxbC9xdWVyaWVzL0NoYXQudHM=) | `100.00% <100.00%> (ø)` | | | ... and [3 more](https://app.codecov.io/gh/glific/mobile/pull/117?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=glific) | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/glific/mobile/pull/117/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=glific)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.