Commit Graph

2155 Commits

Author SHA1 Message Date
Gaurav Khanna
91187dcf82
Fix note linked text in timeline view (in dark mode) (#6944)
This PR Fixes https://github.com/twentyhq/twenty/issues/6942

Other improvements : 
- Fetch activities (note and task) title only when loading timeline, so
we don't always have a clickable title.
- Fixed IconButton width regression.

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-09-10 16:33:08 +02:00
Faisal-imtiyaz123
d1b4f85e8c
Adds secondary color and styling to code blocks using theme varibales ( #6029 ) (#6931)
Follow-up of #6929, this PR just changes the hard coded values to theme
values.
2024-09-10 11:53:20 +02:00
nitin
05d70b03fd
added button in nav bar for kanban view (#6829)
@Bonapara 
Addressing issue #6783.
 
I tried to achieve the exact behavior you were looking for, but I
couldn't get the dropdown to render correctly in that specific column.
I'd love some help to make sure it's working as expected! 😊
Most of the logic is shared with the `useHandleOpportunity` and
`useAddNewCard` hooks, which could be refactored to reduce code debt.
Also, please go harsh with the review because I know there's a lot of
code cleaning required.
I also agree with Charles's point in [this
comment](https://github.com/twentyhq/twenty/issues/6783#issuecomment-2323299840).
Thanks :)


https://github.com/user-attachments/assets/bccdb3f1-3946-4e22-b9a4-b7496ef134c9
2024-09-10 10:53:27 +02:00
Shreyansh Kumar
fbe9e2c0db
Fixed the overflow height of the Developers page's table (#6963)
Ref: https://github.com/twentyhq/twenty/issues/6962

As of now, if user has more than 20 API keys or webhooks, whole page has
scroll, when for the end user (UX) it'd be better if each table had it's
own scroll.
2024-09-10 10:31:16 +02:00
Faisal-imtiyaz123
b3b594efcd
Fixes multi-select search not working ( #6800 ) (#6964)
fixes #6800
2024-09-10 09:24:48 +02:00
Sandheep-OSC
93991680a7
Fix/object detail recordcell tooltip (#6908)
Fixes for https://github.com/twentyhq/twenty/issues/6596

![image](https://github.com/user-attachments/assets/69014a93-a61c-4b6a-bffa-33fdb31a8511)

---------

Co-authored-by: martmull <martmull@hotmail.fr>
2024-09-10 09:06:21 +02:00
Weiko
ace0f7b515
Bump version to 0.24.2 (#6955) 2024-09-09 18:45:45 +02:00
nitin
64f8573ac4
minor fix - removed scrollwrapper stylings for SettingsPageContainer (#6949)
@Bonapara 
fixes
https://github.com/twentyhq/twenty/pull/6700#issuecomment-2322817298
2024-09-09 17:19:14 +02:00
Nabhag Motivaras
2edab3fa2c
fix: ability to create empty kanban (#6951)
## ISSUE
- Closes #6946
2024-09-09 16:10:40 +02:00
Avinash Bhardwaj
1ff31a90f4
sort task groups reverse alphabetically by their status (#6886)
This PR Solves #6830 

## Issue Summary
The tasks are grouped by their respective statuses and displayed on the
ui. The grouping is performed by `lodash.groupBy` which doesn't maintain
explicit ordering of the keys.

## Fix
Sort the tasks groups array by their status on the basis of
reverse-alphabetical order before generating task component for each
task data.

#### Why reverse alphabetical?
It implicitly sorts the statuses as per the order `TODO` ->
`IN_PROGRESS` -> `DONE`
Caveats:
1. Changing the name of one or more status might result in a different
unwanted order.
2. `null` is unhandled, although the original code doesn't allow for
nulls as status while displaying

### Alternative Fix
Maintain an explicit ordering of the statuses and sort the tasks
accordingly.

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-09-09 15:56:52 +02:00
nitin
b01745dba7
Prevent fullWidth from being passed to Link ie <a> (#6893)
fixes #6825
2024-09-09 15:22:59 +02:00
Harshit Singh
5123655128
fix: Notes not visible in Timeline activities (#6936)
## Description

- This PR solves #6935 #6934 

- fixed the notes color in timeline activities which was not visible in
dark mode

- fixed spelling typo

## Before 
<img width="626" alt="Screenshot 2024-09-08 at 12 28 03 PM"
src="https://github.com/user-attachments/assets/7c532c6b-af3f-4af6-baa1-be134d2142a6">


<img width="1195" alt="Screenshot 2024-09-08 at 12 20 27 PM"
src="https://github.com/user-attachments/assets/2fb868b0-b66c-485f-b574-1beaf83bfb23">


## After
<img width="561" alt="Screenshot 2024-09-08 at 12 27 53 PM"
src="https://github.com/user-attachments/assets/937e11ff-77ef-4170-b1ef-dc9cbfa86166">

<img width="1194" alt="Screenshot 2024-09-08 at 12 19 17 PM"
src="https://github.com/user-attachments/assets/12455593-051d-490d-bc53-f5c5699f9c97">
2024-09-09 14:35:03 +02:00
Viraj Jaiswal
23974d2e34
Update SettingsDevelopersApiKeyDetail.tsx typo (#6937)
Corrected typo error of Expiration description in which it was
"diasbled" to "disabled".
2024-09-08 19:07:21 +02:00
Harshit Singh
1c4f418445
Fixed page inputs style layout bugs (#6899)
## Description

This PR resolves the issue #6870
- Adjusted width for all textInput - `240px`
- Added responsiveness to Address field

- [ ] To add Blur to background text component


## Before
<img width="421" alt="Screenshot 2024-09-05 at 11 57 40 AM"
src="https://github.com/user-attachments/assets/24f55e35-660e-4263-9bb0-ab363893e63b">

<img width="443" alt="Screenshot 2024-09-05 at 11 57 54 AM"
src="https://github.com/user-attachments/assets/656e93f6-ec48-41b7-b92f-06f9bfc779f2">


## After 

<img width="377" alt="Screenshot 2024-09-05 at 11 51 37 AM"
src="https://github.com/user-attachments/assets/f323930c-a8bf-4d38-9ed8-db43b86209b1">

<img width="427" alt="Screenshot 2024-09-05 at 11 52 26 AM"
src="https://github.com/user-attachments/assets/f34922fc-4687-4842-a85a-e28b603d47ae">

<img width="429" alt="Screenshot 2024-09-05 at 11 52 50 AM"
src="https://github.com/user-attachments/assets/f3016e57-1214-408f-9f5b-ee34d9caaf5d">

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-09-07 00:12:51 +02:00
Harshit Singh
697d466422
fix: Minor bugs in notes pages (#6914)
## Descripion

This PR fixed the issue #6913 

## Currently behavior

<img width="646" alt="Screenshot 2024-09-06 at 1 12 33 AM"
src="https://github.com/user-attachments/assets/60f3ec83-5976-40b1-a89e-01f28b8e809b">

<img width="244" alt="Screenshot 2024-09-06 at 1 13 31 AM"
src="https://github.com/user-attachments/assets/89b77e03-fe58-4fab-88e2-f121d6e7eb72">

## Expected behaviour

<img width="585" alt="Screenshot 2024-09-06 at 1 15 07 AM"
src="https://github.com/user-attachments/assets/206d4f65-c9d1-449a-8f05-f485116157ae">

<img width="242" alt="Screenshot 2024-09-06 at 1 15 20 AM"
src="https://github.com/user-attachments/assets/88cd6acd-bb8e-4cf3-b5cf-169cb51c9f91">

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-09-06 23:55:47 +02:00
nitin
7a8d46a51d
added timeout to avoid appending of blocks (#6725)
@FelixMalfait
fixes #6724  
Thanks :)

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-09-06 23:38:52 +02:00
Faisal-imtiyaz123
e2882056a9
Adds secondary color and styles to code snippets in block note editor ( #6029 ) (#6928)
fixes https://github.com/twentyhq/twenty/issues/6929

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-09-06 23:05:46 +02:00
nitin
79aba75649
Added new view to select types for objects (#6700)
Issue #6496 
Hi team,

Is this the right approach for handling type selection with states and
conditional rendering, or should these be managed on separate pages
altogether? Please let me know Ill make changes accordingly :)

I’m also working on styling the buttons according to the Figma design
and will be moving constants like categoryDescriptions and categories to
the constants folder.

Thanks for your guidance!



https://github.com/user-attachments/assets/452bea9f-4d0a-4472-9941-421b54cda47f

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-09-06 22:47:40 +02:00
Faisal-imtiyaz123
99f8f8fedb
Adds KeyBoard Navigation to ObjectFilterDropDownFilterSelect ( #4365 ) (#6613)
fixes #4365

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-09-06 20:13:51 +02:00
Nabhag Motivaras
c0d0f8d78d
fix: settings search field bottom padding (#6920)
## ISSUE 
- Closes #6919
2024-09-06 15:13:35 +02:00
nitin
7205927440
multiselect for onetomany relations (#6892)
Issue #4345 
used `useUpdateRelationFromManyFieldInput` hook from `FieldInput` to
`updateRelation`.
Creating a seperate hook didnt made sense when it basically does the
same thing.
However renaming the hook to something generic would make sense so that
its not tied to `FieldInput` according to naming convention

followup issue to tackle - #6890 


https://github.com/user-attachments/assets/452372ea-2699-45fd-9edf-ded36abdbca2

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-09-06 14:56:01 +02:00
martmull
85f2e58f0c
Fix lint (#6922) 2024-09-06 14:39:33 +02:00
Faisal-imtiyaz123
d36486b65e
Enables creating an opportunityCard instantly if company field is disabled (#6316) (#6911)
fixes #6316

---------

Co-authored-by: martmull <martmull@hotmail.fr>
2024-09-06 11:53:53 +02:00
nitin
6c15033511
added scroll wrapper for ShowPageActivityContainer (#6903)
fixes #6902
2024-09-06 10:40:55 +02:00
Lucas Bordeau
b9ee313923
Fixed open table cell triggering (#6910)
Open table cell was triggered by a click on a field input.

This is a temporary solution.

I fixed it for DoubleTextInput but it might be problematic for other
field types as well, we should implement a kind of bubbling shield to
make sure that no click event can bubble up to trigger things like open
table cell in the above components that shouldn't listen.

See https://github.com/twentyhq/twenty/issues/6909
2024-09-06 10:23:27 +02:00
Harshit Singh
338298e14b
fix: Minor UI fixes in Settings page (#6915)
## Description

This PR fixes the issue #6887.

## Current Behaviour

-
https://github.com/user-attachments/assets/6e53f7f5-7fed-4482-9c67-fb33969429ab

- <img width="539" alt="Screenshot 2024-09-04 at 10 25 14 AM"
src="https://github.com/user-attachments/assets/a1a1f8ac-8069-4b07-9ca1-d0c77596ff3b">

## Expected behavior

-
https://github.com/user-attachments/assets/63e92a6a-6be5-4d0a-b42f-d4310492b8b4

- <img width="226" alt="Screenshot 2024-09-04 at 10 36 49 AM"
src="https://github.com/user-attachments/assets/94e360c2-26ed-41f3-8943-dfee2b6c2a48">
2024-09-06 10:20:22 +02:00
Naineel Soyantar
dd60d6bf09
fix: Api text typo in ApiKeyInput.tsx (#6916) (#6918)
## Issue

Closes (#6916)

There was an `Api` typo with API under Developer section while copying
the API Key to clipboard in the status popup which is now corrected to
`API`.
2024-09-06 10:18:06 +02:00
Baptiste Devessier
cddc92c00f
Display workflow visualizer on show page (#6894)
- Removed the route I previously used to visualize workflows
- Created another tab in the `<ShowPageRightContainer />` component in
which we display the visualizer

Questions:

- Should I use a feature flag to hide the feature?

Closes #6858
2024-09-05 16:41:36 +02:00
Thomas Trompette
78d8df6a68
Add workspace favorites behind feature flag (#6904)
- make member nullable on favorites
- add potential relation with view entity
- add a new type of favorite list in front : workspace favorite
- build a new component for retrieving workspace favorite to display +
refacto the existing one

Bonus:
- removing activities seed since this is deprecated
2024-09-05 16:41:06 +02:00
Félix Malfait
bc8c961e30
Fix restore event sent to webhooks (#6905)
We were sending the wrong event when restoring a record (delete instead
of create)
2024-09-05 14:21:14 +02:00
Lucas Bordeau
caff652df3
Fixed view reset on view change (#6897)
Fixes #6833 

The view states for unsaved changes were not reseted on view change.

The fix was to just add a call to the existing resetCurrentView when the
viewId changes in the related effect.
2024-09-05 10:23:42 +02:00
Baptiste Devessier
a2b1062db6
Update workflow nodes configuration (#6861)
- Improve the design of the right drawer
- Allow to update the trigger of the workflow: the object and the event
listened to
- Allow to update the selected serverless function that a code action
should execute
- Change how we determine which workflow version to display in the
visualizer. We fetch the selected workflow's data, including whether it
has a draft or a published version. If the workflow has a draft version,
it gets displayed; otherwise, we display the last published version.
- I used the type `WorkflowWithCurrentVersion` to forward the currently
edited workflow with its _current_ version embedded across the app.
- I created single-responsibility hooks like
`useFindWorkflowWithCurrentVersion`, `useFindShowPageWorkflow`,
`useUpdateWorkflowVersionTrigger` or `useUpdateWorkflowVersionStep`.
- I updated the types for workflow related objects, like `Workflow` and
`WorkflowVersion`. See
`packages/twenty-front/src/modules/workflow/types/Workflow.ts`.
- This introduced the possibility to have `null` values for triggers and
steps. I made the according changes in the codebase and in the tests.
- I created a utility function to extract both parts of object-event
format (`company.created`):
`packages/twenty-front/src/modules/workflow/utils/splitWorkflowTriggerEventName.ts`
2024-09-04 17:39:28 +02:00
martmull
c55dfbde6e
Fix unauthorized error handling (#6835)
from @BOHEUS comments in #6640
- fix bad 500 error when authentication invalid 
- remove "id", "createdAt", "updatedAt", etc from creation and update
paths schema
- improve error message 
- remove "id" from test body
- improve secondaryLink schema description
- improve depth parameter description
- remove required from response body
- improve examples
- improve error message formatting
- fix filter by position
- answered to negative float position @BOHEUS comment

Also:
- fix secondary field openapi field description
- remove schema display in playground

Screenshots

![image](https://github.com/user-attachments/assets/a5d52afd-ab10-49f3-8806-ee41b04bc775)

![image](https://github.com/user-attachments/assets/33f985bb-ff75-42f6-a0bb-741bd32a1d08)
2024-09-04 17:25:59 +02:00
BOHEUS
c1eae56bb6
Check if user wants to run make postgres-on-linux (#6819)
Fix #6319 

Now script checks if user wants to run the script, the default is no, so
user has explicitly type `y` or `Y` in order to run it.
2024-09-04 16:58:54 +02:00
PB Borel
0c2657eea6
fix(6423): add username and password for redis connection (#6745)
Co-authored-by: pbb <pierre-bertrand.borel_ext@michelin.com>
2024-09-04 16:56:37 +02:00
Lý Thanh Bách
7a282b4363
Fix bug bypassing verification in confirmation modal when pressing Enter (#6889)
# Description
Fix bug bypassing verification in the confirmation modal when pressing
Enter

# Demo
Tested for webhook case (similar to other cases):
1. Press Enter when invalid verification => not delete webhook
2. Press Enter when valid verification => delete webhook


https://github.com/user-attachments/assets/81aa0aaa-7361-4584-b7ae-b29525f33664

# Ref
Fixes #6663
2024-09-04 15:15:29 +02:00
Harshit Singh
dbcbe754dd
fix: Updated Menu item font size (#6884)
## Description

This PR solves the issue #6878. Updated the font size from 12 px to 13
px.

## Before 

<img width="156" alt="Screenshot 2024-09-03 at 11 46 58 PM"
src="https://github.com/user-attachments/assets/d4077ecc-0a14-4802-a4d7-9b03c4e419bd">

## After

<img width="154" alt="Screenshot 2024-09-03 at 11 47 33 PM"
src="https://github.com/user-attachments/assets/fd6ff0e3-0212-44e3-ba01-864ea9f4c5c6">
2024-09-04 14:22:42 +02:00
Thomas Trompette
44ff55f550
Enable payload without status update (#6881)
As title
2024-09-03 17:24:29 +02:00
Thomas Trompette
50a65ef46b
Add workflow query hooks (#6876)
Workflow version :
- prevent status to be update manually
- prevent creation / deletion in another status than draft
- prevent creation if a draft already exists

Workflow:
- prevent statuses to set manually

WorkflowRun:
- prevent all manual operations
2024-09-03 17:07:22 +02:00
Weiko
612428eeb3
update refresh token expires in (#6879)
Fixes https://github.com/twentyhq/twenty/issues/6598

Updating the refresh token default value to a much more common
threshold, this can still be overridden with env variables when needed.

Example of the refresh token mechanism from the fronted side
<img width="679" alt="Screenshot 2024-09-03 at 16 05 12"
src="https://github.com/user-attachments/assets/7e618ab1-12b9-48cb-a93e-e27974ad2425">
<img width="673" alt="Screenshot 2024-09-03 at 16 05 22"
src="https://github.com/user-attachments/assets/f4d08315-1f5b-4f4a-a86a-a9cd9cdf9b01">
2024-09-03 17:00:19 +02:00
gitstart-app[bot]
8f65326b47
Field name is oddly displayed when long (#6755)
### Description

- we added a new styled component to handle the label styles
- we added the title prop, and this will be applied for all fields,
track the styles and only adding the title if the label is hidden would
add unnecessary complexity to this issue, let us know if It's fine
- On our internal QA review, we noticed this extra error in the name:\
when we have spaces between the characters on names the name is
displayed in a weird way


![](https://assets-service.gitstart.com/28455/b3933bec-f5ec-48b9-a627-744507bc9fad.png)

when we don't have spaces we use the space on the right to fit the full
name\
like this:


![](https://assets-service.gitstart.com/28455/77aec9d1-7875-4164-b2ce-97ccee7fb25e.png)Do
you want us to fix this problem too?

when testing the new changes since we changed one component that is used
on the main pages we created objects with a big name, to test the header
on the table view, and we noticed that the object name has exactly the
same issue as the field name on the settings page.


!\[image\](<https://github.com/user-attachments/assets/cfa3a0a3-da98-4b09-9650-178ace05bcbf>)

we added a fix for new field creation if the object name is long


![](https://assets-service.gitstart.com/28455/99faef48-99b4-480e-ae6d-71aa40030434.png)###
Refs

#6738

### Demo


<https://www.loom.com/share/3572fb0c4e994b0aaac52985e76ae4fd?sid=9ef177e2-827b-45f2-8083-60771eef6203>

Fixes #6738

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Marie Stoppa <marie.stoppa@essec.edu>
2024-09-03 15:07:45 +02:00
ad-elias
bc2227ddbb
Ability to filter on DATE fields (#6299) (#6824)
This was surprisingly quick, it was already built, just not enabled.
Let's double check it together still on Monday @FelixMalfait!
2024-09-03 14:14:38 +02:00
Nabhag Motivaras
6e7cb27af2
fix: securing tasks and notes all view (#6869)
ISSUE 

- Closes #6863
2024-09-03 09:16:42 +02:00
nitin
f15c5e5b58
Updated MultiItemFieldInput to display current value properly (#6857) 2024-09-02 17:50:54 +02:00
Pacifique LINJANJA
464fd5c485
chore: improve the softdelete style (#6846)
## This PR

- Fix #6836 

<img width="1296" alt="Screenshot 2024-09-02 at 17 54 31"
src="https://github.com/user-attachments/assets/cc1411b6-87f3-425f-b7e7-a1ba20c2993a">
2024-09-02 17:24:30 +02:00
Thomas Trompette
329e7364a4
Prevent workflow version from bad update (#6848)
Closes https://github.com/twentyhq/twenty/issues/6840

- Add query-hooks folder in common. Will be followed by hooks for
workflows and runs
- When updating a version, ensure the status is draft and that the
status is not manually updated
2024-09-02 16:20:20 +02:00
martmull
7e03419c16
Serverless function improvements (#6769)
- add layer for lambda execution
- add layer for local execution
- add package resolve for the monaco editor
- add route to get installed package for serverless functions
- add layer versioning
2024-09-02 15:25:20 +02:00
Harshit Singh
f8890689ee
fix: Fixed API typo and webhook checkerror (#6779)
## Issue
1.There was an Api typo with API under Developers section #6778
2. Webhook lacked an check method for the `TextInput` #6774

## After- 

<img width="649" alt="Screenshot 2024-08-29 at 2 13 21 AM"
src="https://github.com/user-attachments/assets/bc9595f8-533f-430e-bc18-56373983eec8">



https://github.com/user-attachments/assets/8e2b06bc-308a-48ad-8ecb-9d0a130877bc

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-08-31 19:17:14 +02:00
Marie
96d659cf56 Make custom objects soft deletable by default (#6768)
Fixes #6766
2024-08-31 18:02:41 +02:00
Weiko
7df5f91dc5
Add set custom object is soft deletable command (#6788)
## Context
Custom object were not automatically created as softDeletable, this has
been fixed in a recent PR.
This PR adds a command to backfill existing custom objects.

We also introduce a baseCommandRunner and ActiveWorkspacesCommandRunner
to put some boilerplate and simplify future commands.

## Test
```bash
yarn command:prod upgrade-0-24:set-custom-object-is-soft-deletable
[Nest] 75852  - 08/29/2024, 5:16:41 PM     LOG [SetCustomObjectIsSoftDeletableCommand] Running command on 2 workspaces
query: UPDATE "metadata"."objectMetadata" SET "isSoftDeletable" = $1, "updatedAt" = CURRENT_TIMESTAMP WHERE ("workspaceId" IN ($2, $3) AND "isCustom" = $4 AND "isSoftDeletable" = $5) -- PARAMETERS: [true,"3b8e6458-5fc1-4e63-8563-008ccddaa6db","20202020-1c25-4d02-bf25-6aeccf7ea419",true,false]
[Nest] 75852  - 08/29/2024, 5:16:41 PM     LOG [SetCustomObjectIsSoftDeletableCommand] Updated 1 entities
[Nest] 75852  - 08/29/2024, 5:16:41 PM     LOG [SetCustomObjectIsSoftDeletableCommand] Command completed!
```

```bash
yarn command:prod upgrade-0-24:set-custom-object-is-soft-deletable -d
[Nest] 75424  - 08/29/2024, 5:16:14 PM     LOG [SetCustomObjectIsSoftDeletableCommand] Running command on 2 workspaces
[Nest] 75424  - 08/29/2024, 5:16:14 PM     LOG [SetCustomObjectIsSoftDeletableCommand] Dry run mode: No changes will be applied
query: SELECT "ObjectMetadataEntity"."id" AS "ObjectMetadataEntity_id" FROM "metadata"."objectMetadata" "ObjectMetadataEntity" WHERE (("ObjectMetadataEntity"."workspaceId" IN ($1, $2)) AND ("ObjectMetadataEntity"."isCustom" = $3) AND ("ObjectMetadataEntity"."isSoftDeletable" = $4)) -- PARAMETERS: ["3b8e6458-5fc1-4e63-8563-008ccddaa6db","20202020-1c25-4d02-bf25-6aeccf7ea419",true,false]
[Nest] 75424  - 08/29/2024, 5:16:14 PM     LOG [SetCustomObjectIsSoftDeletableCommand] Dry run: 1 entities would be updated
[Nest] 75424  - 08/29/2024, 5:16:14 PM     LOG [SetCustomObjectIsSoftDeletableCommand] Command completed!
```

```bash
yarn command:prod upgrade-0-24:set-custom-object-is-soft-deletable -w 20202020-1c25-4d02-bf25-6aeccf7ea419 -w 20202020-1c25-4d02-bf25-6aeccf7ea419
query: UPDATE "metadata"."objectMetadata" SET "isSoftDeletable" = $1, "updatedAt" = CURRENT_TIMESTAMP WHERE ("workspaceId" IN ($2, $3) AND "isCustom" = $4) -- PARAMETERS: [true,"20202020-1c25-4d02-bf25-6aeccf7ea419","20202020-1c25-4d02-bf25-6aeccf7ea419",true]
[Nest] 70588  - 08/29/2024, 5:11:31 PM     LOG [SetCustomObjectIsSoftDeletableCommand] Updated 2 entities
[Nest] 70588  - 08/29/2024, 5:11:31 PM     LOG [SetCustomObjectIsSoftDeletableCommand] Command completed!
```

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-08-31 17:49:12 +02:00
Harshit Singh
c5572f1b1e
fix: Deactivate & Activate icons should be swapped UI improvements (#6796)
## Fix

This fixes the minor UI issue #6795 in which it addressed the following
two problems-

1. Fixed the Icon switch
2. Updated the Delete Modal

## Screenshots

<img width="314" alt="Screenshot 2024-08-30 at 1 38 31 AM"
src="https://github.com/user-attachments/assets/2a3e2363-6c0e-493e-825a-5a84121ccc3d">

<img width="168" alt="Screenshot 2024-08-30 at 1 39 13 AM"
src="https://github.com/user-attachments/assets/51b48b85-070f-4656-a42d-31db0baebca3">

<img width="182" alt="Screenshot 2024-08-30 at 1 39 23 AM"
src="https://github.com/user-attachments/assets/6ac958eb-34eb-44b8-a588-30813a567f3e">
2024-08-31 16:40:38 +02:00
Raphaël Bosi
cd66ea74a2
6657 Refactor and fix blocklist (#6803)
Closes #6657
- Fix listeners
- Refactor jobs to take array of events
- Fix calendar events and messages deletion

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-08-31 16:38:47 +02:00
Harshit Singh
d9650fd5cf
fix: Updated Button states for pages and minor UI fix (#6812)
## Description

#6811 

- Deleted button lacked `accent danger` on options menu
- Customize fields `onhover` lacked width to cover entire div tag
- Deactivate button lacked variant

## After

<img width="305" alt="Screenshot 2024-08-31 at 1 43 29 AM"
src="https://github.com/user-attachments/assets/82852227-e7d2-4327-a8cc-8f9f0e84f488">

<img width="229" alt="Screenshot 2024-08-31 at 1 09 31 AM"
src="https://github.com/user-attachments/assets/4783dd5a-a8ab-41b5-83d5-95425b6bebc4">
<img width="163" alt="Screenshot 2024-08-31 at 1 07 49 AM"
src="https://github.com/user-attachments/assets/33ec9928-6463-4797-bfc4-b40a927ec8ec">

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-08-31 14:59:11 +02:00
Nabhag Motivaras
ea7b9e90c9
fix: EmailThreads and Calendar making one extra graphql requests even total records are fetched (#6814)
## ISSUE (BUG)
- Closes #5282

## Description
- [x] Email Threads Tab was making two graphql requests
**[GetTimelineThreadsFromCompanyId]** when navigating after a first
render of record page, once only, later it was making only one.
- [x] Similarly Calendar Tab
**[GetTimelineCalendarEventsFromCompanyId]**

### Before


https://github.com/user-attachments/assets/c234b7b4-fe7d-4655-92d6-0a6817fda6b5


### After 


https://github.com/user-attachments/assets/80af33c7-b801-4377-a59a-47c43e0fecdd

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-08-31 14:22:33 +02:00
Charles Bochet
e903ce398e Increase storybook pages code coverage 2024-08-31 12:31:10 +02:00
Lucas Bordeau
56f8091a42 Fix CI errored tasks for front (#6806)
In this PR:
- revert de-optimization of icons bundle for storybook. This was forcing
the browser to load ~3k files while running stories
- adding lazy loading on Settings route to improve developer experience
(some files will be loaded later)
- fix FE tests: unit, modules stories, pages stories

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-08-31 01:40:06 +02:00
Thomas Trompette
a3ea0acd1a
Set statuses on workflows (#6792)
Add listener to keep status on workflows up to date:
- version draft => statuses should contain draft
- version active => statuses should contain active
- version deactivated => if no version active, statuses should contain
deactivated

Renaming also the endpoints because it was not reflecting the full
behaviour.

Finally, adding a new status Archived for versions. Will be used when a
version is deactivated, but is not the last published version anymore.
It means this version cannot be re-activated.
2024-08-30 18:06:04 +02:00
Baptiste Devessier
f7c99ddc7a
Create new steps in workflow editor (#6764)
This PR adds the possibility of creating new steps. For now, only
actions are available. The steps are stored on the server, and the
visualizer is reloaded to include them.

Selecting a step opens the right drawer and shows its details. For now,
it's only the id of the step, but in the future, it will be the
parameters of the step.

In the future we'll want to let users add steps at any point in the
diagram. As a consequence, it's crucial to be able to walk in the tree
that make the steps to find the correct place where to put the new step.
I wrote a function that returns where the new step should be inserted.
This function will become recursive once we get branching implemented.

Things to mention:

- Reactflow needs every node and edge to have a unique identifier. In
this PR, I chose to use steps' id as nodes' id. That way, it's easy to
move from a node to a step, which helps make operations on a step
without resolving the step's id from the node's id.
2024-08-30 15:51:36 +02:00
Lucas Bordeau
26eba76fb5
Created a breadcrumb for left nav menu sub items (#6762)
Closes https://github.com/twentyhq/twenty/issues/6484

<img width="270" alt="image"
src="https://github.com/user-attachments/assets/3cfd7a5a-5239-4998-87f7-a9b45e3b5229">
2024-08-30 15:10:18 +02:00
Charles Bochet
09ac8e3274 Add instructions to migrate to 0.24 version 2024-08-30 01:13:13 +02:00
Charles Bochet
407030576b Update wording on soft deletes 2024-08-29 18:26:27 +02:00
Thomas Trompette
8982a5833c
Bump version to 0.24 (#6789)
As title
2024-08-29 18:22:48 +02:00
Thomas des Francs
0d21ccdefd
0.24 changelog (#6787) 2024-08-29 18:22:38 +02:00
Lucas Bordeau
b05361e650
Fixed record table fetch more scroll bug (#6790)
Fetch more on the record table was causing a strange bug where it was
auto scrolling to the bottom of the newly loaded chunk of rows.

This was confusing because we lost our previous position in the record
table.

With this fix the table doesn't scroll when more rows are loaded.

The fetch more row has been moved in the same tbody as the rest of the
rows.

We now only hide it when there is no more record to fetch.

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-08-29 18:22:17 +02:00
Antoine Moreaux
cd06ae20e8
chore(*): remove unused code (#6781)
The code removed in the PR was flagged as unused by the JetBrains
inspector.

I did a QA on the dev environment but other checks are highly
recommended.

There is one commit by scope to make the review easier.

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-08-29 18:16:50 +02:00
nitin
ebfdc6cfd2
Added ability to search objects and fields (#6775)
Closes #6770 



https://github.com/user-attachments/assets/e3134389-30d2-48c8-bbca-34209d5ae66d
2024-08-29 14:15:01 +02:00
Rishi Kant
9fafb2cca0
fix/6759: reduce icon size in note grip menu to 16px and adjust conta… (#6780)
### Summary

This pull request addresses issue #6759 by adjusting the icon size and
container padding in the note grip menu. The 6-dot icon's size has been
reduced from 20px to 16px, while the container size has been kept at
20px to maintain the proper alignment and spacing.

### Changes Made
- **Icon Size**: Reduced the SVG icon size to 16x16px.
- **Container Size**: Ensured the container remains 20x20px to
accommodate the icon and maintain visual consistency.

### Screenshots
<img width="1440" alt="Screenshot 2024-08-29 at 3 26 41 AM"
src="https://github.com/user-attachments/assets/d8618636-165a-440d-a41e-947b2aa00bdb">


### Related Issue
- [Issue #6759]

### Testing
- Verified that the icon and container sizes are correctly displayed in
the note grip menu.
- Ensured no other UI elements were affected by these changes.

Please review the changes and let me know if any additional
modifications are required. Thank you!

Co-authored-by: Rishi Kant <khairrishi@Rishis-MacBook-Air.local>
2024-08-29 11:56:41 +02:00
Nabhag Motivaras
9a3f29b9a0
fix: relation and record chip height (#6758)
# ISSUE 
- Closes #6756 

After Changes: 


https://github.com/user-attachments/assets/1885be11-b50a-4b05-afae-d2f02a403ad6



https://github.com/user-attachments/assets/edc6a913-95a6-4c75-8ec2-83e2c27fddb0
2024-08-29 11:42:42 +02:00
gitstart-app[bot]
7a9a43b85c
Add composite Emails field and forbid creation of Email field type (#6689)
### Description

1. 
   - We are introducing new field type(Emails)


   - We are Forbiding creation of Email field


   - We Added support for filtering and sorting on Emails field


- We are using the same display mode as used on the Links field type
(chips), check the Domain field of the Company object


   - We are also using the same logic of the link when editing the field

   \
   How To Test\
   Follow the below steps for testing locally:\
   1. Checkout to TWENTY-6261\
2. Reset database using "npx nx database:reset twenty-server" command\
   3. Run both the backend and frontend app\
4. Go to Settings/Data model and choose one of the standard objects like
people\
   5. Click on Add Field button and choose Emails as the field type

   \
   ### Refs

   #6261\
   \
   ### Demo

    \

<https://www.loom.com/share/22979acac8134ed390fef93cc56fe07c?sid=adafba94-840d-4f01-872c-dc9ec256d987>

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
2024-08-29 11:42:24 +02:00
Weiko
c87ccfa3c7
refactor graphql query runner connection mapper (#6771) 2024-08-28 19:02:45 +02:00
gitstart-app[bot]
7c894fe870
Improve Data Importer Select Matching - Post Merge Updates (#6750)
This PR was created by [GitStart](https://gitstart.com/) to address the
requirements from this ticket:
[TWNTY-6135-1](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-6135-1).

 --- 
### Description
This [PR](https://github.com/twentyhq/twenty/pull/6338) was merged, but
the reviewr asked for some changes in another PR
https://github.com/twentyhq/twenty/pull/6338#pullrequestreview-2255006727


### Refs
https://github.com/twentyhq/twenty/pull/6338

### Demo
<https://jam.dev/c/80336c7a-4536-4a58-b531-981bac81cb26>

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
2024-08-28 17:33:39 +02:00
nitin
0531eb5015
Removed drag grip and accent is now tertiary in hidden fields (#6650)
Closes #6115

This change successfully addresses the issue as described. However, it
also causes the primary non-draggable field, `Name`, to render without a
draggable handle and with a secondary accent. Is this an acceptable
outcome?



https://github.com/user-attachments/assets/4bc15e00-6c73-41d4-8342-4e36487d0981

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-08-28 17:27:14 +02:00
Nabhag Motivaras
747a1549e9
fix: defaultHomePagePath to be last visited page or alphatically first active object with the name (#6629)
### ISSUE 

- Closes #6612
- Closes #6125
- Closes #5949
- Closes #6652 

### Description 

- [x] need to check changes in jest test.
- [x] fallback to alphabetically firstActiveObject with the name if no
last visited exist


https://github.com/user-attachments/assets/dd11480b-c47f-4393-9857-8a55467061e3

- [x] fallback to last visited page with the last visited view by
default if no views would have toggled with subNav or viewChangeDropdown
it will fallback to INDEX or if no INDEX view then zero position view,
works with both subNavViewBar and viewChangeDropdown.



https://github.com/user-attachments/assets/33e97e55-2aa2-4c45-a3ab-fc8e43f4964c



https://github.com/user-attachments/assets/d1db76a2-da59-4cd2-81bf-d6119408fbbf

- [x] lastVisited view across the objects have been persisted so now
navigating back from x object to y or z to x will open always last
visited view and defaults to index or zero position view.



https://github.com/user-attachments/assets/70a01a11-a7ef-4031-926e-02923551466c

- [x] lastVisited Page with view has been persisted across the
workspace, scope is per workspace so jumping between workspace will also
work to have lastvisited object of particular workspace.



https://github.com/user-attachments/assets/25107339-8ec1-4421-9f6e-1da43b8f4816

- [x] when lastVisitedObject has been deactivated and going back from
settings should have a fallback Object that is alphabetically First
activeObject.



https://github.com/user-attachments/assets/6b24a933-b139-49ac-82b2-eac5e4848516


- [x] Creation of new View of **anyType** should also get persist and
that should get lastVisitedObject with View in case the user leaves from
there right away.



https://github.com/user-attachments/assets/80ff7114-051d-4e9b-ab58-0e1e3a7d328c

- [x] Similarly deleted view also works. 


https://github.com/user-attachments/assets/cb0b8043-fba4-4a66-941d-b3fa0a57eb22


- [x] fixed active subnav background when opening object directly with
root path **/** , it wasn't showing active subNav background.

Before: 


https://github.com/user-attachments/assets/db341c4a-f1f9-43c4-9838-37d1a1f5ab8e

Fixed: 


https://github.com/user-attachments/assets/0f0fd492-bc5d-4efe-b695-bee4e3f41d4e

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-08-28 17:15:54 +02:00
nitin
5deb0abe4d
added "reply in gmail" button (#6754)
Issue https://github.com/twentyhq/twenty/issues/4217
2024-08-28 16:47:55 +02:00
Raphaël Bosi
e7bbc7ddfc
Fix participant listeners (#6767)
Fixes a bug where all the messagesParticipants and the
calendarEventParticipants were linked to a contact after its
restoration.
2024-08-28 16:26:08 +02:00
nitin
e2eaffcf53
Added "Add record" button in kanban view column headers dropdown (#6649)
Closes #4629 
Refactored `RecordBoardColumnNewOpportunityButton` and
`RecordBoardColumnNewButton` to use the same logic in dropdown.

I kept those hooks inside `record-board-column` where these buttons are.
Let me know if it should be placed somewhere else.

Also Added navigation state preservation when clicked on `edit from
settings`

Thanks :)

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-08-28 16:16:37 +02:00
Thomas Trompette
ff1adb06b2
Add workflow statuses (#6765)
Following figma updates
https://www.figma.com/design/PNBfTgOVraw557OXChYagk/Explo?node-id=21872-7929&t=DOUzd6rzwr6lprcs-0

- No activity targets for workflow entities for now
- Adding a direct relation between workflow run et workflow
- Adding a status on the version (draft, active, deactivated)
- Adding a list of statuses on workflow 
- publishedVersionId => lastPublishedVersionId

Also adding:
- the endpoint to deactivate a version
2024-08-28 14:53:25 +02:00
Raphaël Bosi
da23ca3c23
Fix message direction seeds (#6760)
Direction is now on mcma and no longer on message
2024-08-28 13:03:00 +02:00
Charles Bochet
374931bb19 Fix post merge conflicts on messaging services 2024-08-27 19:39:29 +02:00
Charles Bochet
8dd772aee2 Fix post merge conflicts on messaging services 2024-08-27 19:30:25 +02:00
Raphaël Bosi
e6a55f270b
5617 Create CalendarOngoingStaleCron Job (#6748)
Closes #5617

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-08-27 19:13:15 +02:00
Raphaël Bosi
e771793626
6655 remove field direction in message and add it in mcma (#6743)
Closes #6655 
- Remove direction from message
- Add direction do mcma
- Create migration command
- Create upgrade 0.24
2024-08-27 19:11:04 +02:00
Charles Bochet
5ce1e6b07d
Improve record table scroll look (#6753)
We had a regression on the record table as our inView hook was not able
to find the right div to compute its margin. This is because we are
identify this div by a hacky css selector as we don't have a direct
control on it (it's provided by our scrolling library)
2024-08-27 19:10:11 +02:00
Thomas Trompette
9f69383aa2
Add function execution throttler (#6742)
Add throttler service to limit the number of function execution
2024-08-27 18:56:47 +02:00
Raphaël Bosi
81fa3f0c41
6256 refactor messaging module to remove all provider specific code and put it inside the drivers folders (#6721)
Closes #6256 
Closes #6257 
+ Create custom exceptions

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-08-27 18:14:45 +02:00
Weiko
eb49cb2d08
Fix twenty-front build (#6752) 2024-08-27 17:35:50 +02:00
Weiko
f6fd92adcb
[POC] add graphql query runner (#6747)
## Context
The goal is to replace pg_graphql with our own ORM wrapper (TwentyORM).
This PR tries to add some parsing logic to convert graphql requests to
send to the ORM to replace pg_graphql implementation.

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-08-27 17:06:39 +02:00
Charles Bochet
ef4f2e43b0
Fix Website build CD (#6751)
Website CD has been broken by the recent addition of typeorm patch in
root package.json

Our current vision is to add npm package to each twenty-package
package.json directly
2024-08-27 14:13:05 +02:00
Charles Bochet
8f9b942410 Increase front build max memory usage for sourcemaps build 2024-08-27 13:30:39 +02:00
nitin
33e455655f
Added sync status on the FE (#6730)
Issue #6685 

How do we make sure we get the latest syncStatus on the frontend?
For now we dont get it unless refreshed.
useInterval() on fetching account details?
2024-08-27 11:11:24 +02:00
gitstart-app[bot]
d61d5857f8
View becomes blank after deleting select (#6703)
This PR was created by [GitStart](https://gitstart.com/) to address the
requirements from this ticket:
[TWNTY-6027](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-6027).
This ticket was imported from:
[TWNTY-6027](https://github.com/twentyhq/twenty/issues/6027)

 --- 

### Description

- Delete corresponding view simultaneously once select field is
deactivated instead of deleted because the bug happens on the
deactivation (one step before deleting), confirmation:
<https://discord.com/channels/1130383047699738754/1268662542172028971/1270367244509249651>
- Is still possible to create Kanban views with deactivated Select
fields, but this is not related to the PR.
- The changes on the frontend are for refreshing the data after the view
deletion

### Refs

#6027

### Demo


<https://www.loom.com/share/4f705344e3054cd5b3d5eadd398d2c9c?sid=8db3d8b9-4dce-4e31-8359-0e31cbc0e2e7>

Fixes #6027

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-08-27 11:10:32 +02:00
BOHEUS
b1fbf4b683
E2E tests (#6717)
Continuation of #6644 

Now chromium browser is used in workspaces tests instead of firefox and
screenshots after each test are properly saved in one folder when run
from IDE and from terminal using `yarn test:e2e` command
2024-08-27 11:07:10 +02:00
Marie
d622803ac2
[Fix] Move save button to top on field edit (#6739)
Before
<img width="802" alt="image"
src="https://github.com/user-attachments/assets/2a9d9501-6bd4-4dc2-b8d7-98a29816caab">

After
<img width="871" alt="Capture d’écran 2024-08-26 à 12 17 29"
src="https://github.com/user-attachments/assets/b6cb688c-fdcd-4b10-8d91-197245f7dd56">
2024-08-26 19:26:49 +02:00
Charles Bochet
c4f0292b2d Increase front build max memory usage for sourcemaps build 2024-08-26 17:22:35 +02:00
Charles Bochet
1d6a1f64c9
Fix twenty-front performances (#6744)
I have investigated the performance of our frontend vite build:
`npx nx run twenty:start` of `npx nx run twenty:build`

RAM usage:
- 160Mb: vite serve
- background typescript checker: 2.5GB
- background eslint checker: 3.5GB

I'm introducing two environment variables in FE .env to disable these
checkers on lower configuration (and to disable them from CD build):
```
# VITE_DISABLE_TYPESCRIPT_CHECKER=true
# VITE_DISABLE_ESLINT_CHECKER=true
```
2024-08-26 16:35:09 +02:00
gitstart-app[bot]
55685d3c5b
Fix currency field edition form (#6723)
This PR was created by [GitStart](https://gitstart.com/) to address the
requirements from this ticket:
[TWNTY-6692](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-6692).
This ticket was imported from:
[TWNTY-6692](https://github.com/twentyhq/twenty/issues/6692)

 --- 


### Description

The problem is not related to the API, what was happening was a failure
in the form validation, because in the changed file, the `currencyCode`
value, which should be a string with single quotes around it, was
receiving single quotes again, unnecessarily, and this affected field
validation in
`packages/twenty-front/src/modules/object-record/record-field/validation-schemas/currencyFieldDefaultValueSchema.ts`

please, make this change below before testing the PR(to fix a bug, the
slice is not updated yet):\

<aa4ae53fb4>

### Demo


<https://www.loom.com/share/2ce130f2e2fe46868e9b1e9119f65cde?sid=dbcb2da2-3641-423c-bdfc-01b0fc52162a>

### Refs

#6692

Fixes #6692

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Marie Stoppa <marie.stoppa@essec.edu>
2024-08-26 15:02:12 +02:00
Lucas Bordeau
6467da5cab
Fix table re-renders on update field (#6722)
The update of all fields was caused by `useContextSelector` not being
properly implemented.

As it is a memoization library the `useRecordFieldValue` hook wasn't
giving to the library the required things to allow memoization.

I just added recordId + fieldName to the memoization function so that
`useContextSelector` doesn't recompute itself whenever any record
changes.
2024-08-23 19:31:27 +02:00
Baptiste Devessier
e49acae851
Visualize Workflows (#6697)
## Features

- Fetch a workflow and display it in a tree with the React Flow library
- The nodes are positioned by an algorithm
- The feature is put behind a feature flag. The `/workflow/:id` route is
disabled if the flag is off.
- I started implementing a right drawer. That's a big WIP and it will be
finished in another PR.

## How to test this feature

1. Create a workflow instance in the database through a GraphQL query.
See below for instructions.
2. After enabling the feature flag, you should be able to see the
workflow you created in the workflows list. To visualize the workflow,
go to the `/workflow/:id` page where the id is the id of the workflow.
See the video for a quick way to do so.

```gql
// First
mutation createWorkflow($data: WorkflowCreateInput!) {
  createWorkflow(data: $data) {
    id
  }
}

// Result
{
  "data": {
    "name": "test"
  }
}

// Second
mutation createWorkflowVersion($data: WorkflowVersionCreateInput!) {
  createWorkflowVersion (data: $data) {
    id
  }
}

// Result
{
  "data": {
    "name": "v1",
    "trigger": {
  "name": "trigger",
"displayName": "New or Updated Row",
"type": "DATABASE_EVENT",
"settings": {
"eventName": "company.created",
"triggerName": "Company Created"
},
  "nextAction": {
    "name": "step_1",
    "displayName": "Code",
    "type": "CODE",
    "valid": true,
    "settings": {
      "serverlessFunctionId": "function_id",
      "errorHandlingOptions": {
        "retryOnFailure": {
          "value": false
        },
        "continueOnFailure": {
          "value": false
        }
      }
    }
  }
},
"workflowId": "workflow_id"
  }
}
```


https://github.com/user-attachments/assets/42bbd98c-5e13-447c-9307-461a18ac2195
2024-08-23 17:50:13 +02:00
martmull
873a4c1bd1
Fix serverless save when name empty (#6720)
- fix serverless function error on save when name empty
- remove useless unique constraint on serverless function names
2024-08-23 17:34:31 +02:00
nitin
5d8162dc09
Added hotkeyScopes to serverless functions in settings (#6710)
Fixes #6656 
Is this the right way to implement keyboard listeners?
Please let me know, I'll make the changes accordingly.
:)


https://github.com/user-attachments/assets/af71d340-ead9-4659-81e6-a440522a194f

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-08-23 16:54:21 +02:00
martmull
f9af25b57e
Fix sentry issue (#6719)
https://twenty-v7.sentry.io/issues/5677123076/?environment=prod&project=4507072499810304&query=is%3Aunresolved+issue.priority%3A%5Bhigh%2C+medium%5D&referrer=issue-stream&statsPeriod=7d&stream_index=12

Removes billing section when is_free_access_enabled
2024-08-23 16:01:40 +02:00
Marie
ee6180a76f
[Fix] Prevent fields name conflicts with composite subfields names (#6713)
At field creation we are checking the availability of the name by
comparing it to the other fields' names' on the object; but for
composite fields the fields' names' as indicated in the repository do
not exactly match the column names' on the tables (e.g "createdBy" field
is actually represented by columns createdByName, createdBySource etc.).

In this PR we prevent the conflict with the standard composite fields'
names.
There is still room for errors with the custom composite fields: for
example a custom composite field "address" of type address on a custom
object "listing" will introduce the columns addressAddressStreet1,
addressAddressStreet2 etc. while we won't prevent the user from later
creating a custom field named "addressAddressStreet1".
For now I decided not to tackle this as this seem extremely edgy + would
impact performance on creation of all fields while never actually useful
(I think).
2024-08-23 13:24:10 +02:00
Marie
981f311ed0
Fix addition of new option in select field if there are no existing options (#6718)
Fixes
[sentry](https://twenty-v7.sentry.io/issues/5745628875/?alert_rule_id=15135099&alert_type=issue&notification_uuid=95108411-b431-4abd-bdd6-687c96a7353e&project=4507072563183616&referrer=discord)
2024-08-23 12:13:49 +02:00
martmull
6f9aa1e870
6654 serverless functions add a deploy button disable deploy when autosave (#6715)
- improvements on serverless function behavior (autosave performances,
deploy on execution only)
- add versioning to serverless functions
- add a publish endpoint to create a new version of a serverless
function
  - add deploy and reset to lastVersion button in the settings section:
<img width="736" alt="image"
src="https://github.com/user-attachments/assets/2001f8d2-07a4-4f79-84dd-ec74b6f301d3">
2024-08-23 12:06:03 +02:00
gitstart-app[bot]
7ca091faa5
Add isInactive to FieldMetadata decorator (#6623)
This PR was created by [GitStart](https://gitstart.com/) to address the
requirements from this ticket:
[TWNTY-4145](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-4145).
This ticket was imported from:
[TWNTY-4145](https://github.com/twentyhq/twenty/issues/4145)

 --- 
### Description
This PR introduces the @isInActive() decorator to the standard field
metadata. \
- This gives the ability to allow workspaces to be able to be created
with standard fields as inactive *Helps prevent polluting existing
workspaces
- A new standard field can be added to* eg company-workspace-entity.ts
and the @WorkspaceIsInActive() decorator can be added to create it in
deactivated mode
sync-metadata command: `yarn command:prod workspace:sync-metadata -f`

### Refs
#4145 

### Demo

<https://www.loom.com/share/10c13e2614d749809cfe2d2d847e963e?sid=017bbfcf-53c6-4205-8ffc-8a09c416220a>\

<https://www.loom.com/share/6ab86bd36f344c999cb8dacdb82c7bb0?sid=13ac78a2-de44-4772-bb54-7b57975e7360>\

Fixes: #4145

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-08-22 18:37:06 +02:00
Raphaël Bosi
1eeeae8564
6686 Add try catch on every cron job, and send exception to exceptionHandler (#6705)
Closes #6686

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-08-22 18:23:05 +02:00
nitin
1030ff43d8
Created a specific scroll wrapper context per scroll wrapper and made ScrollTop and ScrollLeft componentStates (#6645)
@lucasbordeau @charlesBochet 

Issue #4826 

Could u review this changes.

Let me know what do you think.

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-08-22 18:21:14 +02:00
Thomas Trompette
0a7700351f
Update workflow version struct (#6716)
We want to avoid the nested structure of active pieces. Steps to execute
will now be separated from the trigger. It will be an array executed
sequentially.

For now a step can only be an action. But at some point it will also be
a branch or a loop
2024-08-22 17:59:16 +02:00
Raphaël Bosi
579c2ebcea
6687 change messaging import cron job to run every minute (#6704)
Closes #6687
2024-08-22 17:51:08 +02:00
gitstart-app[bot]
9898ca3e53
TWNTY-6135 - Improve Data Importer Select Matching (#6338)
### Description:

- we move all logic about the unmatchedOptions to a new component called
UnmatchColumn, because as it will be a full line in the table, it was
better to update where the component will be rendered
- In the latest changes to keep the columns when we change the step to
step 3 and go back to step 2, we added a fallback state
initialComputedColumnsState that saves the columns and only reverts the
updates when we go back to step 1 or close by clicking the X button

### Refs: 

#6135

```
It was necessary to add references and floating styles to the generic component to fix the bug when the last option was open and the dropdown was being hidden in the next row of the spreadsheet table. We fixed the same problem that occurs in the companies table as well
```

we used this approach mentioned on this documentation to be able to use
the hook without calling it on each component, we are calling only once,
on the shared component
<https://floating-ui.com/docs/useFloating#elements>\
before:


![](https://assets-service.gitstart.com/25493/2c994e0f-6548-4a9e-8b22-2c6eccb73b2e.png)

now:


![](https://assets-service.gitstart.com/25493/f56fd516-7e95-4616-b1ed-c9ea5195a8ae.png)###
Demo: <https://jam.dev/c/e0e0b921-7551-4a94-ac1c-8a50c53fdb0c>

Fixes #6135

NOTES: the enter key are not working on main branch too

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-08-22 17:42:49 +02:00
Charles Bochet
eab202f107
Make workspaceMemberId optional in JWT for workspaces that are not ACTIVE (#6714)
WorkspaceMemberId is mandatory in the jwt token generated for a given
user on a given workspace.
However, when a user signs up, it does not have a workspaceMemberId yet.
2024-08-22 00:28:19 +02:00
Charles Bochet
da4bd73881 Fix logging error in webhook system 2024-08-21 20:12:14 +02:00
Thomas Trompette
be50a6256f
Check workflow version is valid before publishing (#6702)
Fix https://github.com/twentyhq/twenty/issues/6670
2024-08-21 17:56:33 +02:00
Thomas Trompette
663acd56e4
Trigger workflow run manually (#6696)
Fix https://github.com/twentyhq/twenty/issues/6669

- create a commun function `startWorkflowRun` that both create the run
object and the job for executing the workflow
- use it in both the `workflowEventJob` and the `runWorkflowVersion`
endpoint

Bonus:
- use filtering for exceptions instead of a util. It avoids doing a try
catch in all endpoint
2024-08-21 17:41:26 +02:00
nitin
da5dfb7a5b
corrected targetableobject being undefined when clicked on create task in command menu (#6635)
Issue #6630

It seems this bug is caused by `targetableObjects` being assigned an
empty array, which then leads to an error due to it being undefined.
I've made some changes that should address the issue, but I would
appreciate any feedback or suggestions on alternative solutions.

Please let me know if there is a better approach to resolving this.

Thank you!








https://github.com/user-attachments/assets/d6409798-3320-49b3-834f-2b6888847ed8
2024-08-21 16:36:04 +02:00
Charles Bochet
c2cf8b4554 Bump version to 0.23.2 2024-08-21 15:39:55 +02:00
Charles Bochet
79641327f3
Fix webhook issue (#6711)
Fix
[#web](https://github.com/orgs/twentyhq/projects/1/views/3?pane=issue&itemId=75329194)

This PR does 2 things:
- migrate webhooks to TwentyORM
- Fix inversion between objectNameSingular and operation in webhook
eventName. It is stored as {objectNameSingular}.{operation} and we were
querying {operation}.{objectNameSingular}
2024-08-21 15:33:38 +02:00
Charles Bochet
612a875c7b
Remove performance logs (#6709)
We have found the root cause of the issue:
- when using a datasource (including the cached ones), we are fetching
ObjectMetadataCollection from cache (700kB). Datasource usage is
happening any time we are using twentyORM, which is everywhere in the
jobs and in some resolvers (including the GetCurrentUser one). This is
leading to a high load on redis and leading to the performance issues we
are seeing.
- we actually don't need to fetch this objectMetadataCollection while
using a cached datasource, only when we instantiate a new one
2024-08-21 14:17:11 +02:00
Marie
aa4ae53fb4
[Fix] field does not appear directly after creation (#6708) 2024-08-21 12:08:57 +02:00
Charles Bochet
614a81860f
Add logging on currentWorkspaceMember query (#6706)
We are experiencing slow GetCurrentUser endpoint, this is helping us
troubleshoot
2024-08-21 11:48:20 +02:00
gitstart-app[bot]
6caa78008f
If an object is disabled, then the relationships to that object should be disabled (#6690)
This PR was created by [GitStart](https://gitstart.com/) to address the
requirements from this ticket:
[TWNTY-5370](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-5370).
This ticket was imported from:
[TWNTY-5370](https://github.com/twentyhq/twenty/issues/5370)

 --- 


### Description

- We updated the logic in
packages/twenty-server/src/engine/metadata-modules/object-metadata/object-metadata.service.ts
  
  Test cases:
1. Ensure that when an object is disabled, all related relationships are
also disabled.
         a. Example disable the people object
b. Check the company object and verify that the people field has been
disabled too
c. Check the opportunity object and check that the point of contact
field has been disabled too
2. Verify that when a previously disabled object is restored, the
relationships are also restored.
3. Ensure that previously disabled relationships remain disabled when
the object is disabled and later restored.
4. Verify that relationships of a disabled object are not visible in the
UI.
5. Ensure that relationships to a disabled object are marked as inactive
in the data models screen

 ### Refs

#5370

  
### Demo
  

<https://www.loom.com/share/2b0a91f463ca4e02a6963f9a8796a0d9?sid=1e9c4fb8-8fb9-4c6c-b43a-c50f3776e1d3>

Fixes #5370

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Marie Stoppa <marie.stoppa@essec.edu>
2024-08-21 11:19:21 +02:00
Charles Bochet
08e07ac2d5 Update graphql-yoga patch in yarn.lock 2024-08-21 00:39:55 +02:00
Raphaël Bosi
091c0f83be
6619 modify event emitter to emit an array of events (#6625)
Closes #6619

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-08-20 19:44:29 +02:00
Charles Bochet
17a1760afd
Improve performance twenty orm (#6691)
## Context

As we grow, the messaging scripts are experiencing performance issues
forcing us to temporarily disable them on the cloud.
While investigating the performance, I have noticed that generating the
entity schema (for twentyORM) in the repository is taking ~500ms locally
on my Mac M2 so likely more on pods. Caching the entitySchema then!

I'm also clarifying naming around schemaVersion and cacheVersions ==>
both are renamed workspaceMetadataVersion and migrated to the workspace
table (the workspaceCacheVersion table is dropped).
2024-08-20 19:42:02 +02:00
Lucas Bordeau
3ae89d15de
Fix post merge (#6699)
Fixed settingsPreviewRecordId state naming.
2024-08-20 16:45:00 +02:00
Syed Md Mihan Chistie
be20a690b3
added typechecking for all ts files (#6466)
Fixes: #6436 

Changes made: 

- Added typecheck step before twenty-ui build to check stories TS errors
- Added a tsconfig.dev.json to add stories and tests to typecheking when
in dev mode
- Added tsconfig.dev.json to storybook dev command of twenty-ui to
typecheck stories while developing
- Fixed twenty-ui stories that were broken

- Added a serve command to serve front build
- Fixed unit test from another PR

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-08-20 11:05:13 +02:00
Charles Bochet
12a657ce29
Patch messaging import crons not running (#6688)
In 0.23.1, we have introduced a regression by migrating to TwentyORM ;
messageChannels were not considered as syncable anymore
2024-08-19 19:19:01 +02:00
Jérémy M
db54469c8a
feat: soft delete (#6576)
Implement soft delete on standards and custom objects.
This is a temporary solution, when we drop `pg_graphql` we should rely
on the `softDelete` functions of TypeORM.

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-08-16 21:20:02 +02:00
Nabhag Motivaras
20d84755bb
fix: exclude tabler/icons-react from optimizeDeps to avoid crashing performance CI (#6621)
## ISSUE (Warning)

- Fixes #6437 

### Things needed to investigate :

- [x] Can we exclude @tabler-icons from Babel / wyw-in-js / the vite
config of Storybook ?
> Yes we can

- [ ] Is there a reproducible difference between non-Linaria components
loading time and Linaria components loading times ?
> Couldn't find anything related to this, yet. but changes fix the
problem.
2024-08-16 16:18:45 +02:00
NitinPSingh
5404a8ba2d
fixes #6499 alignment issue on workspace switcher (#6589)
fix #6499 

- fix the size of workspace switcher to 32px from 40px

![Screenshot 2024-08-09
140212](https://github.com/user-attachments/assets/425c9089-8969-4d59-82ef-10572cfa7027)

- fix alignment issues

![Screenshot 2024-08-09
142357](https://github.com/user-attachments/assets/2e3e76f2-8a81-48e9-86ff-691c11215583)

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-08-16 15:31:04 +02:00
Raphaël Bosi
08c7947b3b
Use twentyORM in Timeline messaging (#6595)
- Remove raw queries and replace them by using `twentyORM`
- Refactor into services and utils

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-08-15 10:15:32 +02:00
Thomas Trompette
6927f46e1c
Migrate to workspace services (#6628)
As title
2024-08-14 18:46:36 +02:00
Lucas Bordeau
c63c18aef1
Fix duplicate activities (#6627)
Activity creation was duplicating the new activity on already visited
records of the same type.

The fix was to activate `shouldMatchRootQueryFilter` on createOne for
activity.
2024-08-14 18:44:35 +02:00
Thomas Trompette
9e7714e627
Add workflow run entity (#6622)
- create a workflow run every time a workflow is triggered in
not_started status. This status will be helpful later for once workflows
will be scheduled
- update run status once workflow starts running
- complete status once the workflow finished running
- add a failed status if an error occurs
2024-08-14 18:27:32 +02:00
Lucas Bordeau
121794e3c0
Fixed modal clickoutside (#6624)
Modal clickoutside was modified recently.

It was considering portaled component like dropdown outside, so
comparePixel mode for click outside is needed here.
2024-08-14 17:50:18 +02:00
Nabhag Motivaras
197bca57ba
feat(e2e): twenty-e2e-testing with playwright (#6539)
## ISSUE (e2e) - Introduces e2e for twenty

 - Closes #6360
 
##  Description

- [x] Create Package. 
- [x] Setup environments such as baseUrl.
- [x] ignore CI configuration for now.
- [x] write a simple test to check if table is visible in companies tab.

### Running test with UI

```
yarn run test:e2e:ui
```

https://github.com/user-attachments/assets/a7b7ae35-8898-461e-8c7c-d3e4e9515aeb

### Running all test and seeing report

```
yarn run test:e2e
yarn run test:e2e:report
```



https://github.com/user-attachments/assets/2558a1f9-97cc-4f06-86f0-806f207eac5a

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-08-14 17:23:32 +02:00
Anand Krishnan M J
59e14fabb4
[Issue-5772] Add sort feature on settings tables (#5787)
## Proposed Changes
-  Introduce  a new custom hook - useTableSort to sort table content
-  Add test cases for the new custom hook
- Integrate useTableSort hook on to the table in settings object and
settings object field pages

## Related Issue

https://github.com/twentyhq/twenty/issues/5772

## Evidence


https://github.com/twentyhq/twenty/assets/87609792/8be456ce-2fa5-44ec-8bbd-70fb6c8fdb30

## Evidence after addressing review comments


https://github.com/twentyhq/twenty/assets/87609792/c267e3da-72f9-4c0e-8c94-a38122d6395e

## Further comments

Apologies for the large PR. Looking forward for the review

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-08-14 17:11:17 +02:00
Thomas Trompette
0f75e14ab2
Create default view for workflows + fix task and note targets (#6620)
As title
2024-08-14 12:04:41 +02:00
Raphaël Bosi
d1c278d6b2
6430 Part 1: remove all raw queries from the messaging and calendar modules (#6572)
Part 1 of #6430
- Remove all repositories which contained raw queries in `messaging`
module
- Replace them using `twentyORMManager`
2024-08-13 19:40:50 +02:00
Raphaël Bosi
40bbee8d9f
5x Fix cache performance issues (#6616)
Calling `getObjectMetadata` from `WorkspaceCacheStorageService` in every
query was causing big performance issues. The `objectMetadataCollection`
is now part of the `WorkspaceInternalContext` so we only instance it
once in the `WorkspaceDatasourceFactory`.
Queries are now much faster, for instance for TimelineCalendar, it went
from ~450ms to 80ms.
2024-08-13 17:54:55 +02:00
BOHEUS
65a961ff3e
Fix for #6597 Created by field can't have null value (#6614)
Fix for #6597
2024-08-13 09:07:50 +02:00
Raunak Singh Jolly
ecdbe26b09
Fixed: Drag and Drop Causes Flashing and Disappearing Cards (#6065)
Issue was "inView" was setting false due to root being scrollWrapper,
instead changed it to viewport.
Fixes: #6001 
[Screencast from 2024-06-27
22-50-59.webm](https://github.com/twentyhq/twenty/assets/59247136/408d5fb5-91ab-4d3a-881d-bbcaf4817a79)

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-08-12 19:17:32 +02:00
Hansol Yang
b6202fe98c
Issue6335: RecordInlineCell tree refactor with RecordInlineCellContext (#6537)
Fixes [#6335](https://github.com/twentyhq/twenty/issues/6335)

This pull request is for issue
[#6335](https://github.com/twentyhq/twenty/issues/6335): Refactor
RecordInlineCell tree with a Context to avoid props drilling. For the
refactoring, this PR made changes as below:

- Created new script RecordInlineCellContext.tsx: Defining a context to
pass in useContext()
- Updated RecordInlineCell.tsx: Passing the necessary props as context
values, wrapping with RecordInlineCellContext.Provider
- Updated RecordInlineCellContainer.tsx: Passing the props to
RecordInlineContainer as RecordInlineCellContext
- Updated RecordInlineCellDisplayMode.tsx: retrieves values from
useRecordInlineCellContext instead of directly assigning them
- RecordInlineCellValue.tsx: Removed values passed through
<RecordInlineCellDisplayMode> as they are now retrieved through
useRecordInlineCellContext + Removed the null check for
RecordInlineCellContextProps.

Using RecordInlineCellContext, I believe the context goes to the top of
the hierarchy and passed to the required layers without going through
several layers. However, please let me know if I understood the issue
incorrectly or it is not solved properly.

Thank you in advance for your review!

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-08-12 12:18:05 +02:00
Nabhag Motivaras
b16437e6c8
fix: column overlay issue in record table header cells (#6609)
### Issue (BUG)

- Fixes #6604 

### Description

- Now Columns doesn't overlay on header cells, issue was independant of
field type.

#### Before 


https://github.com/user-attachments/assets/0872f07a-83b2-44d8-8f8e-c61c5fac5278

#### After



https://github.com/user-attachments/assets/e2e623f6-6635-4ab6-8ca2-cbd3a296c27d
2024-08-11 20:48:31 +02:00
Félix Malfait
d5350e11a3
Remove some dead code (#6611)
We could remove a lot more than this, this is just a start.

There are various tools to help with this, knip is a good one
2024-08-11 20:43:18 +02:00
Thomas Trompette
39512a779e
Fix storybook tests (#6594)
As title
2024-08-09 19:39:16 +02:00
Anantesh G
13d05d8c74
Fixed restrictive URL sanity check #6570 (#6575)
Fixes #6570 

## Changes
- Replaced the old regex with a new, more inclusive regex pattern.
- Updated the isURL function to use the new pattern.

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-08-09 16:40:43 +02:00
Weiko
bdac4c81f7
Improve QueryFailedError message in sync-metadata (#6591)
Adding more logs with Typeorm QueryFailedError in sync-metadata command

Example with a unicity constraint violation, to identify which column is
affected
<img width="841" alt="Screenshot 2024-08-09 at 14 56 05"
src="https://github.com/user-attachments/assets/c47fbb1d-77ee-4d7a-87e7-dbe54a6aa941">

In this case, this should help self-hosting users to know which key is a
duplicate during syncs after a version upgrade for example
2024-08-09 16:23:14 +02:00
Weiko
6792056b73
Fix query runner exceptions not being handled properly (#6593)
## Context

We recently introduced a try catch in the different resolvers of the
query runner to handle exceptions via
workspaceQueryRunnerGraphqlApiExceptionHandler and convert them to
proper errors. However this was never called as expected because query
runner methods were async.
This is a regression from https://github.com/twentyhq/twenty/pull/6324

## Before

<img width="938" alt="Screenshot 2024-08-09 at 15 34 02"
src="https://github.com/user-attachments/assets/3607c7ed-ea91-4729-a4e4-ede7761347e2">


## After

<img width="905" alt="Screenshot 2024-08-09 at 15 33 46"
src="https://github.com/user-attachments/assets/51bcbfa1-9b0b-4c7c-84a2-7c8effeadddd">
2024-08-09 16:07:58 +02:00
Weiko
b1aa115d28
Fix auth exceptions (#6590)
A regression has been introduced in
https://github.com/twentyhq/twenty/pull/6459/files#diff-0a06bf2b624f77f1b7ded0fcc4ce266d1a56f4329222b46d1cf4d76a18000c97L505
where 401 have been changed to 403. However the renew token logic on the
FE expects a 401, see here
https://github.com/twentyhq/twenty/blob/main/packages/twenty-front/src/modules/apollo/services/apollo.factory.ts#L100

I've also introduced a fix with a proxy class in
GraphQLHydrateRequestFromTokenMiddleware since this middleware calls
validateToken from tokenService which are never converted back to
graphqlErrors so handleExceptionAndConvertToGraphQLError below will
receive an AuthException and will send capture it and return it as a 500

both issues have been fixed and should resolve the renewToken logic 

## Test
tested locally by playing with token expiration dates in the env

<img width="635" alt="Screenshot 2024-08-09 at 12 47 05"
src="https://github.com/user-attachments/assets/e93d5741-29b7-4699-b882-ee8f4fee6e6e">
2024-08-09 14:09:26 +02:00
Félix Malfait
7e01843aaf
Remove dead code linked to quick actions (#6587)
Removing dead code, we'll take another approach to build this
2024-08-09 11:09:26 +02:00
gitstart-app[bot]
a2a5ab488c
When exporting a kanban we should export the kanban's main field (#6444)
This PR was created by [GitStart](https://gitstart.com/) to address the
requirements from this ticket:
[TWNTY-6046](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-6046).
This ticket was imported from:
[TWNTY-6046](https://github.com/twentyhq/twenty/issues/6046)

 --- 

### Description

- We are getting the `kanbanFieldMetadataNameState` , get the column
data, and if there is data and the use is on the Kanban view we add the
data to the result

### Refs

#6046

### Demo

<https://jam.dev/c/96f16211-40e4-4b49-a6f5-88f0692fb47a>

Fixes #6046

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: gitstart-twenty <140154534+gitstart-twenty@users.noreply.github.com>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-09 10:23:06 +02:00
Félix Malfait
f2cc385710
Fix frontend tests (#6585)
Fix a few broken tests
2024-08-09 08:38:01 +02:00
Thomas Trompette
ab12d9e8da
Fix perf tests storybook (#6584)
As title
2024-08-08 21:43:02 +02:00
Faisal-imtiyaz123
b4e2ada3b0
Fixes Empty Label Identifer Preview in Settings/DataModel/Object/Edit (#6370)
fixes #6143

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-08 18:30:02 +02:00
Nabhag Motivaras
320742cdea
[Fix] URL inputs to not submit numeric hostnames and url without domain (#6482)
## ISSUE (BUG)

- Fixes #5396

## Description 

- When given a string like **https://300**, it interprets 300 as the
hostname, which it then converts to an IP address, what i did was to
check if the entire string (ignoring the protocol ) is number then don't
submit it all within zod and it makes sense to do that cause.

- The range for valid 32-bit unsigned integers is 0 to 4294967295 (which
corresponds to 0.0.0.0 to 255.255.255.255) so other than this numbers by
default URL objects throws invalid.




https://github.com/user-attachments/assets/1da92aeb-d50c-43a3-87ea-78a059d3fa84
2024-08-08 17:42:36 +02:00
Weiko
02a1da1330
Fix prettier (#6583)
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-08 17:40:35 +02:00
Thomas Trompette
a0e5ca44ba
Fix last batch of jest tests (#6582)
As title
2024-08-08 15:53:17 +02:00
nitin
774cb554f4
removed @blocknote/core from dependencies (#6580)
Fixes #6564  & #6561 

@FelixMalfait 

Removed @blocknote/core from dependencies



https://github.com/user-attachments/assets/ef6acfff-2945-4062-a35c-21dd108a4345

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-08 15:44:09 +02:00
Ciara Hatcher
c3bf94e4cc
Lumosviridi v20 kubernetes updates (#6356)
Updates for v20+ and misc terraform bug fixes. Also refactored to use
terraform variables instead of locals which helps with readability and
ease of use for new users.

Terraform validation is currently passing:
![Screenshot 2024-07-21 at 13 18
37](https://github.com/user-attachments/assets/02aadc2d-d3f6-4e8b-9315-64e25191d9e6)

Additionally added [terraform-docs](https://terraform-docs.io/) to
generate a more helpful README for terraform specific configuration.

Raw K8s manifests were updated with changes for v20+ as well.

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-08 13:55:45 +02:00
Thomas Trompette
74229a80c8
Fix broken tests batch 2 (#6573)
As title
2024-08-08 11:16:59 +02:00
Weiko
1b9f63b3ad
fix attachment upload (#6574)
## Context
UploadFile now returns the file token which we don't want when we save
the attachment in the DB due to its non-persistence so now the FE
removes the token query param before saving the attachment. This is most
likely not the right way to do it, we will need to refactor this part
before.

Also made sure we don't save the token in the DB for rich_text as well
and remove it before saving.
2024-08-07 19:34:57 +02:00
Nabhag Motivaras
e265efcf90
fix(wip): tasks navigate to /objects/tasks with viewId (#6528)
ISSUE (BUG)

Fixes: #6523 

Description:
- [ ] Should work on Command Menu
- [ ] Should also work on Global Goto Hotkeys
- [ ] Should navigate with viewId, as when we click on Navigationbar it
is navigating with viewId.
2024-08-07 18:00:41 +02:00
Thomas Trompette
12e55fd5b7
Bump version to 0.23.1 (#6567)
As title

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-08-07 17:09:30 +02:00
martmull
10817c5388
Fix onboarding status refacto (#6533)
see comments in
https://github.com/twentyhq/twenty/pull/6531#pullrequestreview-2217807413
- rename method
- add check before setting create profile pending user var
2024-08-07 17:09:11 +02:00
nitin
8408cf6d19
Added Side Panel compact header (#6560)
Fixes issue #6487 
Added a new prop, `isInRightDrawer` to both the `ShowPageSummaryCard`
and `ShowPageRightContainer` components. This prop allows for different
styles to be applied based on the specific needs of the drawer..

Rather than creating a new component, I opted to add this prop to avoid
code duplication. However, if you would prefer a separate component for
this functionality, I'm happy to make that adjustment—please just let me
know!

Also added `box-sizing: border-box` to `ShowPageSummaryCard` to make
sure it aligns with figma designs.



https://github.com/user-attachments/assets/38e8d85e-55d5-471e-884a-11c67467f56f
2024-08-07 16:56:55 +02:00
Us3r-gitHub
f2aa67b7e5
feat: Set preselect field type on new field of object page (#6314)
#5661

---------

Co-authored-by: Achsan <achsanh@gmail.com>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-07 16:32:37 +02:00
Thomas Trompette
9a0c9672a0
Fix createdBy and activity tests (#6569)
As title
2024-08-07 16:21:06 +02:00
nitin
c836bbbfc2
Fixed SignInUp Modal misalignment for devices smaller than 400px width (#6386)
Hi @Bonapara,
Issue #6385 

I encountered an issue with the Modal component where its width was
fixed at 400px. While the container housing the Modal adjusted its size
based on the screen width, the Modal itself remained at 400px regardless
of the screen size.

I have implemented a change to address this problem. Could you please
review the changes and let me know your thoughts?

Thank you!




https://github.com/user-attachments/assets/8358aacb-d6c3-440e-895e-7abc4f8a3534

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-07 15:37:32 +02:00
Jérémy M
11a41b3d97
feat: created by email calendar (#6536)
This PR is a followup of #6324 to add support of EMAIL and CALENDAR
source for the created by composite field.
2024-08-07 15:03:06 +02:00
Weiko
dce5a64ec5
Fix images in note rich text (#6550)
## Before
<img width="439" alt="Screenshot 2024-08-06 at 11 20 06"
src="https://github.com/user-attachments/assets/d2aa9411-cdf4-4457-8997-7cbecb8fe7e3">

## After
<img width="501" alt="Screenshot 2024-08-06 at 11 20 09"
src="https://github.com/user-attachments/assets/a5a68fff-1542-4b62-939c-50070f15b692">
2024-08-07 11:45:17 +02:00
bosiraphael
5a72b949d7
6382 create a command to add a uservar in the key value pair table for every account which needs to reconnect (#6553)
Closes #6382

Create SetUserVarsAccountsToReconnectCommand.
This command loops on all workspaces and:
- deletes all user vars with deprecated key `ACCOUNTS_TO_RECONNECT`
- creates a key value pair of type `USER_VAR` with a key of
`ACCOUNTS_TO_RECONNECT_INSUFFICIENT_PERMISSIONS` for all connect
accounts with a message channel or calendar channel with status
`FAILED_INSUFFICIENT_PERMISSIONS`
2024-08-07 11:43:18 +02:00
Thomas Trompette
2abb6adb61
Build exceptions and handler (#6459)
Adding exceptions and handler for auth services.

Tested with:
- Workspace creation
- Workspace signup
- Workspace invitation
- Reset password
- Adding email account
- Impersonation

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-08-07 11:42:49 +02:00
Nabhag Motivaras
f09e61bb9f
fix: vite to allow serve fonts from blocknote and any files from root of workspace (#6552)
## ISSUE

- Fixes #6546 

## Description

- Now we don't get error logs and we are allowing vite to serve from
blocknote and root workspace.
2024-08-07 11:12:33 +02:00
nitin
43700ad186
some ts-error-fixes (#6563)
@FelixMalfait 

Let me know what do you think.

Thanks
2024-08-07 10:12:27 +02:00
nitin
a7941315e7
Replace entityId by recordId in the front end. (#6355)
Hey @lucasbordeau, I replaced every `entityId` with `recordId` in the
frontend.

### Some clarifications:

1. At [this
line](0b207d26b6 (diff-b4f415dd1f060307ad61f64394ee96b2912f6015e26c7fd2eab4b8c6a84d2d07L14)),
I changed `recordId` to `selectedRecordId` because that component has
`entityId` defined in code at [this
line](0b207d26b6 (diff-b4f415dd1f060307ad61f64394ee96b2912f6015e26c7fd2eab4b8c6a84d2d07L55))
which was to be changed to `recordId`. To avoid repeated constants, I
changed the arguments to `selectedRecordIds`.

2. At the following links:
- [File
1](0b207d26b6 (diff-52b780bdd4cfc582ca7e1b457dbbd63733bfbb7790fc421054bbd2dbf0389e16))
- [File
2](0b207d26b6 (diff-6d47cb9a59dfcf6b1495937084ae799a61da6afccb21208f04ce8e1f5afca0e4))
- [File
3](0b207d26b6 (diff-821815783f9968f1da3cd437fc9d1d1666d12dc331d279cc5fbd9817bc2df2bf))

It seems to be the tests. As I can see, it is checking for both
`objectFilterDropdownSelectedEntityIdState` and
`objectFilterDropdownSelectedRecordIdsState`. Since `entityIds` are
supposed to be removed and `recordedId` state is already being checked,
I commented out all the `entityidState` code. If they are to be removed
or uncommented, please let me know, and I will do as expected.

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-07 08:52:57 +02:00
nitin
0c99bfbc31
New sidemenu for notes editor (#6527)
@Bonapara @lucasbordeau

This PR addresses issue #6489:

- Created an entire sidemenu for the block editor.

## Review Request

Please review the implementation of the custom sidemenu. 

## Outstanding Issues

1. Sidemenu Positioning:
   - The current placement is determined by the BlockNote package.
   - I need assistance in positioning it according to the Figma designs.
- Attempted adding margin to the sidemenu, but this solution doesn't
scale well across different screen sizes.

2. Props Spreading in `CustomSidemenu.tsx`:
- Unable to avoid props spreading due to the third-party BlockNote
components.
   - Added eslint-disable comments as a temporary solution.

Your insights on these challenges would be greatly appreciated,
especially regarding the sidemenu positioning and any potential
alternatives to props spreading.




https://github.com/user-attachments/assets/4914a037-a115-4189-88bc-a41d121d309d

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-07 08:23:05 +02:00
Thomas Trompette
1ed31d9d68
Force order in navigation panel for notes and tasks (#6557)
As title. Tasks and Notes order sometimes change
2024-08-06 18:24:33 +02:00
bosiraphael
018b8220dc
Remove message thread id from mcma and update scripts (#6500)
- Remove `messageThreadId` from `messageChannelMessageAssociation`
- Update thread merging
- Update all queries which were dependent on this field
- Update some raw queries by using `twentyORM` instead

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-08-06 18:19:59 +02:00
Weiko
48d0a3649d
Remove fileService getFileStream fallback after completed migration (#6558)
To merge once the command has been executed.
2024-08-06 18:19:50 +02:00
Félix Malfait
4157a67bf8
Fix permissions for serverless functions (#6555)
Fixes #6525

(@martmull fyi it was not related to AWS but linked to the fact that we
recently enforced passing a token to access files)
2024-08-06 15:31:22 +02:00
Thomas Trompette
67c41251fb
Make bool fields editable again (#6551)
As title
2024-08-06 13:50:55 +02:00
Ali Elamir
cd33471159
Animate the Sidebar Objects Tree view opening (#6521)
@Bonapara 

Issue https://github.com/twentyhq/twenty/issues/6485

Introduced the animation when opening the menu.

Please let me know if this is fine or I need to make further changes.
Thank you.

---------

Co-authored-by: bosiraphael <raphael.bosi@gmail.com>
2024-08-06 11:28:06 +02:00
Félix Malfait
23a2821a28
Update upgrade-guide.mdx (#6549)
Fix command
2024-08-06 09:44:05 +02:00
Charles Bochet
1b9d2c8151
Release 0.23 (#6547)
Here we go!
https://twenty.com/releases
2024-08-05 23:18:44 +02:00
Charles Bochet
8373dfdc26
Webhook wip (#6371)
This PR introduces the following changes:
- Add the ability to filter webhooks by objectSingularName and Actions
- Refactor SettingsWebhookDetails edition to not use react-hook-form
(which will be deprecated on the whole project)
- Updating the tests with a complex set of mock (we just need to fix ~30
of them now :D)

<img width="1053" alt="image"
src="https://github.com/user-attachments/assets/4e56d972-f129-4789-8d1c-4b5797a8ffd7">
2024-08-05 23:14:29 +02:00
Prateek Jain
48f4e41148
Add custom field types on seed (#6505)
Fixes #6364

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-08-05 18:19:19 +02:00
nitin
ed0102ec58
Allow renaming names from uploaded files (#6358)
Hello @Bonapara,

Done with issue #6317. I had to create a new component, EditableField
([Component](56bf16b82b (diff-3a2362dbe6e21e46c55a673c80460bc201c62b36790b5df28b4c1f9f27377f59))),
because the existing InputText component has a fixed height
([link](https://github.com/twentyhq/twenty/blob/main/packages/twenty-front/src/modules/ui/input/components/TextInputV2.tsx#L55)),
which causes the attachment row to increase in size everytime clicked on
rename.

I’ve also updated the colors for the box border and box shadow as
specified in Figma.

Please let me know your thoughts.
Thanks



https://github.com/user-attachments/assets/d667269d-070e-4968-b63c-2ba9605de055

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-05 17:21:27 +02:00
nitin
c7ba6d4e9f
Existing filter value isn't passed to the component to edit it - Issue #6278 (#6449)
Hi @FelixMalfait,
Regarding Issue #6278 
I’ve resolved the issue with fields involving numbers and text.

However, I’ve encountered a problem with how dates are parsed, selected,
and displayed. When a date is selected for the first time, it is
correctly parsed and adjusted to the local timezone (e.g., 05:30:00 AM
for my timezone). However, when trying to change the date, the day prior
to the selected date is shown instead of the intended date. Please refer
to the attached video for a demonstration of this bug.

I suspect this issue is related to how the date is parsed and selected
in relation to timezones, and I am currently investigating it further.

Could you please review the changes made so far?

Thanks!




https://github.com/user-attachments/assets/4f0e5694-530b-489c-807e-3b7d52da0742

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-08-05 17:19:15 +02:00
nitin
eba79d2ea5
Preserve navigation state when adding custom fields (#6399)
@lucasbordeau
Issue #6374 
Fixed the navigation state issue! I also found and resolved a similar
bug with the "Edit Fields" functionality. The
`setNavigationMemorizedUrl` state now correctly updates on navigation to
settings, ensuring users return to the correct page.

Please review.
2024-08-05 16:50:08 +02:00
bosiraphael
2073d8e6e1
6446 improve information banner component to make it scale better (#6545)
Closes #6446
2024-08-05 16:00:52 +02:00
NitinPSingh
fa738ec373
fix #5660 standardized relation icon (#6504)
fix #5660 

- updated One to many [1:N] icon across app
- created many to one icon [N:1] , and added it in app


![download
(2)](https://github.com/user-attachments/assets/35ce05be-0f5f-4cd0-a1b7-7ab9062f74a0)
![download
(1)](https://github.com/user-attachments/assets/57316e49-c931-4ab5-ad4b-d04b241724c3)

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-05 15:47:25 +02:00
Faisal-imtiyaz123
fe9144a4a7
Updates CheckBox Component in Table and Kanban View ( #4850 ) (#6519)
fixes #4850

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-05 15:26:09 +02:00
nitin
d23e5f18c3
Added max-height to innerlist to get scrolling behaviour (#6541)
Fixes #6538 



https://github.com/user-attachments/assets/c9ecf96d-9d37-4a91-a08e-e0f882ecea62

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-05 15:09:19 +02:00
Melanie Eureka Ngome
dcf938f2c9
Update views-sort-filter.mdx (#6544)
Edited a paragraph to remove sentence error and improve comprehension.
2024-08-05 14:42:59 +02:00
Nabhag Motivaras
b841187319
fix: releases list to have styles according to theme (#6534)
### ISSUE (BUG)

- Fixes: #6524

### DESCRIPTION

- List styles wasn't applying based on the theme, reason for applying
css to directly to **li** and **li strong** instead of applying to
unorderlist-element is that later on we might have **orderlist** in that
case if we had apply to **ul** here, this will issue will be raised
again, thus in **list element**


https://github.com/user-attachments/assets/64f0870e-4f82-4afd-8452-778aa54023fc
2024-08-05 14:42:20 +02:00
Weiko
542419bc1b
Timeline log displays empty when field value deleted (#6542)
Fixes https://github.com/twentyhq/twenty/issues/6288

## Before
<img width="1282" alt="Screenshot 2024-08-05 at 13 22 13"
src="https://github.com/user-attachments/assets/27bf3343-7d6a-440f-905b-e55fdde918d7">

## After
<img width="1251" alt="Screenshot 2024-08-05 at 13 22 05"
src="https://github.com/user-attachments/assets/25404bff-9d90-4631-af09-fe18b6df43f5">
2024-08-05 14:36:57 +02:00
Charles Bochet
2b311b5f7b
Update standard fields (#6532)
In this PR:
- adding Favorites to Tasks and Notes
- fixing inconsistencies between custom object creation and sync of
standard fields of custom objects
- fixing workspaceCacheVersion not used to invalidate existing
datasource
2024-08-04 23:22:41 +02:00
Charles Bochet
03204021cb
Refactor onboarding user vars to be absent when user is fully onboarded (#6531)
In this PR:
- take feedbacks from: https://github.com/twentyhq/twenty/pull/6530 /
https://github.com/twentyhq/twenty/pull/6529 /
https://github.com/twentyhq/twenty/pull/6526 /
https://github.com/twentyhq/twenty/pull/6512
- refactor onboarding uservars to be absent when the user is fully
onboarded: isStepComplete ==> isStepIncomplete
- introduce a new workspace.activationStatus: CREATION_ONGOING

I'm retesting the whole flow:
- with/without BILLING
- sign in with/without SSO
- sign up with/without SSO
- another workspaceMembers join the team
- subscriptionCanceled
- access to billingPortal
2024-08-04 20:37:36 +02:00
Charles Bochet
c543716381
Various fixes: profilePicture / logo upload, imageIdentifiers (#6530)
In this PR:
- refactoring auth module to extract a jwt module that can be re-used
from other part of the app (avoiding circular dependencies file module
=> auth => file (file and auth both need jwt actually)
- activating imageIdentfier on person on workspace creation (this will
put back the images on people)
- fixing picture upload (we were missing some fileToken)
2024-08-04 15:08:25 +02:00