-
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(web,api-service): redirect edit action of v1 workflows to old web app when opt-in #7460
Conversation
✅ Deploy Preview for dev-web-novu ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
if (typeof template.type === 'undefined' && typeof template.origin === 'undefined') { | ||
return WorkflowOriginEnum.NOVU_CLOUD_V1; | ||
} |
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 fixes the workflow badge in the Dashboard workflows list page.
The old v1 workflows like I do have in prod don't have type
and origin
fields that were introduced later. In that case the origin of the workflow is v1
.
switch (currentRoute) { | ||
case ROUTES.GET_STARTED: | ||
return `${newDashboardUrl}/env/${environment?.slug}/welcome`; | ||
case ROUTES.WORKFLOWS: | ||
return `${newDashboardUrl}/env/${environment?.slug}/workflows`; | ||
case ROUTES.ACTIVITIES: | ||
return `${newDashboardUrl}/env/${environment?.slug}/activity-feed`; | ||
case ROUTES.INTEGRATIONS: | ||
return `${newDashboardUrl}/integrations`; | ||
case ROUTES.API_KEYS: | ||
return `${newDashboardUrl}/env/${environment?.slug}/api-keys`; | ||
default: | ||
return undefined; |
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.
Based on the Web application's current route calculate the new Dashboard URL and redirect the user when he is opt-in.
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.
I had to refactor the previous code because we want to allow editing the v1 workflows in the old Web app if the user is opt-in. Also at the same time clicking in the side navigation in the Web app should redirect user to the new Dashboard corresponding page.
✅ Deploy Preview for dashboard-v2-novu-staging ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
What changed? Why was the change needed?
Redirect the edit v1 workflow action to the old Web application when the user is opt-in.
Also, improve the logic of redirecting to the new Dashboard pages in the Web app.
Screenshots
Screen.Recording.2025-01-08.at.15.10.15.mov