-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
Removed vultr server and associated DNS entries |
There was a problem hiding this 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!
editor.planx.uk/src/lib/feedback.ts
Outdated
@@ -25,10 +25,9 @@ export async function getInternalFeedbackMetadata(): Promise<FeedbackMetadata> { | |||
breadcrumbs, | |||
currentCard: node, | |||
computePassport, | |||
fetchCurrentTeam, | |||
teamId, |
There was a problem hiding this comment.
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 ateamId
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!)
- Because
- Double-checking
window.api.getState().teamId
in the console, which also returnedundefined
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
98b0698
to
42950cb
Compare
There was a problem hiding this 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 ✅
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 moveFlowgetBySlug()
query.Removed the fetch for
teamId
in the lib/feedback.ts and replaced it with a store value