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-8511 - Restoring the Relationship Code field on contacts #1250

Merged
merged 6 commits into from
Jan 7, 2025

Conversation

dr-bizz
Copy link
Contributor

@dr-bizz dr-bizz commented Jan 7, 2025

Description

In 2020, we added custom code to the contact details tab for the Switzland Cru. View the old MPDX Web PR
This code only allowed the Switzland Cru organization members to view and edit the "Relationship Code" field since they use this with their MailChimp integration.

In this PR, I have added the field back to the contacts page under the partnership info.

Blocked:

In order for this PR to be deployed, we need some GraphQL work completed. We need to add the field relationshipCode as an input under attributes on the updateContact mutation.
In our code, I have commented out code which is needed, but would break the site otherwise.

Links

HelpScout: https://secure.helpscout.net/conversation/2768772103/1262455?viewId=7296147
Jira: https://jira.cru.org/browse/MPDX-8511

Test

  1. impersonate Swiss staff member [email protected]
  2. go to contact
  3. on the details tab, under partnership info, there should be a relationship code field (In german "Beziehungsart")
  4. Click the edit partnershipInfo button to view the modal
  5. You can view the partnershipInfo modal at the top of the contact

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

@dr-bizz dr-bizz added the Preview Environment Add this label to create an Amplify Preview label Jan 7, 2025
Copy link
Contributor

github-actions bot commented Jan 7, 2025

Bundle sizes [mpdx-react]

Compared against d633c2e

Route Size (gzipped) Diff
/accountLists/[accountListId]/tools/fix/commitmentInfo/[[...contactId]] 236.31 KB +1.55 KB
Dynamic import Size (gzipped) Diff
src/components/Contacts/ContactDetails/ContactDonationsTab/DynamicContactDonationsTab.tsx -> ./ContactDonationsTab 187.01 KB -1.71 KB
src/components/Contacts/ContactsRightPanel/DynamicContactsRightPanel.tsx -> ./ContactsRightPanel 124.45 KB +1.57 KB

Copy link
Contributor

github-actions bot commented Jan 7, 2025

@dr-bizz dr-bizz requested a review from canac January 7, 2025 16:44
Copy link
Contributor

@canac canac 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! Thanks for improving some of the tests.

I'm OK with the PNP change, but if yarn tries to change it again, we should probably try to dig into why.

@@ -8314,7 +8314,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
]],\
["@surma/rollup-plugin-off-main-thread", [\
["npm:2.2.3", {\
"packageLocation": "./.yarn/unplugged/@surma-rollup-plugin-off-main-thread-npm-2.2.3-1f57d3eded/node_modules/@surma/rollup-plugin-off-main-thread/",\
"packageLocation": "./.yarn/cache/@surma-rollup-plugin-off-main-thread-npm-2.2.3-1f57d3eded-2c02134944.zip/node_modules/@surma/rollup-plugin-off-main-thread/",\
Copy link
Contributor

Choose a reason for hiding this comment

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

If we change this back to how it once was, I'm wondering if yarn is going to try to revert it back to unplugged later. I'm not sure whether unplugged or cache, is correct, but I've found that deleting .yarn/cache at least makes yarn stop making changes every time you run yarn.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After deleting ``.yarn/cacheand runningyarn` again, it made this change again.

Copy link
Contributor

Choose a reason for hiding this comment

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

Since this PR merged, after pulling from main, yarn wants to revert it back to unplugged on my machine. Is it doing that for you?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, yarn doesn't revert it back. weird.

@dr-bizz dr-bizz force-pushed the adding-relationship-back-to-mpdx branch from 36c3e78 to ed08340 Compare January 7, 2025 22:06
@dr-bizz dr-bizz enabled auto-merge January 7, 2025 22:06
@dr-bizz dr-bizz merged commit c7e1171 into main Jan 7, 2025
19 checks passed
@dr-bizz dr-bizz deleted the adding-relationship-back-to-mpdx branch January 7, 2025 22:11
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