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

MPDX-7943 | Add Contacts Drawer to Tools #960

Merged
merged 11 commits into from
Jun 20, 2024

Conversation

dr-bizz
Copy link
Contributor

@dr-bizz dr-bizz commented Jun 18, 2024

Description

This pull request introduces the functionality to display contact details within the Tool pages, preventing the need to redirect to the Contact page. This includes the creation of a Tool Wrapper component and a Tool React hook for streamlined code.

Breakdown

  • Added Tool Wrapper component and Tool React hook.
  • Implemented setContactFocus function for contact display. (Like in the ContactContext).
  • Updated fixMailingAddress, fixCommitmentInfo, fixSendNewsletters, mergeContacts, fixEmailAddress, fixPhoneNumbers, and mergePeople to use new contact display functionality. I apply these changes in a separate commit to make reviewing easier.
  • Added tests for fixMailingAddress.

Further edits needed to work

We need additional GraphQL work for the following Tool pages fixEmailAddressess, fixPhoneNumbers & mergePeople. I have communicated this to Andrew via Slack and commented this in the code.

Tests

I have written tests for the fixMailingAddressess, but I will not be writing tests for the other pages as it is up to the owners of those pages to write them, which they will most likely be able to copy mine.

Code Coverage will fail, but it's okay. I'm making a lot of changes on files which don't currently have tests and the developers in charge of those pages will write tests for those files.

Checklist:

  • I have given my PR a title with the format "MPDX-(JIRA#) (summary sentence max 80 chars)"
  • I have applied the appropriate labels. (Add the label "On Staging" to get the branch automatically merged into staging.)
  • I have requested a review from another person on the project

Copy link
Contributor

github-actions bot commented Jun 18, 2024

Bundle sizes [mpdx-react]

Compared against f58d594

Route Size (gzipped) Diff
/accountLists/[accountListId]/tools/fixCommitmentInfo/[[...contactId]] 110.66 KB added
/accountLists/[accountListId]/tools/fixEmailAddresses/[[...contactId]] 110.68 KB added
/accountLists/[accountListId]/tools/fixMailingAddresses/[[...contactId]] 186.76 KB added
/accountLists/[accountListId]/tools/fixPhoneNumbers/[[...contactId]] 110.95 KB added
/accountLists/[accountListId]/tools/fixSendNewsletter/[[...contactId]] 109.3 KB added
/accountLists/[accountListId]/tools/mergeContacts/[[...contactId]] 108.03 KB added
/accountLists/[accountListId]/tools/mergePeople/[[...contactId]] 107.6 KB added
/accountLists/[accountListId]/tools/fixCommitmentInfo no change removed
/accountLists/[accountListId]/tools/fixEmailAddresses no change removed
/accountLists/[accountListId]/tools/fixMailingAddresses no change removed
/accountLists/[accountListId]/tools/fixPhoneNumbers no change removed
/accountLists/[accountListId]/tools/fixSendNewsletter no change removed
/accountLists/[accountListId]/tools/mergeContacts no change removed
/accountLists/[accountListId]/tools/mergePeople no change removed

@dr-bizz dr-bizz requested a review from caleballdrin June 18, 2024 16:06
Copy link
Contributor

@caleballdrin caleballdrin left a comment

Choose a reason for hiding this comment

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

Good work on this! Just some small changes and 1 issue with the accountListId.

src/components/Tool/FixMailingAddresses/Contact.tsx Outdated Show resolved Hide resolved
src/components/Tool/FixSendNewsletter/Contact.tsx Outdated Show resolved Hide resolved
@dr-bizz dr-bizz requested a review from caleballdrin June 19, 2024 19:35
Copy link
Contributor

@caleballdrin caleballdrin left a comment

Choose a reason for hiding this comment

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

Looks good!

@dr-bizz dr-bizz added the Preview Environment Add this label to create an Amplify Preview label Jun 19, 2024
Copy link
Contributor

@dr-bizz dr-bizz force-pushed the MPDX-7943-open-contact-in-drawers-on-tools branch from 12e22aa to 613f57a Compare June 20, 2024 12:13
@dr-bizz dr-bizz enabled auto-merge June 20, 2024 12:14
@dr-bizz dr-bizz merged commit 1197576 into main Jun 20, 2024
34 of 35 checks passed
@dr-bizz dr-bizz deleted the MPDX-7943-open-contact-in-drawers-on-tools branch June 20, 2024 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Preview Environment Add this label to create an Amplify Preview
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants