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-7955 ecreate Flows and Implement Contact Move Functionality #1030

Closed
wants to merge 11 commits into from

Conversation

dr-bizz
Copy link
Contributor

@dr-bizz dr-bizz commented Sep 5, 2024

Description

In this PR, I added the column switching functionality to the flows view.

You can view the changes in this PR like so:

  • Setting up the page for functionality when moving user
  • Exclude Functionality
  • Asked Functionality
  • Committed Functionality
  • Received Functionality
  • Editing functionality on Flows to ensure it all works.
    • Removing selectedFilters prop as no longer needed
    • Fixing mistake with status on the contact
    • Making own version of FrayLayer and RowPreview as status value is different.
  • Given Functionality
    • Update Donations Modal
    • Writing tests for update donations
  • Writing test to ensure everything works as it should

I will be adding the following functionality in up coming PRs.

  • refresh columns after moving contact.
  • Prevent contact from going to specific columns.
  • Select all functionality

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 requested review from canac and removed request for canac September 5, 2024 16:30
@dr-bizz dr-bizz force-pushed the MPDX-8137-refresh-columns branch from 6176d1a to 97f5dd9 Compare September 5, 2024 16:38
@dr-bizz dr-bizz requested a review from canac September 5, 2024 16:38
Copy link
Contributor

github-actions bot commented Sep 5, 2024

Bundle sizes [mpdx-react]

Compared against c2b3d21

Dynamic import Size (gzipped) Diff
../src/components/Contacts/ContactFlow/DynamicContactFlow.tsx -> ./ContactFlow 60.42 KB +1.58 KB
../src/components/EditDonationModal/DynamicEditDonationModal.tsx -> ./EditDonationModal 76.67 KB +1.05 KB
../src/components/Tool/Appeal/Flow/DynamicContactFlow.tsx -> ./ContactFlow 60.42 KB +1.58 KB
../src/components/Tool/Appeal/Modals/UpdateDonationsModal/DynamicUpdateDonationsModal.tsx -> ./UpdateDonationsModal 104.92 KB added

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.

Just a few style suggestions I noticed, but this is really good! I'm a little concerned that we had to copy/paste the DonationTable component, but it would probably be fairly difficult to refactor it into a generic component that can be used in both places.

src/components/Tool/Appeal/Flow/ContactFlow.tsx Outdated Show resolved Hide resolved
src/components/Tool/Appeal/Flow/ContactFlow.tsx Outdated Show resolved Hide resolved
src/components/Tool/Appeal/Flow/ContactFlow.tsx Outdated Show resolved Hide resolved
@@ -0,0 +1,279 @@
import React, { useEffect, useMemo } from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume this component is too different from the existing DonationTable to reuse it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think so. It can probably be done, but the component might then become too confusing. Maybe this is something we can flag for post-switch to investigate.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's good as-is for now.

@dr-bizz dr-bizz requested a review from canac September 6, 2024 12:31
@dr-bizz
Copy link
Contributor Author

dr-bizz commented Sep 6, 2024

I'm a little concerned that we had to copy/paste the DonationTable component, but it would probably be fairly difficult to refactor it into a generic component that can be used in both places.

So this is what I initially did, but since it got so complex and I needed to move queries and functionality to the parent component, I had to switch to using my own table.

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.

I don't think you've changed anything since I reviewed last. Still looks good! I agree about the donations table. Sometimes duplication is better for components that serve different enough purposes.

@dr-bizz dr-bizz force-pushed the MPDX-8137-refresh-columns branch from becf743 to 3cfc621 Compare September 6, 2024 13:18
@dr-bizz dr-bizz force-pushed the MPDX-8137-refresh-columns branch from 3cfc621 to a95487b Compare September 6, 2024 13:19
MPDX-7955 Create Flows and Implement Contact Move Functionality
@dr-bizz dr-bizz closed this Sep 6, 2024
@dr-bizz
Copy link
Contributor Author

dr-bizz commented Sep 6, 2024

This PR was merged into production. something weird happened when I merged it and it think's it was closed.

@canac canac deleted the MPDX-8137-refresh-columns branch September 6, 2024 13:58
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.

2 participants