-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(api): wip fix framework workflow issues #7147
feat(api): wip fix framework workflow issues #7147
Conversation
✅ Deploy Preview for novu-stg-vite-dashboard-poc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
const validatedWorkflowWithIssues = await this.workflowUpdatePostProcess.execute({ | ||
user: { | ||
_id: command.userId, | ||
environmentId: command.environmentId, | ||
organizationId: command.organizationId, | ||
} as UserSessionData, | ||
workflow: { | ||
...savedWorkflow, | ||
userPreferences: null, | ||
defaultPreferences: this.getWorkflowPreferences(workflow), | ||
}, | ||
}); | ||
|
||
savedWorkflow = await this.updateWorkflowUsecase.execute( | ||
UpdateWorkflowCommand.create({ | ||
...validatedWorkflowWithIssues, | ||
id: validatedWorkflowWithIssues._id, | ||
type: WorkflowTypeEnum.BRIDGE, | ||
environmentId: command.environmentId, | ||
organizationId: command.organizationId, | ||
userId: command.userId, | ||
}) | ||
); |
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.
if (children === PreviewIssueEnum.PREVIEW_ISSUE_REQUIRED_CONTROL_VALUE_IS_MISSING) { | ||
return null; | ||
} |
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 part ensures that the issue returned by the API from the backend is not rendered.
https://www.loom.com/share/ae23d0ef53ff455a8f5fe5b521674308
I have two questions:
- Is this the correct approach to render null it in the new dashboard?
- Why are we returning this value from the backend in the first place? Don’t we already use issues to inform the frontend when there’s a problem?
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.
My main problem with it, is that the preview will not indicate any error state on the tab. This at least shows you that something is wrong.
@novu/client
@novu/headless
@novu/framework
@novu/js
@novu/nextjs
@novu/node
@novu/notification-center
novu
@novu/providers
@novu/react
@novu/react-native
@novu/shared
commit: |
…rkflows-show-preview-issuerequired-control-value-is # Conflicts: # apps/api/src/app/workflows-v2/generate-preview.e2e.ts
✅ Deploy Preview for dev-web-novu ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for dashboard-v2-novu-staging ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Looks good, let's just restore the issue rendering behaviour as per the slack thread https://github.com/novuhq/novu/pull/7147/files#r1865851863
…rkflows-show-preview-issuerequired-control-value-is
What changed? Why was the change needed?
now framework workflow has issues ;)

https://www.loom.com/share/ae23d0ef53ff455a8f5fe5b521674308
Screenshots
Expand for optional sections
Related enterprise PR
Special notes for your reviewer