Skip to content

Conversation

canac
Copy link
Contributor

@canac canac commented Aug 20, 2025

Description

Update the goals list and cards to use real data from the GraphQL API.

The starred / primary is in the design, but it is a post-MVP feature, so I removed the star from being rendered for now. I kept in the codebase so that it's possible to test and so that it's easy to turn back on when we're ready.

It also renders the date as the title since we don't have a name field for goal calculations yet (Zach is working on this).

Depends on https://github.com/CruGlobal/mpdx_api/pull/2969 and https://github.com/CruGlobal/mpdx_api/pull/2983

MPDX-8759 and MPDX-8764

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

@canac canac requested a review from dr-bizz August 20, 2025 20:31
@canac canac self-assigned this Aug 20, 2025
@canac canac added the Preview Environment Add this label to create an Amplify Preview label Aug 20, 2025
Copy link
Contributor

Preview branch generated at https://8759-load-goal-calculations.d3dytjb8adxkk5.amplifyapp.com

Copy link
Contributor

@dr-bizz dr-bizz left a comment

Choose a reason for hiding this comment

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

Great work on this

Comment on lines +124 to +129
update: (cache) => {
cache.evict({ id: `GoalCalculation:${goal.id}` });
cache.gc();
},
});
setDeleting(false);
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets add snackbar to this so the user is updated if it's successful or there is an error

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Quoting my other comment:

The GraphQL client automatically shows a snackbar message if there was an error. I know in some places we show a snackbar message on errors, but that actually results in 2 snackbar messages popping up.

I'm not strongly opposed to adding a success message. Although my initial thought is that seeing the goal calculation disappear from the list is sufficient to tell the user that it was deleted.

@canac canac enabled auto-merge August 25, 2025 18:55
Copy link
Contributor

Bundle sizes [mpdx-react]

Compared against e8281a8

Route Size (gzipped) Diff
/accountLists/[accountListId]/reports/goalCalculator 122.78 KB +3.52 KB

@canac canac merged commit 72aae9c into main Aug 25, 2025
16 of 17 checks passed
@canac canac deleted the 8759-load-goal-calculations branch August 25, 2025 20:16
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