Implemented the following actions for the workflows:
- Test Workflow
- Discard Draft
- Activate Draft
- Activate Workflow Last Published Version
- Deactivate Workflow
- See Workflow Executions
- See Workflow Active Version
- See Workflow Versions History
And the following actions for the workflow versions:
- Use As Draft
- See Workflow Versions History
- See Workflow Executions
Video example:
https://github.com/user-attachments/assets/016956a6-6f2e-4de5-9605-d6e14526cbb3
A few of these actions are links to the relations of the workflow object
(link to a filtered table). To generalize this behavior, I will create
an hook named `useSeeRelationsActionSingleRecordAction` to automatically
generate links to a showPage if the relation is a Many To One or to a
filtered table if the relation is a One to Many for all the record
types.
I will also create actions which will allow to create a relation.
---------
Co-authored-by: Charles Bochet <charles@twenty.com>
- create a serverless function when creating a new workflow code step
- add code editor in workflow code step
- move workflowVersion steps management from frontend to backend
- add a custom resolver for workflow-version management
- fix optimistic rendering on frontend
- fix css
- delete serverless function when deleting workflow code step
TODO
- Don't update serverlessFunction if no code change
- Factorize what can be between crud trigger and crud step
- Publish serverless version when activating workflow
- delete serverless functions when deleting workflow or workflowVersion
- fix optimistic rendering for code updates
- Unify CRUD types
<img width="1279" alt="image"
src="https://github.com/user-attachments/assets/3d97ee9f-4b96-4abc-9d36-5c0280058be4">
The regex approach doesn't work great for the many different number
formats. Even a simple decimal failed e.g. '1.1' was considered invalid.
I've switched this over to use javascripts builtin conversion and
validation. This now supports other formats e.g. '-1.0e15' would now be
considered valid.
Closes: #8820
#7683
![labelPlural](https://github.com/user-attachments/assets/3e620d7e-dd51-4e4e-a9ba-289f2685ddf3)
![labelSingular](https://github.com/user-attachments/assets/84739ac5-29b4-48c8-8a71-3f8f2816641b)
Hello,
I’ve implemented the logic for dynamically toggling the Field on label
between singular and plural based on the relation type selected by the
user. Here's an overview of the changes:
Added a variable selectedRelationType to store the user’s selected
relation type.
Based on this variable, I determine whether to use labelPlural or
labelSingular from the selectedObjectMetadataItem.
Please review my changes and let me know if there's anything that needs
improvement .
---------
Co-authored-by: Félix Malfait <felix@twenty.com>
# Default address 🗺️ country & Phone ☎️ country
We add the ability to add a Default address country and a default Phone
country for fields in the Data model.
fix#8081
---------
Co-authored-by: Charles Bochet <charles@twenty.com>
This PR is fixing the Task/Note Target picker.
## Issue
A few weeks ago, we have simplified the recordPicker logic. During this
refacto, we stopped making sure the selected records were fetched.
However, the optimistic update of the activity supposed that current
activityTargets are present in the selection in the picker in order to
filter out the removed items.
## Fix
In case we don't find the record in the picker selection, we don't
filter it out (it means the user cannot have removed it)
## Next step
@ijreilly I think we should put it back, as the selected records do not
appear on top anymore
Fix#8401#8402
This PR is only taking care or displaying properly the record group on
the table.
Record-reorder within group has also been prepared.
Start of collapsible animation has been done, but not working for now.
<img width="1381" alt="Screenshot 2024-11-28 at 2 52 07 PM"
src="https://github.com/user-attachments/assets/514bb3e6-3475-4c47-a91c-64f7d20bbe73">
Fixes two bugs:
- The command menu contains hooks which were trying to execute queries
even when the user was logged out
- The command menu could be opened with the command + K shortcut even
when the user was logged out
Fixes issue https://github.com/twentyhq/twenty/issues/6731
**Problem:** After access token token expires, scrolling down the
`RecordTable` component will put it to an infinite loop of trying to
fetch records and printing errors on every iteration.
**Solution:** Disable fetching until component remount if a `FORBIDDEN`
error is encountered.
---------
Co-authored-by: ad-elias <elias@autodiligence.com>
- Rename all parts using the name "relation" to "record" when component
is only selecting record
- Remove the use of scope states in folder
- Rename entities to records
This PR prepares the use of the record picker in workflows
- Refactor VariableTagInput to have a reusable low-level TipTap editor
- Create three primitive form fields:
- Text
- Number
- Boolean
## Notes
- We should automatically recognize the placeholder to use for every
FormFieldInput, as it's done for FieldInputs.
## Design decisions
Our main challenge was for variables and inputs to be able to
communicate between each other. We chose an API that adds some
duplication but remains simple and doesn't rely on "hacks" to work.
Common styles are centralized.
## Demo
"Workflow" mode with variables:
![CleanShot 2024-11-26 at 10 43
25@2x](https://github.com/user-attachments/assets/cc17098a-ca27-4f97-b86a-bf88593e53db)
FormFieldInput mode, without variables:
![CleanShot 2024-11-26 at 10 44
26@2x](https://github.com/user-attachments/assets/fec07c36-5944-4a1d-a863-516fd77c8f55)
Behavior difference between fields that can contain variables and static
content, and inputs that can have either a variable value or a static
value:
![CleanShot 2024-11-26 at 10 47
13@2x](https://github.com/user-attachments/assets/1e562cd8-c362-46d0-b438-481215159da9)
Fixes#4692
This is not the most beautiful fix (I think the right fix is to add 1px
somewhere), but this issue is old and deserved to be closed quickly
without spending too much time as this will likely be refactored and is
not very important
Fix#8758
This PR is migrating the recoil component state from v1 to v2 for board.
It also now share some states and logics between board and table,
further can be done later.
Lastly this PR fix an issue since the PR #8613 that was treating
no-value as a normal record-group.
Closes#8737
- Refactored actions by creating hooks to add the possibility to
register actions programatically.
- Small fixes from #8610 review
- Fixed shortcuts display inside the command menu
- Removed `actionMenuEntriesComponentState` and introduced
`actionMenuEntriesComponentSelector`
Fixes#8591
1. Summary
We disabled hide/dnd(drag-and-drop) options for `No value` view group
intentionally in the first implementation. We want to change it to
behave like normal view groups, so enable hide/dnd for `No value` view
group as well.
2. Solution
I have removed the code that filters the `No value` group out of view
groups, so `No value` is stored in the same array as other view groups.
I have removed the `No value` flag check for `Hide` button on the
hamburger menu of the Kanban header. I had to update the code in
`packages/twenty-front/src/modules/views/utils/mapViewGroupsToRecordGroupDefinitions.ts`
because it was ignoring the visibility flag of the `No value` view group
and set it always to true. Also, it was always putting the `No value`
group last ignoring the previous position.
>**_I am not 100% confident in the changes I made in
`packages/twenty-front/src/modules/views/utils/mapViewGroupsToRecordGroupDefinitions.ts`.
I'd like to have a review from someone more familiar with that part._**
3. Recording
https://github.com/user-attachments/assets/e135e22e-6e3a-4f94-a898-aafc03bba060
Closes#8578
There was no case to handle a FieldMetadataType.Array and thus an error
was thrown every time the edit button was clicked on an Array type.
It has been added now with an explicit break statement.
Fixes: #8487#5027
1. Summary
The purpose of these changes is to elevate the dev/user experience when
the initial config load call fails for whatever reason by displaying a
fallback component.
2. Solution
I ended up making more changes than I initially planned. I had to update
the order of the contexts a bit because `GenericErrorFallback` is
dependent on `AppThemeProvider` for styling and `AppThemeProvider` is
dependent on `ObjectMetadataItemsProvider` for
[`useObjectMetadataItem`](ae2f193d68/packages/twenty-front/src/modules/object-metadata/hooks/useObjectMetadataItem.ts (L22))
hook (`AppThemeProvider` -> `useColorScheme` -> `useUpdateOneRecord` ->
`useObjectMetadataItem`). I had to create a wrapper component for
`AppThemeProvider` and stylize it in a way that it looks responsive on
both mobile and desktop devices. Finally, I had to introduce the
`isErrored` flag to differentiate the loading and error states.
There are some improvements we can make later -
- Display a loading state for the initial config load
- Implement a refetch logic for the initial config loading failure
3. Recording
https://github.com/user-attachments/assets/c2f43573-8006-4118-8e18-8576099d78fdhttps://github.com/user-attachments/assets/9c5853d3-539b-4880-aa38-c416c3e13594
---------
Co-authored-by: Félix Malfait <felix@twenty.com>