-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Update trigger selection design #9717
base: main
Are you sure you want to change the base?
Conversation
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.
PR Summary
This PR reorganizes and enhances the workflow trigger selection system by introducing separate categories for database and manual triggers, with improved UI organization and clearer event naming.
- Introduced new constants in
/workflow-trigger/constants/DatabaseTriggerTypes.ts
and/DatabaseTriggerEvents.ts
to better organize trigger types and events - Added section titles 'Data' and 'Others' in
RightDrawerWorkflowSelectTriggerTypeContent.tsx
for improved trigger type categorization - Simplified trigger event handling in
WorkflowEditTriggerDatabaseEventForm.tsx
by removing redundant event type selector - Fixed icon inconsistency in
DatabaseTriggerTypes.ts
whereIconTrash
is incorrectly used for record update events - Potential edge case in
getTriggerDefaultDefinition.ts
where event name could be undefined if no matching event is found
12 file(s) reviewed, 12 comment(s)
Edit PR Review Bot Settings | Greptile
@@ -35,14 +44,37 @@ export const RightDrawerWorkflowSelectTriggerTypeContent = ({ | |||
|
|||
return ( | |||
<StyledActionListContainer> | |||
{TRIGGER_TYPES.map((action) => ( | |||
<StyledSectionTitle>Data</StyledSectionTitle> | |||
{DATABASE_TRIGGER_TYPES.map((action) => ( |
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.
style: Duplicate onClick handler logic between DATABASE_TRIGGER_TYPES and OTHER_TRIGGER_TYPES. Consider extracting to a shared function.
...nt/src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerDatabaseEventForm.tsx
Show resolved
Hide resolved
packages/twenty-front/src/modules/workflow/workflow-diagram/utils/generateWorkflowDiagram.ts
Show resolved
Hide resolved
packages/twenty-front/src/modules/workflow/workflow-trigger/constants/DatabaseTriggerEvents.ts
Show resolved
Hide resolved
packages/twenty-front/src/modules/workflow/workflow-trigger/constants/DatabaseTriggerName.ts
Show resolved
Hide resolved
...nt/src/modules/workflow/workflow-trigger/utils/__tests__/getTriggerDefaultDefinition.test.ts
Show resolved
Hide resolved
...nt/src/modules/workflow/workflow-trigger/utils/__tests__/getTriggerDefaultDefinition.test.ts
Show resolved
Hide resolved
...ages/twenty-front/src/modules/workflow/workflow-trigger/utils/getTriggerDefaultDefinition.ts
Show resolved
Hide resolved
packages/twenty-front/src/modules/workflow/workflow-variables/utils/getTriggerStepName.ts
Show resolved
Hide resolved
packages/twenty-front/src/modules/workflow/workflow-variables/utils/getTriggerStepName.ts
Show resolved
Hide resolved
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 like the new style :) Left a couple of comments to address before we can merge ;)
packages/twenty-front/src/modules/workflow/workflow-diagram/utils/generateWorkflowDiagram.ts
Show resolved
Hide resolved
packages/twenty-front/src/modules/workflow/workflow-trigger/constants/DatabaseTriggerTypes.ts
Outdated
Show resolved
Hide resolved
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.
LGTM
Enregistrement.de.l.ecran.2025-01-17.a.15.07.12.mov