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(dashboard): nested payload gen #7240

Merged
merged 3 commits into from
Dec 10, 2024
Merged

Conversation

djabarovgeorge
Copy link
Contributor

What changed? Why was the change needed?

Dashboard Workflow

Before

image

After

image

Framework workflow

Before

image

After

image

Empty state case

image

Screenshots

Expand for optional sections

Related enterprise PR

Special notes for your reviewer

Copy link

netlify bot commented Dec 8, 2024

Deploy Preview for dev-web-novu ready!

Name Link
🔨 Latest commit 5df9088
🔍 Latest deploy log https://app.netlify.com/sites/dev-web-novu/deploys/67580cefb5a1280008fbb713
😎 Deploy Preview https://deploy-preview-7240.dashboard.novu-staging.co
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Comment on lines 137 to 149
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 || {});
Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

util from the API.

Copy link

netlify bot commented Dec 8, 2024

Deploy Preview for dashboard-v2-novu-staging ready!

Name Link
🔨 Latest commit 5df9088
🔍 Latest deploy log https://app.netlify.com/sites/dashboard-v2-novu-staging/deploys/67580cef389ab20008f73523
😎 Deploy Preview https://deploy-preview-7240.dashboard-v2.novu-staging.co
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

pkg-pr-new bot commented Dec 8, 2024

Open in Stackblitz

@novu/client

npm i https://pkg.pr.new/novuhq/novu/@novu/client@7240

@novu/framework

npm i https://pkg.pr.new/novuhq/novu/@novu/framework@7240

@novu/headless

npm i https://pkg.pr.new/novuhq/novu/@novu/headless@7240

@novu/node

npm i https://pkg.pr.new/novuhq/novu/@novu/node@7240

@novu/notification-center

npm i https://pkg.pr.new/novuhq/novu/@novu/notification-center@7240

novu

npm i https://pkg.pr.new/novuhq/novu@7240

@novu/providers

npm i https://pkg.pr.new/novuhq/novu/@novu/providers@7240

@novu/shared

npm i https://pkg.pr.new/novuhq/novu/@novu/shared@7240

commit: 5df9088

…load-gen

# Conflicts:
#	apps/dashboard/src/components/workflow-editor/test-workflow/test-workflow-tabs.tsx
@djabarovgeorge djabarovgeorge merged commit bca24ba into next Dec 10, 2024
43 checks passed
@djabarovgeorge djabarovgeorge deleted the fix-test-workflow-payload-gen branch December 10, 2024 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants