-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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: add workflow creation from blueprint #5189
feat: add workflow creation from blueprint #5189
Conversation
b7b0728
to
b4d29fd
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.
Great work! Added some comments and questions, and only one small "chore" regarding re-naming / typing
onSuccess: (data) => { | ||
if (data) { | ||
const { name: blueprintName } = getWorkflowBlueprintDetails(data.name); | ||
createTemplateFromBlueprint({ | ||
blueprint: { ...data, name: blueprintName }, | ||
params: { __source: TemplateCreationSourceEnum.ONBOARDING_GET_STARTED }, | ||
}); | ||
} |
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.
❔ question: Is this function async? If so, we need to await or return createTemplateFromBlueprint
, right?
export const getWorkflowBlueprintDetails = (templateName: string): { name: string; iconName: IconName } => { | ||
const regexResult = /^:.{1,}:/.exec(templateName); | ||
let name = ''; | ||
let iconName = 'fa-solid fa-question'; | ||
if (regexResult !== null) { | ||
name = templateName.replace(regexResult[0], '').trim(); | ||
iconName = regexResult[0].replace(/:/g, '').trim(); | ||
} | ||
|
||
return { name, iconName: iconName as IconName }; |
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.
💭 thought: I realize this is just refactoring / moving this, but this IconName coupling is going to be a problem with de-coupling from our icon set(s)
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.
what do you mean by our icon set(s)
?
small note: this logic was created so we could store icons by string conversion, this way we can store them easily in the template store under workflow.name
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.
Yeah, this is a tough one because we're tightly coupled with FontAwesome as an icon set due to this implementation
0f7ff54
to
6ccea0b
Compare
- Add all static links for each use case - Connect In-App tab to specific Integration store side panel - Create abstraction to make adding animations easier for the different color schemes - Fix Timeline styling in light mode
…e-workflow-from-blueprint
0116ed9
into
usecase-onboarding-project
What change does this PR introduce?
Create a component that will be responsible for the creation of a use case workflow from a blueprint.
Why was this change needed?
So we could reuse it across the get started onboarding.
Other information (Screenshots)