-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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(dashboard): nested payload gen #7240
Conversation
✅ Deploy Preview for dev-web-novu ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
const examplePayloadSchema = createMockObjectFromSchema( | ||
{ | ||
type: 'object', | ||
properties: { payload: workflow.payloadSchema }, | ||
}, | ||
true | ||
); | ||
|
||
if (!examplePayloadSchema || Object.keys(examplePayloadSchema).length === 0) { | ||
return finalPayload; | ||
} | ||
|
||
return _.merge( | ||
finalPayload as Record<string, unknown>, | ||
{ payload: examplePayloadSchema }, | ||
commandVariablesExample || {} | ||
); | ||
return _.merge(finalPayload as Record<string, unknown>, examplePayloadSchema, commandVariablesExample || {}); |
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.
the change was needed because now createMockObjectFromSchema is a more generic function and not payload
object based.
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.
was moved to shared and refactored to be a more generic function and not payload object based.
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.
was deleted, less is more?
now we reuse the createMockObjectFromSchema from shared the same one that BE used.
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.
util from the API.
✅ Deploy Preview for dashboard-v2-novu-staging ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@novu/client
@novu/framework
@novu/headless
@novu/node
@novu/notification-center
novu
@novu/providers
@novu/shared
commit: |
…load-gen # Conflicts: # apps/dashboard/src/components/workflow-editor/test-workflow/test-workflow-tabs.tsx
What changed? Why was the change needed?
Dashboard Workflow
Before
After
Framework workflow
Before
After
Empty state case
Screenshots
Expand for optional sections
Related enterprise PR
Special notes for your reviewer