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

[CP-2000] [Messages] Search results seems to be in random order. #1408

Merged
merged 17 commits into from
Oct 3, 2023

Conversation

patryk-sierzega
Copy link
Contributor

@patryk-sierzega patryk-sierzega commented Sep 28, 2023

Jira: CP-2000
Description

  • changed filtering of receivers and contacts - now these are filtered by firstName, lastName, phoneNumber (one or two) and fullName (which is firstName + lastName)
  • changed name of flatlist to contacts
  • changed selector getFlatList to getContacts
  • getState function in async thunk actions is correctly typed
  • redux selectors are used in components / prop drilling is reduce

@codecov
Copy link

codecov bot commented Sep 28, 2023

Codecov Report

Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (01732fc) 76.68% compared to head (74de44a) 76.67%.
Report is 4 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1408      +/-   ##
===========================================
- Coverage    76.68%   76.67%   -0.02%     
===========================================
  Files          918      921       +3     
  Lines        13665    13696      +31     
  Branches      2040     2051      +11     
===========================================
+ Hits         10479    10501      +22     
- Misses        2606     2616      +10     
+ Partials       580      579       -1     
Files Coverage Δ
...ecting/components/connecting-content.component.tsx 100.00% <100.00%> (+6.66%) ⬆️
...c/connecting/components/error-connecting-modal.tsx 100.00% <100.00%> (ø)
...s-select-modal/contacts-select-modal.component.tsx 100.00% <100.00%> (ø)
...t-item/virtualized-contact-list-item.component.tsx 94.82% <ø> (ø)
...ontacts/helpers/filter-contacts/filter-contacts.ts 100.00% <100.00%> (ø)
...p/src/contacts/selectors/contacts-hash.selector.ts 100.00% <100.00%> (ø)
...es/app/src/contacts/selectors/contacts.selector.ts 100.00% <100.00%> (ø)
...acts/selectors/favourite-contacts-hash.selector.ts 92.30% <100.00%> (ø)
.../selectors/get-contact-by-phone-number.selector.ts 100.00% <100.00%> (ø)
packages/app/src/contacts/selectors/index.ts 100.00% <100.00%> (ø)
... and 14 more

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

dkarski
dkarski previously approved these changes Sep 29, 2023
Copy link
Member

@dkarski dkarski left a comment

Choose a reason for hiding this comment

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

Very cool job 🍻 As part of my review, I've included a few questions that shouldn't block the pull request and shouldn't have a significant impact on the proposed changes.

@@ -53,7 +53,7 @@ const mapStateToProps = (state: RootModel & ReduxRootState) => {
allItemsSelected: state.contacts.selectedItems.allItemsSelected,
resultState: contacts.resultState,
contactList: contactsList,
flatList: flatListSelector(state),
contacts: contactsSelector(state),
Copy link
Member

Choose a reason for hiding this comment

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

👍

* For licensing, see https://github.com/mudita/mudita-center/blob/master/LICENSE.md
*/

export const sortByLastNameAscending = <T extends { lastName?: string }>(
Copy link
Member

Choose a reason for hiding this comment

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

The function name seems to be isn't equal to a file name. Is it intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nope :D forget about it, thanks

import { ExportContactFailedModal } from "../export-contact-failed-modal/export-contact-failed-modal.component"
import { applyValidationRulesToImportedContacts } from "App/contacts/helpers/apply-validation-rules-to-imported-contacts/apply-validation-rules-to-imported-contacts"
import { ExportContactsResult } from "App/contacts/constants"
import DeleteContactsPopup from "./delete-contacts-popup/delete-contacts-popup.component"
import { differenceWith, isEqual } from "lodash"
import { filterContacts } from "App/messages/helpers/messages.helpers"
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure, so I'll ask if contact filtering should be the domain of messages? 🤔

OskarMichalkiewicz and others added 2 commits September 29, 2023 07:01
…er if they select more files than they can add within the limit [Harmony] (#1402)

Co-authored-by: Łukasz Kowalczyk <[email protected]>
Co-authored-by: patryk-sierzega <[email protected]>
Co-authored-by: Łukasz Kowalczyk <[email protected]>
Co-authored-by: Daniel Karski <[email protected]>
@dkarski dkarski self-requested a review September 29, 2023 07:16
dkarski
dkarski previously approved these changes Sep 29, 2023
@dkarski dkarski dismissed their stale review September 29, 2023 07:32

The merge-base changed after approval.

@dkarski dkarski self-requested a review September 29, 2023 09:16
@patryk-sierzega patryk-sierzega merged commit ef62195 into develop Oct 3, 2023
2 of 3 checks passed
@patryk-sierzega patryk-sierzega deleted the CP-2000 branch October 3, 2023 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants