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

fix: Move Flow and Feedback Lib bug fixes #3655

Merged
merged 11 commits into from
Sep 12, 2024
Merged

fix: Move Flow and Feedback Lib bug fixes #3655

merged 11 commits into from
Sep 12, 2024

Conversation

RODO94
Copy link
Contributor

@RODO94 RODO94 commented Sep 11, 2024

Cleaner branch to see all of the fixes for the moveFlow API call and the Feedback library fetch.

Used the $client instead of $public for the moveFlow getBySlug() query.

Removed the fetch for teamId in the lib/feedback.ts and replaced it with a store value

@RODO94 RODO94 requested a review from a team September 11, 2024 17:14
Copy link

github-actions bot commented Sep 11, 2024

Removed vultr server and associated DNS entries

Copy link
Member

@jessicamcinchak jessicamcinchak left a comment

Choose a reason for hiding this comment

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

Thanks for this fix, but not quite there yet!

  • ✅ "Move" is working
  • ✅ Send to email is working
  • ❌ Feedback is NOT working - please see comment

Also please make note of "GitHub Action" warning picking up an unused import! We can ignore these for files that haven't been changed, but good to pay attention to when flagging something in your changes!

@@ -25,10 +25,9 @@ export async function getInternalFeedbackMetadata(): Promise<FeedbackMetadata> {
breadcrumbs,
currentCard: node,
computePassport,
fetchCurrentTeam,
teamId,
Copy link
Member

@jessicamcinchak jessicamcinchak Sep 11, 2024

Choose a reason for hiding this comment

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

This appears to be undefined, so I don't actually think this solution works and we need to do the fetch as before but with correct permissions/fields.

On the pizza, I determined this by:

  • Noticing the Feedback Log was empty, even though the front end interaction appeared to succeed (teamId is required to properly filter/populate view)
  • Inspecting the graphql mutation InsertFeedback in my network tab from the /published link - you'll see it's missing a teamId variable (graphql omits variables if undefined)
    • Because team_id is a nullable field on the feedback table this doesn't throw an error (it arguably should, but that can be picked up later!)
  • Double-checking window.api.getState().teamId in the console, which also returned undefined when on a /published link
    • Again ultimately we probably want to fix how this is instantiated in the store so it's defined/available earlier, but if we can simply revert to the fetch here with adjusted permissions that might be quickest/most pragmatic fix right now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jessicamcinchak using the updated getBySlug() with submission_email removed seems to fix this for me locally, with team_id being in the database.

Going to check it on the pizza now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pizza is working for me

Copy link
Member

@jessicamcinchak jessicamcinchak left a comment

Choose a reason for hiding this comment

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

All working as expected for me now ✅

@RODO94 RODO94 merged commit 77c78b4 into main Sep 12, 2024
12 checks passed
@RODO94 RODO94 deleted the rory/move-flow-fix branch September 12, 2024 10:18
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