Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| ? language.t(variable.toLowerCase().concat("_workflow")).replace(/ /g, "_").toLocaleUpperCase() | ||
| : originalVariables.includes(variable.toLowerCase().concat("_name_workflow")) //for the old variables names (ORGANIZER_NAME, ATTENDEE_NAME) | ||
| ? language.t(variable.toLowerCase().concat("_name_workflow")).replace(/ /g, "_").toLocaleUpperCase() | ||
| const regex = new RegExp(`{${variable}}`, "g"); // .replaceAll is not available here for some reason |
There was a problem hiding this comment.
This (+ changes in line 31) fixed a bug in translating some variables in some languages
| setShowBlockOptionsDropDown: Dispatch<SetStateAction<boolean>>; | ||
| }; | ||
|
|
||
| function BlockOptionsDropdownList({ |
There was a problem hiding this comment.
Removing the BlockOptionsDropdownList as we are now using our Dropdown component
| />, | ||
| document.body | ||
| )} | ||
| <Dropdown> |
There was a problem hiding this comment.
Using our Dropdown component here
|
This PR currently has a merge conflict. Please resolve this and then re-add the |
PeerRich
left a comment
There was a problem hiding this comment.
tested and works! added comments unrelated to this PR which can be addressed here or in a follow up PR
|
@CarinaWolli Looks good, agree with Peer's feedback on UI. The only NIT I would mention is maintaining two different lists of variables, one with "_variable" at the end and the other without that suffix, maybe one list could live in a constants file if makes sense, so it can be used in different places. |




What does this PR do?
Makes text editor that is used for custom workflow templates reusable
excludedToolbarItems: string[]allows to exclude the ones not needed.Also makes the 'Add variable' dropdown reusable by introducing a new prop
variables: string[](if variables is undefined or empty the 'Add variable' button is not showing)._workflowto_variableBlock type dropdown had a broken design. We now use our own Dropdown component
Fixes #6267
Loom Video 1. (shows that everything is working with new dropdown and the possibility to remove 'Add Variable' button): https://www.loom.com/share/a8c90b69264d45a1950bd14ca2637e2c
Loom Video 2 (shows how to remove items from the toolbar): https://www.loom.com/share/ed37bdfbef864bacb5024ace67337b29
Environment: Staging(main branch)
How should this be tested?