Commit Graph

3837 Commits

Author SHA1 Message Date
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