Commit Graph

2325 Commits

Author SHA1 Message Date
Raphaël Bosi
23e7958218
Fix syncStageStartedAt not correctly set (#7436)
Fix syncStageStartedAt not correctly set

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-10-05 00:44:52 +02:00
Charles Bochet
d8c4af9279 Fix all broken CIs (#7439)
Fix all the broken CIs :p

This includes an ongoing effort to simplify test maintenance by having 1
unique source of truth about metadata and data mocks (that will later be
generated from a unique source of seeds: dev = demo = test)

Regressions:
- Unit line coverage: 60 > 55
- Storybook Pages branch coverage: 40 > 35
We will need to write tests to increase those coverage
- RelationFieldDisplay perf: 0.2ms to 0.22ms > We might have a
regression here
- Removed perf story about RawJSON > We will need to re-add it
2024-10-05 00:23:23 +02:00
Weiko
bd305c8432
Fix worker run ci step (#7437)
## Context
Updating the Worker / Run step to run in sync mode with in-memory cache
type so it does not hang forever in the CI.
2024-10-04 19:28:29 +02:00
Guillim
744304e859
Adding instruction for running redis (#7434)
fixes #7433

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2024-10-04 19:08:08 +02:00
bmbaji
ae2bd66f45
changed the createdByName to Twenty(Sample data). (#7424)
I changed the createdByName from' system' to 'Twenty(Sample Data)'.

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2024-10-04 18:57:15 +02:00
Weiko
2f223f3294
Fix 'name' column wrongly added in standard objects (#7428)
## Context
Name shouldn't be added to all tables, especially standard objects
because they already have their own labelIdentifierFieldMetadata
specified in the workspace-entity schema. This PR removes this column
from the "base" list of columns to add when creating a new object/table
and moves it to the object-metadata service that is, as of today, only
used for custom objects. Also had to modify the migration-runner to
handle column creation in a table creation migration (this was available
in the migration definition already but was not doing anything)

This also fixes an issue in standard objects that already have a "name"
field defined with a different field type, this is even more important
when the said field is a composite field. For example people already has
a FULL_NAME name field which clashes with the default TEXT name field
meaning it was only creating 1 field metadata for 'name' but 3 columns
were created: `name, nameFirstName, nameLastName`. This inconsistency
with metadata (which is our source of truth everywhere) brought some
issues (lately, converting back typeorm response to gql (including
composition) was broken).
2024-10-04 18:31:19 +02:00
Harshit Singh
424c4890b0
fix: New Relation Design hot fix (#7423)
## Description

- This PR solves the issue #7353 

- [x]  Improved layout for mobile and desktop

-    [ ] Added tooltip on hover

---------

Co-authored-by: Nitin Koche <nitinkoche03@gmail.com>
Co-authored-by: Félix Malfait <felix@twenty.com>
2024-10-04 16:38:15 +02:00
Weiko
511150a2d3
Refactor graphql query runner and add mutation resolvers (#7418)
Fixes https://github.com/twentyhq/twenty/issues/6859

This PR adds all the remaining resolvers for
- updateOne/updateMany
- createOne/createMany
- deleteOne/deleteMany
- destroyOne
- restoreMany

Also
- refactored the graphql-query-runner to be able to add other resolvers
without too much boilerplate.
- add missing events that were not sent anymore as well as webhooks
- make resolver injectable so they can inject other services as well
- use objectMetadataMap from cache instead of computing it multiple time
- various fixes (mutation not correctly parsing JSON, relationHelper
fetching data with empty ids set, ...)

Next steps: 
- Wrapping query builder to handle DB events properly
- Move webhook emitters to db event listener
- Add pagination where it's missing (findDuplicates, nested relations,
etc...)
2024-10-04 11:58:33 +02:00
gitstart-app[bot]
8afa504b65
Add Skeleton loading for side panel (#7394)
This PR was created by [GitStart](https://gitstart.com/) to address the
requirements from this ticket:
[TWNTY-7112](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-7112).

 --- 


### Description

- To test you can use `await new Promise(r => setTimeout(r, 5000));`
line 74 of \`openCreateActivityDrawer.ts\`
- We added a recoil state to define the loading status
- Design points to note:

1 - We did not change the chip component styles because would be
unrelated to the issue can you confirm if you still need this change?


![](https://assets-service.gitstart.com/28455/c5999ef1-a7fc-4c53-b425-d0588092ba90.png)

2- In Figma, the loading state shows the Chip rendering an initial name
before showing the loaded name, currently, we are rendering the correct
name while loading, the change that makes this possible is below


![](https://assets-service.gitstart.com/28455/a0e14045-9a14-4d19-9570-62781fba1aa4.png)

if we set it as null, the initial name would appear, but also the
previous data in the state would affect the UI, passing the
`activityObjectNameSingular` data allows us to clear the previous data,
and make the Chip instantly updated, let us know if this behavior is
fine, or if you still want an initial name to be rendered while is
loading.

3 - Currently, the loading state of the tabs does not affect the
selected tab (auto-defined by the component) should we change this logic
for all Tabs used in the app, or make this behavior optional by using
props?


![](https://assets-service.gitstart.com/28455/223c2e9f-3f4b-4107-b40d-f98a95266d5d.png)

### Demo


<https://www.loom.com/share/590df738a8ec41e6b64232bde237c01f?sid=7f8f4e40-ec82-4282-a43d-452a1cf27f4a>

### Refs

#7112

---------

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: Marie Stoppa <marie.stoppa@essec.edu>
2024-10-04 11:41:05 +02:00
gitstart-app[bot]
97eff774bd
Allow input and display of floats for Number fields (#7340)
### Description

- We added a decimal field for a Number Field type in the settings
- We updated the Number Field type create a form with decimals input
- We are not implementing the dropdown present on the Figma because it
seems not related

### Demo


<https://www.loom.com/share/18a8d4b712a14f6d8b66806764f8467f?sid=3fc79b46-ae32-46e3-8635-d0eee02e53b2>

Fixes #6987

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Marie Stoppa <marie.stoppa@essec.edu>
2024-10-04 10:45:25 +02:00
nitin
e3ed574420
minor fix - reset single entity search (#7420)
minor follow up fix #7285

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2024-10-03 22:31:03 +02:00
sid0-0
a946c6a33d
fix: validate emails in record-fields (#7245)
fix: #7149 

Introduced a minimal field validation framework for record-fields.
Currently only shows errors for email field.

<img width="350" alt="image"
src="https://github.com/user-attachments/assets/1a1fa790-71a4-4764-a791-9878be3274f1">
<img width="347" alt="image"
src="https://github.com/user-attachments/assets/e22d24f2-d1a7-4303-8c41-7aac3cde9ce8">

---------

Co-authored-by: sid0-0 <a@b.com>
Co-authored-by: bosiraphael <raphael.bosi@gmail.com>
Co-authored-by: Félix Malfait <felix@twenty.com>
2024-10-03 18:55:29 +02:00
nitin
04579144ca
Kanban card creation followup (#7285)
@Bonapara #7002
@FelixMalfait  #6316 
;)

Naming could be improved, do let me know!


https://github.com/user-attachments/assets/b10c9120-644d-4943-bc65-ec0d62f9986f
2024-10-03 17:50:54 +02:00
Marie
5f9435c718
Search (#7237)
Steps to test

1. Run metadata migrations
2. Run sync-metadata on your workspace
3. Enable the following feature flags: 
IS_SEARCH_ENABLED
IS_QUERY_RUNNER_TWENTY_ORM_ENABLED
IS_WORKSPACE_MIGRATED_FOR_SEARCH
4. Type Cmd + K and search anything
2024-10-03 17:18:49 +02:00
Keerat Kohli
4c250dd811
Fixes #7220: Remove primary banner icon when only one value present (#7275)
## Changes
- Added a check to make sure that we only indicate an entry is primary
if there is more than one value.

- The banner icon now only displays when there are either **2 or more
emails, phone numbers, or domains.**

## Emails

![image](https://github.com/user-attachments/assets/54832aaf-a319-4b70-87bf-3621e05f1637)


![image](https://github.com/user-attachments/assets/44bb8909-9f34-426d-8942-2bb7974e9113)

## Phones

![image](https://github.com/user-attachments/assets/85ca4c36-c148-4d86-89d6-1c02a960f2f4)


![image](https://github.com/user-attachments/assets/f11b5c2e-4376-4bf6-8560-e4c956f2c2e5)

## Domains

![image](https://github.com/user-attachments/assets/ce324714-6bd7-45ac-9a2f-8a2671d080a0)


![image](https://github.com/user-attachments/assets/153883a3-782f-424b-abc4-d882ec969bc2)

## Notes
This is my first time contributing so I am open to any feedback.

Co-authored-by: Keerat Kohli <kkeerat012@gmail.com>
2024-10-03 17:17:45 +02:00
Harshit Singh
8350e7d808
fix: Toggle not visible in light mode (#7322)
> [!Note]
> - This PR solves the issue #7321 
> - Added a minor fix in color background of toggle

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2024-10-03 16:35:18 +02:00
martmull
62fe1d0e88
6653 serverless functions store and use environment variables in serverless function scripts (#7390)
![image](https://github.com/user-attachments/assets/a15bd4c1-3db4-4466-b748-06bdf3874354)

![image](https://github.com/user-attachments/assets/71242dfb-956b-43ed-9704-87cb0dfbc98d)
2024-10-03 13:56:17 +02:00
Harshit Singh
3cd24d542b
Resolved Typescript console errors (#7408)
## Description

- This PR addresses the issues-
   - #7404 
   -  #7359 
   - and builds on the existing logic from PR #7360
   
- Handled the 4 Ts console errors

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2024-10-03 12:02:51 +02:00
Ngan Phan
da69317837
fix: zero showing in record cell and page (#7384)
This PR fixes zero being displayed as empty in record cell and show page
in currency field #6802
I checked graphql resquests and the data is stored in the correct form
(0 or null). The problem only lies in the front end and how the field is
null checked.

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2024-10-03 11:41:50 +02:00
Prakhar Sharma
b8e406c13a
Fixed button group spacing of dropdown button (#7409)
#7386

---------

Co-authored-by: Nitin Koche <nitinkoche03@gmail.com>
2024-10-03 02:41:24 +05:30
Vardhaman Bhandari
2e962f8e0e
Vertically center Kanban card titles in compact mode (#7391)
This PR addresses the issue of[ Kanban card titles not being vertically
centered in compact
mode](https://github.com/twentyhq/twenty/issues/7385). The following
changes have been made:

Updated CSS styles to ensure that titles are properly aligned vertically
within their respective cards when in compact mode.
Enhanced overall readability and aesthetics of the Kanban board.
#7385


![after-fix](https://github.com/user-attachments/assets/0d88d3c9-5f41-42de-a7a6-9434fd65bd38)

Co-authored-by: Nitin Koche <nitinkoche03@gmail.com>
2024-10-03 01:52:45 +05:30
Gaz Jones
b39d262058
fix: replace defaultProps with default parameters in SpreadsheetImport (#7406)
This PR addresses https://github.com/twentyhq/twenty/issues/6827

React has deprecated the use of `defaultProps` on function components
and will remove support in a future major release. This commit replaces
the usage of `defaultProps` in the `SpreadsheetImport` component with
default parameters to fix the following warning:

**Changes:**

- Removed `SpreadsheetImport.defaultProps =
defaultSpreadsheetImportProps;`
- Merged `defaultSpreadsheetImportProps` with incoming `props` using
object spread syntax.
- Adjusted the component to use the merged props (`mergedProps`) instead
of `props`.
2024-10-02 20:30:39 +02:00
nitin
83e43366bb
Delete button in right drawer / side pannel (#7200)
fixes #7069 
@Bonapara 


https://github.com/user-attachments/assets/b1b57070-1ef4-4cc3-9907-028219245558

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2024-10-02 20:22:55 +02:00
gitstart-app[bot]
35788af351
TWNTY-6808 - Ability to Filter by Creation Source (#7078)
### Description

- Ability to Filter by Creation Source

### Demo

LOOM:
<https://www.loom.com/share/dba9c3d37a4242fe90f977b1babffbde?sid=59b07c51-d245-43cc-bb38-7d898ef72878>

### Refs

#6808

Fixes #6808

---------

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: bosiraphael <raphael.bosi@gmail.com>
2024-10-02 17:56:09 +02:00
gitstart-app[bot]
23001ac17d
Settings Advanced Mode (#7130)
### Description

- We implemented the Advanced Mode state and used this on a section of
the settings sidebar
- in DefaultLayout.tsx, was updated because of the 64 + 16(container
size of IconTool + the margins)

### <https://jam.dev/c/29bcec70-0b7f-4afa-98e6-9755657cf09d>

### Refs

#6147 

Fixes #6147

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: gitstart-twenty <140154534+gitstart-twenty@users.noreply.github.com>
2024-10-02 17:04:07 +02:00
Ngan Phan
57eaa01d35
Adjust Floating Input Padding and Border Color (#7328)
This PR fix the padding and border color of floating text input #7286 
The text area automatically has padding of 4px so I reset it to 0 and
adjusting container padding to 8px.
2024-10-02 09:39:46 +02:00
Yura Levchenko
d7dd41e7e4
Changed condition on which 'Add task' button is displayed (#7333) (#7362)
This PR addresses issue #7333. It updates the condition for displaying
the 'Add task' button. The button is now only visible for the 'TODO'
section or when no 'TODO' block is present (i.e., there are no tasks in
this category).
Additionally, I removed the unused showAddButton, which is no longer
necessary due to the updated logic.

![image](https://github.com/user-attachments/assets/571542d7-1b0f-4b91-afcf-4592490f1f72)

![image](https://github.com/user-attachments/assets/46974459-d3cd-497a-a6b6-9302cbff7716)

---------

Co-authored-by: Nitin Koche <nitinkoche03@gmail.com>
2024-10-02 08:58:51 +02:00
Baptiste Devessier
35361093bf
Delete workflow step (#7373)
- Allows the deletion of triggers and steps in workflows. If the
workflow can not be edited right now, we create a new draft version.
- The workflow right drawer can now render nothing. It's necessary to
behave that way because a deleted step will still be displayed for a
short amount of time in the drawer. The drawer will be filled with blank
content when it disappears.


https://github.com/user-attachments/assets/abd5184e-d3db-4fe7-8870-ccc78ff23d41

Closes #7057
2024-10-01 18:14:54 +02:00
Harshit Singh
3a0c32a88d
fix: Remove many to many relation option (#7360)
## Description

- This PR addresses the issue #7359
2024-10-01 15:58:19 +02:00
nitin
c505a8edd2
minor fix - fixed forwardRef and unique key console errors (#7337)
context -  #7183
2024-10-01 15:53:59 +02:00
Thomas des Francs
a940912edb
Github banner (#7371) 2024-10-01 15:29:35 +02:00
Charles Bochet
4008f8f40e
Add redis to contributor guide (#7369)
## Context

We are adding redis to default twenty configuration. 

## What

1. This PR sets up the local setup for contributors accordingly

2. I'm also updating the code blocks guide:

Before:
<img width="921" alt="image"
src="https://github.com/user-attachments/assets/2203cc99-b5a5-4d05-a8b1-98a348aee9df">


After:
<img width="921" alt="image"
src="https://github.com/user-attachments/assets/5b3e6f34-723d-4309-888b-c02ce794891d">
2024-10-01 15:21:45 +02:00
Baptiste Devessier
cde255a031
Add workflow email action (#7279)
- Add the SAVE_EMAIL action. This action requires more setting
parameters than the Serverless Function action.
- Changed the way we computed the workflow diagram. It now preserves
some properties, like the `selected` property. That's necessary to not
close the right drawer when the workflow back-end data change.
- Added the possibility to set a label to a TextArea. This uses a
`<label>` HTML element and the `useId()` hook to create an id linking
the label with the input.
2024-10-01 14:22:14 +02:00
Sachin
0d570caff5
Fix cursor should not be pointer when record image identifier is not Editable (#7320)
- This PR solves the issue Cursor should not be "pointer" when record
image identifier is not editable #7277

---------

Co-authored-by: Sachin KS <mac@apples-MacBook-Air.local>
2024-10-01 09:02:13 +02:00
Thomas Trompette
ca027d6772
Add output to workflow run (#7276)
Example of output stored for following workflow:

<img width="244" alt="Capture d’écran 2024-09-27 à 11 18 06"
src="https://github.com/user-attachments/assets/722bfa96-2dd1-41f7-ab87-d39584ac9efc">

Output:

```
{"steps": [
  {"type": "CODE", "result": {"email": "test@twenty.com"}}, 
  {"type": "SEND_EMAIL", "result": {"success": true}}
]}
```
2024-09-30 18:45:44 +02:00
Weiko
06d4ba92e5
increase export feature page size (#7341)
## Context
Now that we have improved performances, we can increase the export
feature page size from 30 to 200 (and probably above if results are
good). This should be ok since we are only querying the first level of
an object and omit relations.
I've moved this value to a constant.
2024-09-30 15:45:17 +02:00
Harshit Singh
95e1053b7a
fix: Title overflows in mobile viewport for right drawer (#7311)
## Description

- This PR solves the issue #7310
2024-09-30 12:13:33 +02:00
Charles Bochet
1e4ed1e96f
Tag main as 0.31 canary (#7332)
We are updating our git worklow.

Case 1: **URGENT / PATCH**
If you want to include something URGENT that cannot wait for the next
release, you'll need to:
- create a PR from the latest patch (right now v0.30.1)
- create a new patch tag from this PR (would be v0.30.2 right now)
- merge this PR in main so it's in 0.31 too

Case 2: **REGULAR**
- Open a PR from main and merge it into main

I'm tagging main as v0.31.canary to make it clear!
2024-09-30 11:42:06 +02:00
Baptiste Devessier
5d1208f8af
Set default zoom to workflows (#7331)
## Improvements

- This PR calls `fitView` when the Reactflow component inits. It tries
to fit the flow in a view with a fixed min and max zoom.
- Every time the WorkflowDiagramCanvas is rendered for a different
`workflowVersionId`, the `fitView` will be re-called. This is
implemented with a React `key`.
- The canvas will be re-rendered when an activated/deactivated version
is updated (and a new draft version is created.)
- It will also be re-rendered when the user selects another workflow
version and this doesn't cause the `WorkflowDiagramCanvas` component to
unmount. It happens if the user wants to go the previous or next
workflow or workflow version.

## Previous Behavior

![CleanShot 2024-09-30 at 10 32
06@2x](https://github.com/user-attachments/assets/ea43cd43-8c9c-491c-a535-8cca9168fb22)

## New Behavior

![CleanShot 2024-09-30 at 10 26
47@2x](https://github.com/user-attachments/assets/7bfb91b2-1782-47a1-ab5a-3eaa9f1be923)


https://github.com/user-attachments/assets/cb73f456-58b1-49c3-bd31-a1650810e9dd

## Notes

Closes #7047

This PR is a simplification of #7151. We'll have to improve the way we
manage zoom in another PR.
2024-09-30 11:24:57 +02:00
Vardhaman Bhandari
04adcbc521
Fix icon resizing issue for Notes and Tasks (#7318)
This pull request addresses a [resizing issue with the Notes and Tasks
icons](https://github.com/twentyhq/twenty/issues/7282). Previously, the
icons would change size based on the length of the title or when the
column width was adjusted, leading to inconsistent UI behavior. This
update ensures that the icons maintain a stable size, enhancing the
overall user experience.

Solves Issue : #7282


[twenty-icon-sizing-issue.webm](https://github.com/user-attachments/assets/3ef59592-4dfb-463e-bc7b-a803ee105211)
2024-09-30 11:23:55 +02:00
Baptiste Devessier
eb04925f06
Remove useless hook call (#7278)
Hook is no longer used after #7236
2024-09-30 10:50:42 +02:00
nitin
dd24662590
Remove extra Billing title (#7309)
fixes #7305
2024-09-30 14:15:57 +05:30
Lucas zapico
b5fff7f23a
docs: enhance localhost documentation with REST API URL (#7317)
- Add callout for local REST API URL alongside the GraphQL API URL.
- This change aims to reduce confusion and complexity for the
self-hosted community.

**Associated Issue - "(Docs) Enhance local hosting docs with reference
to the REST API URL as well as the Graphql API URL [#7316]"**
2024-09-29 11:33:45 +02:00
Charles Bochet
c2a8cd0a2f
Support Emails and Phones in Spreadsheet import (#7312)
This is a fast follow on v0.30 release:
- removing phone (deprecated PHONE field type) search from command menu.
I could have replaced it by a phone (PHONES field type) search but as we
are about to release the new search in v0.31 it does not seem to worse
the investment
- supporting EMAILS and PHONES field types in spreadsheet import

Note: while working on Spreadsheet import I found the code quite complex
and with areas having duplicated code. It does not seem to be a high
priority as I was able to maintain it at a low cost but it's not a
peaceful code surface to navigate!
2024-09-28 16:11:10 +02:00
Charles Bochet
e4959ad534
Add 0.30 release notes (#7300)
In this PR:
- update your environment variables to default `CACHE_STORAGE_TYPE` to
`redis` and `MESSAGE_QUEUE_TYPE` to `bull-mq`
- add redis container to our default docker-compose
- add `REDIS_HOST` and `REDIS_PORT` to docker-compose yaml
- add upgrade instructions
2024-09-27 19:10:26 +02:00
Weiko
ae6777fab8
Fix viewFilter operand for dateTime fields (#7306) 2024-09-27 19:10:18 +02:00
Raphaël Bosi
942281f4b0
Fix email migration (#7298)
Checks if person standard email field exists before running the
migration.
2024-09-27 17:20:15 +02:00
Marie
e28d8dd952
Fix standardId issues with phones field migration (#7294)
Co-authored-by: Weiko <corentin@twenty.com>
2024-09-27 16:52:06 +02:00
Raphaël Bosi
9f477129e2
Fix use object metadata item (#7297)
Fixes a bug which happened during workspace creation and remove
duplicated code
2024-09-27 16:42:35 +02:00
ad-elias
9d36493cf0
Date filter improvements (#5917) (#7196)
Solves issue #5917.

This PR is now ready for the first review!

Filters do not fully work yet, there's a problem applying multiple
filters like the following:

```
{
  and: [
    {
      [correspondingField.name]: {
        gte: start.toISOString(),
      } as DateFilter,
    },
    {
      [correspondingField.name]: {
        lte: end.toISOString(),
      } as DateFilter,
    },
  ],
}
```

I'll do my best to dig into it tonight!

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2024-09-27 15:57:38 +02:00
Raphaël Bosi
c9c2f32922
7154 deleted event is not emitted when calling destroyone (#7159)
Closes #7154
2024-09-27 15:52:04 +02:00
nitin
ca906bbf6b
5922 - UI Overlap and State Persistence in Filter Menus (#7270)
fixes #5922 


https://github.com/user-attachments/assets/07d088da-cefb-4d87-9016-e14cef18567d
2024-09-27 14:20:21 +02:00
Rishi Kant
c4762c3921
Add Header to Email & Calendar Tabs #7288 (#7293)
# Fix: 7288 - Add Header to Email & Calendar Tabs (No Account Connected)

## Description
Added a header to the **Email** and **Calendar** tabs when no account is
connected, matching the style and spacing of the account page to prevent
layout issues when switching between pages.

### Header Content:
- **Connected Accounts**
- **Manage your internet accounts**

## Screenshot:
<img width="1440" alt="Screenshot 2024-09-27 at 5 20 55 PM"
src="https://github.com/user-attachments/assets/0c641dd6-e17f-47c4-9e30-45a3f8a9eac9">


Fixes #7288

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2024-09-27 14:09:33 +02:00
Harshit Singh
c6d763ede9
fix: Cursor pointer on Settings cards (#7291)
> [!Note]
> This PR solves the issue #7289
2024-09-27 13:33:33 +02:00
Félix Malfait
2f41e1405f
Change tinybird event format (#7272)
Separate pageview analytics from core events
2024-09-26 17:23:58 +02:00
Félix Malfait
a10324cbd3
Fix analytics (#7271)
Incorrect check
2024-09-26 16:42:16 +02:00
Raphaël Bosi
0e375d9021
Add phone fields migration command to 0 30 (#7269)
Add phone fields migration command to 0 30
2024-09-26 15:26:58 +02:00
Thomas Trompette
6736ca784b
Update clean view command + add dry run to favorite backfill (#7268)
Clean favorites associated with activities
2024-09-26 15:00:47 +02:00
Marie
c1db435a79
Fix email migration script (#7267) 2024-09-26 14:36:19 +02:00
Raul Villarreal
d504a6c437
Fix: Remove 'Soon' integrations from Settings when disabled (#7259)
## Description
This PR addresses issue #7110, where Airtable, Stripe and PostgreSQL
integrations were showing as "Soon" under Settings > Integrations.

## Changes

- Update `getSettingsIntegrationAll` so that when these integrations are
disabled (via feature flags), they are removed from the list instead of
showing as "Soon".
<img width="569" alt="Screenshot 2024-09-25 at 11 21 07 a m"
src="https://github.com/user-attachments/assets/dae34e1f-b231-4e0c-bbd0-7d43a6a2f94a">

- Tweaked `useSettingsIntegrationCategories` to only show the "All"
category if there's at least one integration enabled.
<img width="582" alt="Screenshot 2024-09-25 at 11 21 15 a m"
src="https://github.com/user-attachments/assets/57b87b18-8018-49e5-a507-527f2e6e701b">

## Notes
This is my first contribution to the project, so I'm open to feedback! 😄
Let me know if there's anything I should tweak or improve.
2024-09-26 11:19:12 +02:00
Ana Sofia Marin Alexandre
16bb1f22e4
Connect EventTracker to TB endpoint (#7240)
#7091 
EventTrackers send information of events to the TinyBird instance:

In order to test:

1. Set ANALYTICS_ENABLED= true and TELEMETRY_ENABLED=true in
evironment-variables.ts
2. Set the TINYBIRD_TOKEN in environment variables (go to TiniyBird
Tokens)
3. Log in to twenty's TinyBird and go to datasources/analytics_events in
twenty_analytics workspace
4. Run twenty and navigate it
5. New events will be logged in the datasources, containing their
timestamp, sessionId and payload.

<img width="1189" alt="Screenshot 2024-09-24 at 17 23 01"
src="https://github.com/user-attachments/assets/85375897-504d-4e75-98e4-98e6a9671f98">
Example of payload when user is not logged in

```
{"hostName":"localhost",
"pathname":"/welcome",
"locale":"en-US",
"userAgent":"Mozilla/5.0",
"href":"http://localhost:3001/welcome",
"referrer":"",
"timeZone":"Europe/Barcelona"}
```
Example of payload when user is logged in
```
{"userId":"2020202",
"workspaceId":"202",
"workspaceDisplayName":"Apple",
"workspaceDomainName":"apple.dev",
"hostName":"localhost",
"pathname":"/objects/companies",
"locale":"en-US",
"userAgent":"Mozilla/5.0Chrome/128.0.0.0Safari/537.36",
"href":"http://localhost:3001/objects/companies",
"referrer":"",
"timeZone":"Europe/Paris"}
```

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2024-09-26 10:53:10 +02:00
ad-elias
c9e882f4c0
Fix LinkedIn URL special character formatting (#7249)
Before:
<img width="348" alt="link-formatting-before"
src="https://github.com/user-attachments/assets/500344e9-09f2-4a3e-99cc-6a3f1eb2685b">

After:
<img width="348" alt="linkedin-formatting-after"
src="https://github.com/user-attachments/assets/b5d845c8-8f25-493b-8fe1-ed79f3c0bbdd">

Co-authored-by: Nitin Koche <nitinkoche03@gmail.com>
2024-09-25 18:40:04 +02:00
nitin
7752510316
Kanban card creation revamp (#7169)
fixes #6957
2024-09-25 18:30:39 +02:00
sid0-0
89b50c020f
Fixing last column width in table-view (#7258)
fixes: #7160 

`table-layout: fixed` requires a width, added that.

Screenshots:
<img width="1509" alt="image"
src="https://github.com/user-attachments/assets/edb4f900-bc83-4aa4-bcce-85d73c0015d6">
<img width="1507" alt="image"
src="https://github.com/user-attachments/assets/79b28ad1-2a02-4d85-b991-55c545adaa36">

Small screen:
<div style="display:flex;">
<img width="40%" alt="image"
src="https://github.com/user-attachments/assets/26234bdc-163f-48ba-a04d-eef3b9112de6">
<img width="40%" alt="image"
src="https://github.com/user-attachments/assets/4fe653d1-703d-4ef6-b256-30996de1fa13">
</div>

---------

Co-authored-by: sid0-0 <a@b.com>
2024-09-25 18:25:58 +02:00
Baptiste Devessier
729c990546
Activate/Deactivate workflow and Discard Draft (#7022)
## Setup

This PR can be tested only if some feature flags have specific values:

- `IsWorkflowEnabled` equals `true`
- `IsQueryRunnerTwentyORMEnabled` equals `false`

These feature flags weren't committed to don't break other branches.

## What this PR brings

- Display buttons to activate and deactivate a workflow version and a
button to discard the current draft version. I also scaffolded a "Test"
button, which doesn't do anything for now.
- Wired the activate, deactivate and discard draft buttons to the
backend.
- Made it possible to "edit" active and deactivated versions by
automatically creating a new draft version when the user tries to edit
the version.
- Hide the "Discard Draft", button if the current version is not a draft
or is the first version ever created.
- On the backend, don't consider discarded drafts when checking if a new
draft version can be created.
- On the backend, disallow deleting the first created workflow version.
Otherwise, we will end up with a blank canvas in the front end, and it
will be impossible to recover from it.
- On the backend, disallow running deactivation steps if the workflow
version is not currently active. Previously, we were throwing, which is
unnecessary as it's a valid case.

## Spotted bugs that we must dive into

### Duplicate workflow versions in Apollo cache


https://github.com/user-attachments/assets/7cfffd06-11e0-417a-8da0-f9a5f43b84e2

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-09-25 18:09:31 +02:00
Harshit Singh
75b493ba6c
fix: Values field card lacks width in mobile viewports (#7248)
## Description

- This PR fixes the issue #7230 

## Current Behaviour
<img width="411" alt="Screenshot 2024-09-24 at 9 51 42 AM"
src="https://github.com/user-attachments/assets/65d283b8-24fa-4e25-b3bd-2e35efabf768">

## After

<img width="556" alt="Screenshot 2024-09-25 at 10 38 40 AM"
src="https://github.com/user-attachments/assets/97a32497-4230-438f-b048-707bdcd9b674">

<img width="578" alt="Screenshot 2024-09-25 at 10 38 52 AM"
src="https://github.com/user-attachments/assets/74e7d055-96fc-4bf4-bddc-e84cf03a6599">
2024-09-25 17:56:47 +02:00
Raphaël Bosi
3d5ecc9c08
7242 error when displaying message threads with a large number of participants (#7251)
Closes #7242
2024-09-25 16:53:18 +02:00
Weiko
7669b40543
Fix calendar page without account (#7256)
More details in this PR https://github.com/twentyhq/twenty/pull/7202

We(I) forgot to fix on the calendar page.
2024-09-25 16:15:52 +02:00
Marie
e1cb82bb23
[Phones migration](fix) update label of standard field by using raw query (#7255) 2024-09-25 16:09:55 +02:00
Marie
97ce100fa2
[Phone field migration][fix] Update field label (#7247) 2024-09-25 14:06:03 +02:00
Thomas Trompette
49b5e53ceb
Add index key to tasks and notes views (#7241)
Missing INDEX key for some tasks and notes views. We need it to backfill
favorites.
2024-09-25 11:51:25 +02:00
ad-elias
092496f2db
'Display as relative date' field formatting option for dateTime and date fields #5398 (#6945)
Implements #5398.

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
Co-authored-by: Félix Malfait <felix@twenty.com>
2024-09-25 11:42:16 +02:00
Marie
b3a0cba961
[Phones migration][Fix] Remove field from view after creation (#7243) 2024-09-25 11:31:07 +02:00
Harshit Singh
7c90e717d6
fix: Phone dropdown field has extra width (#6866)
## Description

This PR solves the issue #6865 

## Current Behaviour
<img width="486" alt="Screenshot 2024-09-03 at 2 04 55 AM"
src="https://github.com/user-attachments/assets/c88f3c22-0b18-4974-a4ea-94ecd5f1379d">

## Expected behavior
<img width="518" alt="Screenshot 2024-09-03 at 2 05 46 AM"
src="https://github.com/user-attachments/assets/2a6cb64a-7858-4607-85a4-0214aeacc2ab">
2024-09-24 17:21:29 +02:00
Marie
825dfeb400
[fix][Phone field migration] Use "Phones" in new field label (#7239) 2024-09-24 17:20:15 +02:00
Falgun Patel
fd6740fa88
fix issue (#7152 : Improve relation empty states on record page) (#7157)
- "No xxx" removed for empty relations
- All(0) removed

---------

Co-authored-by: Raphaël Bosi <71827178+bosiraphael@users.noreply.github.com>
2024-09-24 17:02:58 +02:00
Harshit Singh
2fedf0d2fc
fix: onEnter creating new function page in settings (#7236)
## Description

- This PR solves the issue #7235 
- On pressing enter, it automatically redirected to New function page in
settings
2024-09-24 16:43:03 +02:00
gitstart-app[bot]
fa241fa4e9
Handle migration of Phone field to Phones field (#7128)
This PR was created by [GitStart](https://gitstart.com/) to address the
requirements from this ticket:
[TWNTY-6260](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-6260).
This ticket was imported from:
[TWNTY-6260](https://github.com/twentyhq/twenty/issues/6260)

 --- 

### Description

This is the second PR on TWNTY-6260 which handles data migration of
Phone field to Phones field.\
\
How to Test?\
 Follow the below steps:

- On the main branch, 
- go to
`packages/twenty-server/src/database/typeorm-seeds/workspace/people.ts`
and change any person's phone number to a string with characters for
example: "test invalid phone", and then reset the DB.
  - reset database using `npx nx database:reset twenty-server`
- This is to make sure that invalid numbers will be handled properly. We
should use the invalid value itself to avoid removing data and see how
the behavior is on the front end. should be the same as in the main, the
display shows the invalid value, but the input is empty when you click,
and then you can update.
- Checkout to `TWNTY-6260-phone-migration` branch
- Rebuild typescript using `npx nx build twenty-server`
- Run command `yarn command:prod upgrade-0.32` to do migration
- Run both backend and frontend to see the migrated field

### Demo

- **Loom Video:**\

<https://www.loom.com/share/4b9bcb423cee447d8ad09852a83b27da?sid=ed74ecaa-0339-4575-acdc-a863e95e94fd>

### Refs

#6260

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Marie Stoppa <marie.stoppa@essec.edu>
Co-authored-by: Weiko <corentin@twenty.com>
2024-09-24 16:31:30 +02:00
Raphaël Bosi
b83f0f46e5
Add try catch around messaging monitoring cron and fix decorators (#7207)
Add try catch around messaging monitoring cron and fix
decorators:`@Process` and `@SentryCronMonitor` were inverted.
2024-09-24 16:29:05 +02:00
Raphaël Bosi
4d31995564
Remove shouldUseEmailsField (#7208)
Remove shouldUseEmailsField. This boolean was used to ensure
retro-compatibility with the old email field. It is no longer needed.
2024-09-24 16:03:43 +02:00
Rishi Kant
8385d3cfdf
fix: #7226 - Improve photo uploader design (#7234)
## Description

### Changes Made

- **Icon Size and Style**: Resized the icon**.
- **Icon Update**: Changed to **photo-up**.
- **Background Color**: Set to **transparent light**.
- **Hover Background Color**: Set to **transparent medium**.
- **Border**: Set to **Border/medium**.
- **Icon Color on Hover**: Set to **light** and **tertiary**.

## Preview of the changes made -

https://github.com/user-attachments/assets/72219531-7ffe-47b5-bae9-216764df68ee
2024-09-24 15:45:59 +02:00
Harshit Singh
c3e79e54b5
fix: Appearance Settings Cropped Card (#7232)
## Description

- This PR fixes the issue #7198

## Before 
<img width="592" alt="Screenshot 2024-09-24 at 10 58 13 AM"
src="https://github.com/user-attachments/assets/a3ffd558-d00b-4bff-bf1e-d2533fcbc3c1">


## After

<img width="671" alt="Screenshot 2024-09-24 at 10 57 31 AM"
src="https://github.com/user-attachments/assets/1ac97aa7-2d38-422b-bf34-21b832c989da">
2024-09-24 15:20:47 +02:00
nitin
fcaa9d9aed
Introduced Specific Icons image identifier for Notes and Tasks (#6997)
Fixes #6486
2024-09-24 15:17:20 +05:30
Marie
e3547582d0
Fix demo seeds (#7204) 2024-09-23 15:13:46 +02:00
Weiko
d8e16cbfd1
Fix IN filter with empty array (#7202)
## Context
The api currently allows empty array in the IN filter but the expected
behaviour is not very clear. Typeorm seems to return all records when it
is empty which could lead to undesired result. Instead we decided to
throw an error.
I've updated the FE accordingly to skip calls when array is empty.

<img width="696" alt="Screenshot 2024-09-23 at 14 20 28"
src="https://github.com/user-attachments/assets/4b641430-ff17-40a6-bbc5-75e9a1d55f50">
2024-09-23 15:12:49 +02:00
Thomas Trompette
bb875b1ea8
Fix lambda creation (#7201)
As title
2024-09-23 14:28:22 +02:00
Weiko
c8e171a929
Fix paginated order by with composite fields (#7187)
## Context
Cursor is modifying the where object but does not handle properly
composite fields. I'm introducing field metadata as a source of truth to
fix this issue.
RAW_JSON for example (as a sub-field type) should be ignored in a lt/gt,
probably other field types as well.

## Before
```typescript
[
  {
    emails: {
      lt: {
        primaryEmail: "brenda.brown@example.com",
        additionalEmails: null,
      },
    },
  },
  {
    emails: {
      eq: {
        primaryEmail: "brenda.brown@example.com",
        additionalEmails: null,
      },
    },
    position: {
      gt: 877,
    },
  },
  {
    emails: {
      eq: {
        primaryEmail: "brenda.brown@example.com",
        additionalEmails: null,
      },
    },
    position: {
      eq: 877,
    },
    id: {
      gt: "fe43c45d-7560-4eb1-8fd3-c48fd0a4dcd4",
    },
  },
]
```


## After
```typescript
[
  {
    emails: {
      primaryEmail: {
        lt: "brenda.brown@example.com",
      },
    },
  },
  {
    emails: {
      primaryEmail: {
        eq: "brenda.brown@example.com",
      },
    },
    position: {
      gt: 877,
    },
  },
  {
    emails: {
      primaryEmail: {
        eq: "brenda.brown@example.com",
      },
    },
    position: {
      eq: 877,
    },
    id: {
      gt: "fe43c45d-7560-4eb1-8fd3-c48fd0a4dcd4",
    },
  },
]
```
2024-09-23 13:32:59 +02:00
nitin
aa7b3107f4
minor fix - email thread reply button stylings/corrections (#7168)
fixes #7155
2024-09-23 11:04:04 +02:00
Félix Malfait
8d496902b7
Fix linter (#7191)
Fix linter
2024-09-21 07:02:40 +02:00
Subham Sharma
4ed1eb581a
Set a unique constraint on email table in users #7180 (#7184)
Link to issue - https://github.com/twentyhq/twenty/issues/7180

File changed -
twenty/packages/twenty-server/src/engine/core-modules/user/user.entity.ts

---------

Co-authored-by: subham sharma <subham.sharma@smartbear.com>
Co-authored-by: Félix Malfait <felix@twenty.com>
2024-09-21 06:37:55 +02:00
Félix Malfait
6d5d73fbe8
Improve snackbar and fix sentry (#7181)
- Improve snackbar to enable displaying multi-line message (so far we
only displayed the first few words which was very frustrating)

- Followup on previous issue to enable tim@apple.dev on the demo
workspace (prefilled automatically)

- Fix sentry tracing which had been broken when migrating from v7 to v8
2024-09-21 06:33:15 +02:00
Raphaël Bosi
20d06b3c0f
7182 person avatar is not the same color in emails and calendar (#7185)
Fixes #7182 and displayName in calendar
2024-09-21 00:35:39 +02:00
Nabhag Motivaras
c97c71762e
fix: Input fields to have expected behaviour in case of empty / only whitespaces string (#6736)
# ISSUE
- Closes #6734
- Closes #6633
- Closes #6733
- Closes #6816

# Description

- [x] Don't allow Empty (whitespaces) Objects to Create, all the
keyboard shortcuts are also handled for this.



https://github.com/user-attachments/assets/1c9add4e-f13f-458b-8f76-63bd868413a2



https://github.com/user-attachments/assets/e72b6ee3-74e4-4517-a230-3eb10db80dc7

Note: we do have one other issue with FullName field #6740 Inorder to
test use **shift**.




- [x] Api Keys Input Name Field -> New and Detail View Name field
shouldn't be empty or string with whitespaces, we won't able to have
whitespaces in both. **Try Entering just spaces**



https://github.com/user-attachments/assets/b521b49f-648c-4585-9d15-8ff4faed3c3a


- [x] Similar to above, Empty webhook endpoint url under
**/settings/developers/webhooks/new** won't be created. **Try Entering
just spaces**

- [x] New Functions or Updating Functions will not able to have
whitespaces, empty string as Name. **Try Entering just spaces**



https://github.com/user-attachments/assets/09fcf394-c6d9-4080-8efd-462b054a22d0



- [x] under **settings/workspace-members** changes will lead and solve
that user won't be able to enter Invite by email as just whitespaces +
button is now getting disabled when there is no correct email. **Try
Entering just spaces**



https://github.com/user-attachments/assets/b352edfa-113b-4645-80fd-db6f120ab5db



- [x] Text Input Field, will not allow to start entering with
whitespaces and won't take just whitespaces as value spaces between
words will work.


https://github.com/user-attachments/assets/8c1a0812-45be-4ed2-bd3d-bb4f92147976

- [x] Similarly Number works as per above including shortcuts. 


https://github.com/user-attachments/assets/9f69cc87-5c3c-43ee-93c4-fa887bc0d7ee


- [x] Similarly FullName field works as per above including shortcuts



https://github.com/user-attachments/assets/7bb006b2-abf7-44cd-a214-7a2fc68df169

- [x] Pasting fullName is been Improved. 

- Case 1 (Two Words): If there are exactly two words, return them as is.
- Case 2 (More than Two Words): If there are more than two words, return
the first two words only.
- Case 3 (One Word): If there is only one word, return it as the first
name, with an empty string as the last name.
- WhiteSpaces have been handled. 

```
console.log(splitFullName("John     Doe")); // ["John", "Doe"]
console.log(splitFullName("        ")); // ["", ""]
console.log(splitFullName("John")); // ["John", ""]
console.log(splitFullName("  John   Doe  ")); // ["John", "Doe"]
console.log(splitFullName("John Michael  Andrew Doe")); // ["John", "Michael"]
```

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-09-20 21:25:50 +02:00
Thomas Trompette
c8c1890ad7
Safely parse phone numbers before display (#7186)
Timeline activity properties are stored as string rather than array.
Adding a safe parsing in front. Would be better to also update in
backend but doing this as a quick fix
2024-09-20 17:40:12 +02:00
Lucas Bordeau
25522752e4
View module refactor with atomic recoil component instance states (#6810)
This PR refactors the view module to implement utils that avoid having
to create hooks to inject the scope id in the states, like
`useViewStates`, each componentState will know its unique related
InstanceContext (which holds the instanceId), and thus will be able to
retrieve it itself.

We keep the naming componentState as it reflects the fact that those
states are tied to instances of a component (or its children).

We introduce the instance word where it is needed, in place of scopeId
for example, to precise the fact that we handle instances of component
state, one for each instance of a component.

For example, the currentViewId is a state that is tied to an instance of
the ViewBar, but as we can switch between views, we want currentViewId
to be a componentState tied to an instance of the ViewBar component.

This PR also refactors view filter and sort states to fix this issue :
https://github.com/twentyhq/twenty/issues/6837 and other problems
involving resetting those states between page navigation.

Fixes https://github.com/twentyhq/twenty/issues/6837

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-09-20 16:13:29 +02:00
Weiko
bebeb1515b
Add indexes to custom relations (#7156)
TODO: command to retro-actively create indexes to existing custom
objects
2024-09-20 15:06:26 +02:00
Félix Malfait
f845187f8e
Change demo account email (#7177)
Change the demo account's email to be able to set SIGN_IN_PREFIL = true
on demo.twenty.com
2024-09-20 13:55:46 +02:00
Lucas Bordeau
0aa48fb1e4
Fixed bug with record without activity target (#7175)
Fixed bug that was appearing with records without any activity target

The problem may come from the new TwentyORM that doesn't understand the
filter like before.
2024-09-20 12:53:29 +02:00
Subham Sharma
ebf677809a
Update System Data Type Names to Display 'System' #7136 (#7170)
Changes made in 

twenty/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectFieldItemTableRow.tsx

fixes #7136

Co-authored-by: subham sharma <subham.sharma@smartbear.com>
2024-09-20 11:44:28 +02:00
Harshit Singh
7967d2d643
fix: Update theme card width (#7147)
> [!Note]
> This PR solves the issue #7119 
> Updated the width of Style Color card from ` 120px `to ` 160px` for
better UI
2024-09-20 11:41:20 +02:00
Harshit Singh
e566b8d204
fix: Cropped company logos on the Companies Kanban (#7166)
> [!Note]
> This PR addresses the issue #7161 
> Removed margin right which made images crop.

## Before 

<img width="236" alt="Screenshot 2024-09-20 at 1 35 55 AM"
src="https://github.com/user-attachments/assets/21e56f6e-2860-4a85-a866-4b619b42b659">


## After

<img width="205" alt="Screenshot 2024-09-20 at 1 35 34 AM"
src="https://github.com/user-attachments/assets/8fdc2999-9f26-42e6-bbc5-e339a23db823">
2024-09-20 11:04:14 +02:00
Jérémy M
eef7f1661d
feat: add integration tests (#6923)
### Summary

This PR introduces several integration tests, a mix of manually written
tests and those generated using the `generate-integration-tests` Python
script located in the `scripts` folder.

### Tests Added:
- **Authentication tests**: Validating login, registration, and token
handling.
- **FindMany queries**: Fetching multiple records for all existing
entities that do not require input arguments.

### How the Integration Tests Work:
- A `setupTest` function is called during the Jest test run. This
function initializes a test instance of the application and exposes it
on a dedicated port.
- Since tests are executed in isolated workers, they do not have direct
access to the in-memory app instance. Instead, the tests query the
application through the exposed port.
- A static accessToken is used, this one as a big expiration time so it
will never expire (365 years)
- The queries are executed, and the results are validated against
expected outcomes.

### Current State and Next Steps:
- These tests currently run using the existing development seed data. We
plan to introduce more comprehensive test data using `faker` to improve
coverage.
- At the moment, the only mutation tests implemented are for
authentication. Future updates should include broader mutation testing
for other entities.

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-09-20 11:02:52 +02:00
Charles Bochet
7781d70bb8
Fix CSV export missing last page (#7167) 2024-09-20 05:42:59 +02:00
Weiko
b1889e4569
Fix nested relations (#7158)
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-09-20 05:16:13 +02:00
Raphaël Bosi
6a5f9492d3
7142 make messaging full message list fetch idempotent (#7148)
- Add message deletion and thread cleaning during full message list
fetch
- Add thread cleaning  during partial message list fetch
- Delete provider from cache key
2024-09-19 18:32:25 +02:00
Thomas Trompette
8964d26d5b
Clean views without object metadata (#7153)
Add command for cleaning + clean on object deletion
2024-09-19 18:13:07 +02:00
Félix Malfait
3025ac346c
Upgrade sentry (#7145)
Upgrave Sentry to v8 and add Sentry Cron monitoring

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-09-19 18:09:24 +02:00
gitstart-app[bot]
b3ed6cb903
[Bug] Select options names can't start with a number (#7079)
This PR was created by [GitStart](https://gitstart.com/) to address the
requirements from this ticket:
[TWNTY-6980](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-6980).
This ticket was imported from:
[TWNTY-6980](https://github.com/twentyhq/twenty/issues/6980)

 --- 

### Description

- **fix**: added a transformation step that prefixes the newly added
option with an underscore before the Graphql enum is generated so it
saves successfully and passes the default GraphQL validation.

### Demo

- <https://www.loom.com/share/feda2198ed8b4e558f96520a0d051725>

### Refs

#6980

Fixes #6980

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Weiko <corentin@twenty.com>
2024-09-19 14:05:28 +02:00
Weiko
e0ada0a8ee
Add deletedAt to foreignKey indexes (#7133)
We had to remove soft-deletion on default filters due to the missing
indexes. We now generate composite indexes with the foreign key
containing the deletedAt column as well which should improve
performances
2024-09-19 11:23:40 +02:00
Divyesh Patel
9d5b9f8415
Improved note cards design (#7129)
Fixes #7120

- Removed margin according to design
- Increased card content padding from 8px to 16px


![image](https://github.com/user-attachments/assets/bf1b2be4-7176-4af1-bad0-7e7f159b57c2)
2024-09-19 10:47:41 +02:00
Antoine Moreaux
89c97993e3
feat(invitation): Improve invitation flow - Milestone 2 (#6804)
From PR: #6626 
Resolves #6763 
Resolves #6055 
Resolves #6782

## GTK
I retain the 'Invite by link' feature to prevent any breaking changes.
We could make the invitation by link optional through an admin setting,
allowing users to rely solely on personal invitations.

## Todo
- [x] Add an expiration date to an invitation
- [x] Allow to renew an invitation to postpone the expiration date
- [x] Refresh the UI
- [x] Add the new personal token in the link sent to new user
- [x] Display an error if a user tries to use an expired invitation
- [x] Display an error if a user uses another mail than the one in the
invitation

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-09-18 23:27:31 +02:00
Weiko
ad18c44f25
Improve perf during repository creation in nested relations (#7132) 2024-09-18 21:54:22 +02:00
Weiko
210c336ccf
Fix performance (#7131) 2024-09-18 21:15:30 +02:00
Weiko
41fe8f7fea
Fix nested relations with large dataset in find queries (#7127)
## Before
<img width="920" alt="before"
src="https://github.com/user-attachments/assets/4809556f-0459-4f56-a716-b969a943d492">

## After
<img width="920" alt="after"
src="https://github.com/user-attachments/assets/504186b2-d002-482d-bc3e-2dda45c314b1">
2024-09-18 20:06:04 +02:00
Raphaël Bosi
1d56ace2af
Fix sync statuses on the fe (#7117)
Follows #6685
2024-09-18 18:46:39 +02:00
Weiko
02618b3e6a Fix graphql query createMany resolver with nested relations (#7061)
Looks like insert() does not return foreign keys. We could eventually
call findMany after but it seems that's what save() is doing so I'm
replacing insert with save.
```typescript
/**
 * Flag to determine whether the entity that is being persisted
 * should be reloaded during the persistence operation.
 *
 * It will work only on databases which does not support RETURNING / OUTPUT statement.
 * Enabled by default.
 */
reload?: boolean;
```

Note: save() also does an upsert by default with no way to configure
that so if we want to keep that behaviour we will need to add a check
before
```typescript
if (args.upsert) {
    const existingRecords = await repository.findBy({
      id: Any(args.data.map((record) => record.id)),
    });
    ...
```

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-09-18 18:45:52 +02:00
Thomas des Francs
147eaaa5b0
0.30 changelog (#7126) 2024-09-18 18:40:07 +02:00
Ana Sofia Marin Alexandre
cac3e116a3
Add SettingsCard for Config Data Type and Accounts Settings (#7093)
https://github.com/twentyhq/twenty/issues/6950
Add new Settings Card for Config Data Type and accounts Settings
Before:
<img width="707" alt="Screenshot 2024-09-11 at 17 43 16"
src="https://github.com/user-attachments/assets/63ff9373-fa86-4b22-8e8b-21483039c3be">
After:
<img width="755" alt="Screenshot 2024-09-17 at 14 15 18"
src="https://github.com/user-attachments/assets/213c24a1-dc1c-4ffb-8890-7c1f63ed376c">
<img width="755" alt="Screenshot 2024-09-17 at 14 15 38"
src="https://github.com/user-attachments/assets/0fc12d19-b92a-493d-80fa-0064cf491fbc">
2024-09-18 18:32:41 +02:00
Thomas Trompette
b1cb8998f8
Backfill workspace favorites (#7122)
- command to backfill workspace favorites
- create workspace favorites on workspace activation
- create workspace favorites on demo seed

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-09-18 18:26:55 +02:00
Charles Bochet
759eb3070e
Improve demo seed (#7125)
We have a few issues on demo seeding:
- redis metdata cache was not flushed
- server ram graphql schema cache was not cleared on metadata version
increment
2024-09-18 17:35:08 +02:00
Lucas Bordeau
c24076266b
Fixed scroll wrapper for settings page container (#7124)
Padding was set on global page component while it is needed only for
settings page container component.
2024-09-18 17:26:48 +02:00
Thomas Trompette
741a969cc1
Add fail on metadata cache miss (#7118)
- avoid failing when missing cache (used for command)
- remove unused load cache function. Cache will be always re-created
when trying to fetch if not existing
2024-09-18 15:40:24 +02:00
Heber Santiago Alvarez Rincon
44587b4908
enhance picture uploader, change justify content (#6974)
Fixes https://github.com/twentyhq/twenty/issues/6966

to put label in the place and change remove button to gray.

sorry you dont assign this to me but I want to help, hope that if 6
hours pass u could check it

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-09-18 15:08:28 +02:00
Raphaël Bosi
55a3ee2c3b
Modify messaging settings description (#7089)
Modify messaging settings description
2024-09-18 15:07:08 +02:00
Raphaël Bosi
66456828ab
7059 Fix email loading in the timeline (#7116)
Fixes #7059
2024-09-18 14:37:23 +02:00
Weiko
999974893c
Fix race condition with datasource creation (#7106)
## Context
We currently have a race condition when dealing with datasource
creation. This happen when multiple queries arrive at the same time (for
example graphql dataloaders) and the datasource is not created yet.
Since the datasource is stored in memory this can happen more often as
well and they were all triggering the datasource creation at the same
time.

I'm trying to fix the issue with promise memoization. Now, instead of
caching the datasource only, we also want to cache the promise of the
datasource creation and make the creation itself synchronous.

More info about promise memoization in this article for example:
https://www.jonmellman.com/posts/promise-memoization

Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>
2024-09-18 14:01:55 +02:00
Harshit Singh
94ba4c0558
fix: Tasks page overflows with large title and body (#6970)
## Description

This PR solves the issue #6968.

## Before


https://github.com/user-attachments/assets/7a18498e-1185-423e-922f-585d0f93eafb

- For responsive behaviour 

<img width="550" alt="Screenshot 2024-09-11 at 2 49 46 AM"
src="https://github.com/user-attachments/assets/db509b3a-2619-4045-90cd-af6ffdcb6bf5">


## Expected behavior


https://github.com/user-attachments/assets/3f64e246-6431-4eea-9acf-5bf124aadc22

- <img width="713" alt="Screenshot 2024-09-11 at 2 48 39 AM"
src="https://github.com/user-attachments/assets/e160c1ea-118f-4090-8af7-a3d6a7234b25">


## Edge cases

Edge cases handled -

- when date is added or removed, it doesn't effect the body or title
- Relations with long names don't affect the task body
- Short title and long description and long description and short title
are handled

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-09-18 14:00:48 +02:00
HKS07
cfc00c7924
Twnty-#6797 view/edit inactive feature (#6953)
This PR resolves the issue raised under #6797. Earlier no view/edit
option were present for inActive objects in data-model inside settings.
To resolve that following changes were done:

1. `SettingsObjectFieldItemTableRow` was not passing the onEdit with url
to `SettingsObjectFieldActiveActionDropdown` to redirect on clicking it.
So passed onEdit there.
2. `SettingsObjectFieldActiveActionDropdown` was not implementing the
onEdit functionality, so implemented that by creating `handleEdit()`
function.
3. `SettingsObjectFieldEdit` was assuming only `activeObjectMetadata
`will be coming to render on page. So, when inactive object was accessed
the path not found error message was thrown. Thus did changes to manage
both active and inactive objects by generalizing the
              `activeObjectMetadata ` ->  `objectMetadata` 
               `activeMetadataField `-> `metadataField`.
4. `findObjectMetadataItemBySlug `function was written inside
`useFilteredObjectMetadataItems` for fetching active/inactive object.
5. Updated `SettingsObjectFieldEdit` button to show and change the
active to inactive state and vice versa.
6. Test was written for `findObjectMetadataItemBySlug`.

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-09-18 12:01:21 +02:00
Shreyansh Kumar
df8bb84b35
Verification popup can be activated multiple times (#6938)
Fixes https://github.com/twentyhq/twenty/issues/6912

By clicking Enter key over and over, user can repeat action Expected:
When 'yes' is typed in popup and user clicks Enter key once, popup
should disappear and correlated action should be performed only once

Implementation:
- Added loading state for buttons onClick and onEnter to disable the
button when the "Delete Api Key" and "Regenerate Api Key" function is
called.
- Added a new function to handle modal close and logic handling on
clicking enter key.

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-09-18 10:48:49 +02:00
Faisal-imtiyaz123
72ab6bcf35
Fixes resetting of scroll position in RecordShowPage due to opening of some dropdowns (#6890) (#6906)
fixes #6890

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-09-18 10:35:13 +02:00
Pacifique LINJANJA
601e15f028
Feat(frontend): improve the soft delete empty state (#6877)
# This PR

- Fix #6834 

## Demo


https://www.loom.com/share/235c4425f3264f429e2064a9d1604a90?sid=02a815c9-3b1a-45e6-b5ce-d5eb3b40e10e

## Notes

- There is a missing icon in Figma corresponding to the
`noDeletedRecordFound` in the dark mode, thus I used the same icon
(different background because we have the correct background image) for
both dark / light modes
<img width="625" alt="Screenshot 2024-09-03 at 15 04 57"
src="https://github.com/user-attachments/assets/cbc0c3dd-a1ee-49a5-be9a-36450e78a992">
cc: @Bonapara

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-09-18 09:39:39 +02:00
Charles Bochet
9c885861a3 Add logs to troubleshoot performances issues 2024-09-18 00:10:35 +02:00
Raphaël Bosi
7cdf2dc4ec
7092 destroy connected account instead of soft deleting it (#7099)
- Create `destroyOne` endpoint
- Call `destroyOne` when removing a `connectedAccount`
2024-09-17 18:30:40 +02:00
gitstart-app[bot]
c42ea57b97
New Settings Layout (#6867)
#### \
Description

- **Added "Exit Settings" Back Button**: Introduced a new back button
labeled "Exit Settings" for easy navigation back to the app content.
- **Implemented Settings Navbar Breadcrumb**: A breadcrumb navigation
bar for each settings page has been added to improve navigation within
the settings. This ensures users can easily trace their location within
the settings.
- **Persistent CTA Zone**: The Call-to-Action (CTA) zone at the top of
the page now remains visible even when the user scrolls down, preventing
unresponsive behavior and improving accessibility.
- **Page Title**: The page title has been added to each settings page
and separated from the breadcrumb, following the app's layout standards.
- we could not reproduce the Billing and CMR Migrations settings on the
app, but we updated the files according, please let's us know if is
there any way to log in with access to these pages, or if is everything
ok.
- Some breadcrumbs are not following the Figma, are following the
current app sections isntead, because we would need to change the
sidebar structure, and we should not do it on this PR

### Demo


<https://www.loom.com/share/21b20a2cd2f3471e94d61563c9901b19?sid=9dc49456-6cae-48e1-9149-8d706f00ab65>

### Refs:

#6144

Fixes #6144

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-09-17 18:29:00 +02:00
Marie
fe4ca2133d
Fix search on email (#7094)
following email (text field type) -> emails (emails field type -
composite) migration!

closes https://github.com/twentyhq/twenty/issues/7080
2024-09-17 14:57:34 +02:00
nitin
3c306e9be8
relations header button to appear at all times for mobile devices (#7044)
fixes #7036
2024-09-17 11:51:13 +02:00
Marie
dcac832616
[Emails migration] Fix email field migration (#7065)
Fix email field migration

- Remove deprecated field of type Email
- Add standard emails field on person to person views in position 4
2024-09-16 19:35:13 +02:00
Harshit Singh
b0c9b9ebe2
fix: page header accessible when deleting webhook (#6985)
## Description

This PR resolves the issue #6817 

- while deleting webhook, page header is still accessible for both
mobile viewport and large devices
- When creating a webhook, save or cancel state is not accessible due to
page header being overflowed.
- Setting state breaks spaces resulting due to `max-width`

## Current Behaviour


https://github.com/user-attachments/assets/991b29ac-df1b-4250-8c83-444a36148a7f

<img width="430" alt="Screenshot 2024-09-11 at 4 23 51 PM"
src="https://github.com/user-attachments/assets/b2cadd50-7b0d-4b8e-86ff-cffedce65c91">

<img width="427" alt="Screenshot 2024-09-11 at 4 24 12 PM"
src="https://github.com/user-attachments/assets/fcb6dd71-bd3f-4307-82a1-29711688a2e7">

## Expected behavior


https://github.com/user-attachments/assets/cbac0b56-578f-49d5-a092-84f936016ca6

<img width="427" alt="Screenshot 2024-09-11 at 4 24 26 PM"
src="https://github.com/user-attachments/assets/e8eda096-c6d8-4e97-8c0b-44c522567d26">

---------

Co-authored-by: bosiraphael <raphael.bosi@gmail.com>
2024-09-16 17:55:49 +02:00
Divyesh Patel
3d9620a98c
fix: Company picker opening when it shouldn't (#7023)
### The Company Picker opens when it shouldn't.

Fixes #6989 

### Video


https://github.com/user-attachments/assets/a1e56418-8409-46e8-879a-d8335593ea28
2024-09-16 15:25:59 +02:00
Charles Bochet
03fa5913d8
Re-enable displaying one-to-many in table and kanban (#7053)
As per title
2024-09-16 15:20:08 +02:00
Raphaël Bosi
f1264fda76
Fix: Set sync stage started at when starting sync (#7046)
Fix:`syncStageStartedAt` was not set correctly after refactoring
2024-09-16 15:10:53 +02:00
Raphaël Bosi
833832525c
Create command to set stale message sync back to pending (#7048)
Some message channels are stuck in an ongoing `syncStage` because
`syncStartedAt` was not set correctly at the beginning of the sync.
This command resets message channels with an ongoing `syncStage` and
`syncStartedAt` set to null.
2024-09-16 15:10:42 +02:00
gitstart-app[bot]
8208a3e976
Introduce ARRAY field type (#6862)
This PR was created by \[GitStart\](<https://gitstart.com/>) to address
the requirements from this ticket:
\[TWNTY-6447\](<https://clients.gitstart.com/twenty/5449/tickets/TWNTY-6447>).

This ticket was imported from:
<https://github.com/twentyhq/twenty/issues/6447>

### Description

\- We added a new field type

### Refs

#6447

### Demo

<https://jam.dev/c/2b4d7853-ea89-4e9d-a561-6edcb4fdb34b>

Fixes #6447

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-09-16 14:07:55 +02:00
Weiko
bc99cfec98
0-30-set-custom-object-is-soft-deletable.command (#7045)
This command was supposed to set all custom objects as softDeletable.
After some discussion we realised this bool was not used as intended so
we are removing it all together until we find a better usage (remote
objects for example). This PR removes the command which won't be needed
anymore
2024-09-16 13:53:27 +02:00
Weiko
31dea498e9 Remove objectMetadata isSoftDeletable 2024-09-16 13:40:10 +02:00
Weiko
37d85a716a
[flexible-schema] Add createOne/createMany with upsert to graphql query runner (#7041)
## Context
This PR introduces createOne/createMany through the new graphql query
runner.
Trying to use twentyOrm wrapper as much as possible, in this case here
the args are already converted from "metadata-like" structure (including
composite fields) as graphql input to typeorm / raw columns (I had to
introduce a little fix there).

Keep in mind that I'm not using the new graphql query runner parsing
classes here, especially the selected-fields part, because typeorm
already returns all the record columns in the InsertResult object
(including default values such as id, createdAt, ...). That also means
relation objects will be returned as NULL in the gql response but we
don't handle nested creation for the moment so it should be fine.

Note: also removing the feature flag from findOne/findMany
2024-09-16 12:20:04 +02:00
Félix Malfait
64756dc699
Fix contributor script (#7040)
We had an issue affecting twenty.com/contributors ; this should probably
fix it
2024-09-16 10:55:20 +02:00
Charles Bochet
872f52990a
Optimize migrate-email-fields-command (#7035)
Quick follow up to prepare for 0.30 release
2024-09-15 13:13:35 +02:00
Charles Bochet
f54eea0227
Optimize sync, reset, seed commands to flush cache and to use less memory (#7034)
In this PR:
- removing ugprade-0.24 commands as we are releasing 0.30
- introducing cache:flush command
- refactoring upgrade command and sync-metadata command to use the
ActiveWorkspacesCommand so they consistently run on all workspaces or
selected workspaces

Fixes:
- clear localStorage on sign out
- fix missing workspaceMember in verify resolver
- do not throw on datasource already destroyed exception which can
happen with race condition when several resolvers are resolving in
parallel
2024-09-15 12:47:45 +02:00
nitin
0dbd4a7665
removed @chakra-ui dependencies (#7004)
Issue #6976 
@FelixMalfait 

I could not do
```
import { Banner } from 'twenty-ui';

const StyledBanner = styled(Banner)
  display: flex;
  align-items: center;
  padding: ${({ theme }) => theme.spacing(8)};
  position: absolute;
  border-radius: 8px;
  &:hover {
    background-color: ${({ theme }) => theme.accent.primary};
  }
;
```
The styles wont get overridden for Banner, so for now I styled a new
banner in `UnmatchColumnBanner` which is inconsistent.
I couldnt figure out why css properties are not being overridden, need
help!

@Bonapara 
Question - 
Should the click work on entire banner or just cheveron? For now it just
on cheveron click.


https://github.com/user-attachments/assets/0f409e78-a341-4f26-af74-117e4b2775a9

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-09-14 16:55:17 +02:00
BOHEUS
4544114109
Add data-testid to MultiWorkspaceDropdownButton container (#7028)
PR for #6895
2024-09-14 13:01:04 +02:00
Quentin G.
d1871a4a64
feat: replace ts-node with tsx and pre-install it globaly in docker (#7027)
Implement https://github.com/twentyhq/twenty/issues/5976 suggestion.
It leads to faster boot time since we don't have to install
dependencies.

It should also solve https://github.com/twentyhq/twenty/issues/4772 as
we don't need to run ressource-heavy `npm install` (the mentioned
migration step does not seem to exist anymore anyway.
2024-09-14 11:05:01 +02:00
Quentin G.
b0bc839a49
feat: improve self hosting documentation (#7024)
This PR aims to resolve common misunderstanding while deploying Twenty
with Docker compose.

I've made the documentation clearer, and more detailed.

This should solve https://github.com/twentyhq/twenty/issues/5184, #6140
and similar issues
2024-09-14 11:03:28 +02:00
Charles Bochet
a18b998bed Fix emailThread not loading and rest batch api forbidden 2024-09-14 02:34:40 +02:00
Charles Bochet
8588612cee Fix billing services not accepting new subscriptions 2024-09-13 20:01:18 +02:00
Charles Bochet
523df5398a Optimize metadata queries (#7013)
In this PR:

1. Refactor guards to avoid duplicated queries: WorkspaceAuthGuard and
UserAuthGuard only check for existence of workspace and user in the
request without querying the database
2024-09-13 19:42:22 +02:00
Ana Sofia Marin Alexandre
cf8b1161cc
add field config new icons (#6996)
https://github.com/twentyhq/twenty/issues/6950
Add new icons to Object Fields Data types.

Before:

![image](https://github.com/user-attachments/assets/55697e31-841d-435e-8c70-13ff1c59268d)


After:

![image](https://github.com/user-attachments/assets/bd43f0ec-d3f7-4ecf-a95f-87a030f68e24)

![image](https://github.com/user-attachments/assets/369893a9-35be-43f8-bfcb-55149effa78a)
2024-09-13 15:07:38 +02:00
Weiko
7fd86a860c
[metadata] fix soft delete for standard objects missing deletedAt fieldMetadata (#7017)
This https://github.com/twentyhq/twenty/pull/7006 introduced a
regression.

The goal was to set "isSoftDeletable" to all standard objects but it was
done at the wrong level, meaning it was setting the boolean correctly
but not creating the corresponding fieldMetadata.

I took the occasion to update the new graphql query runner to use that
boolean and automatically add a filter on soft delete in case it's true.

Also adding **IsQueryRunnerTwentyORMEnabled** by default in the seeds
2024-09-13 12:03:27 +02:00
Baptiste Devessier
e9f8e6e718
Display tag for workflow version status (#6972)
- Move where we fetch workflow data. We now fetch them in the `Workflow`
component directly. That's useful to access it in the
`WorkflowShowPageEffect` and `WorkflowDiagramCanvas` components.

![CleanShot 2024-09-10 at 16 27
53@2x](https://github.com/user-attachments/assets/7d30f407-31ab-472c-a096-c525042c0f35)
2024-09-13 11:25:07 +02:00
gitstart-app[bot]
31c02202bd
Handle migration of Email to Emails fields (#6885)
This is the second PR on TWNTY-6261 which handlesdata migration of Email
field to Emails field.\
\
How to Test?\
Firstly make sure that you have completed the testing steps on first PR
then follow the below steps:

- Checkout to TWNTY-6261-emails-migrations branch
- Rebuild typescript using "npx nx build twenty-server"
- Run command "yarn command:prod upgrade-0.25" to do migration\
  \
  Loom Video:\

<https://www.loom.com/share/f82b8d29f8f64f92abe3c59c01147b45?sid=9f8ccc05-aa38-4c49-b139-fd0823066273>

**Testing Messaging Sync functionality:**

Please watch the below video to see that the synchronization of contacts
is working fine after migrating Email field to Emails field:\

<https://www.loom.com/share/400949464b244272b78c25e338cc6ab2?sid=103f6625-5933-4b99-9825-0fed33782f36>

**Question to the client**

should we rename email to emails here? in the DomainName PR, the name
did not change.

```typescript
  @WorkspaceField({
    standardId: PERSON_STANDARD_FIELD_IDS.email,
    type: FieldMetadataType.EMAILS,
    label: 'Email',
    description: 'Contact’s Email',
    icon: 'IconMail',
  })
  email: EmailsMetadata;
```

**Test Messaging Sync**

This pr will update messaging sync files so the changes shouldn't break
existing functionality of importing people and companies in the app.\
To test messaging sync you should follow the below steps:\
1. you need to connect a google account to see the importing
functionality. For this purpose you

have to create a project inside Google Cloud. But to make things easier
you can use the below credentials of an already created project. Put
them in .env of twenty-server package:

```properties
MESSAGING_PROVIDER_GMAIL_ENABLED=true
CALENDAR_PROVIDER_GOOGLE_ENABLED=true
AUTH_GOOGLE_ENABLED=true
AUTH_GOOGLE_CLIENT_ID=951231465939-h61tg6nkpkv1821qi899fjbj9looquto.apps.googleusercontent.com
AUTH_GOOGLE_CLIENT_SECRET=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
AUTH_GOOGLE_CALLBACK_URL=http://localhost:3000/auth/google/redirect
AUTH_GOOGLE_APIS_CALLBACK_URL=http://localhost:3000/auth/google-apis/get-access-token
MESSAGE_QUEUE_TYPE=bull-mq
```

Alternative env

```properties
MESSAGING_PROVIDER_GMAIL_ENABLED=true
CALENDAR_PROVIDER_GOOGLE_ENABLED=true
AUTH_GOOGLE_ENABLED=true
AUTH_GOOGLE_CLIENT_ID=622006708006-dc4n3vrtf3cs2h6k7hgbborudme7ku9l.apps.googleusercontent.com
AUTH_GOOGLE_CLIENT_SECRET=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
AUTH_GOOGLE_CALLBACK_URL=http://localhost:3000/auth/google/redirect
AUTH_GOOGLE_APIS_CALLBACK_URL=http://localhost:3000/auth/google-apis/get-access-token
MESSAGE_QUEUE_TYPE=bull-mq
```

1. Launch your worker with `npx nx run twenty-server:worker`
2. npx nx run twenty-server:command cron:messaging:messages-import
3. npx nx run twenty-server:command cron:messaging:message-list-fetch
4. npx nx run twenty-server:command
cron📆calendar-event-list-fetch
5. Run the app and navigate to Settings/Accounts then connect your
Google account

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Marie Stoppa <marie.stoppa@essec.edu>
Co-authored-by: Weiko <corentin@twenty.com>
2024-09-12 18:31:11 +02:00
Baptiste Devessier
3548751be2
Scaffold empty workflow (#6926)
- Create a workflow version when the user visits an empty workflow.
- If the trigger is not defined yet and the user selects either the
standard object type or the event type first, we automatically select
the first option of the other value. Indeed, every state update is
automatically saved on the backend and we need both standard object and
event types to save the event name.
- Introduces a change in the backend. I removed the assertions that
throw when a workflow version is not complete, that is, when it doesn't
have a defined trigger, which is the case when scaffolding a new
workflow with a first empty workflow version.
- We should keep validating the workflow versions, at least when we
publish them. That should be done in a second step.
2024-09-12 17:01:10 +02:00
Charles Bochet
3c4168759a Refactor metadata caching (#7011)
This PR introduces the following changes:
- add the metadataVersion to all our metadata cache keys to ease
troubleshooting:
<img width="1146" alt="image"
src="https://github.com/user-attachments/assets/8427805b-e07f-465e-9e69-1403652c8b12">
- introduce a cache recompute lock to avoid overloading the database to
recompute the cache many time
2024-09-12 16:06:19 +02:00
Weiko
9b46e8c663
Set all standard objects soft deletable (#7006) 2024-09-12 13:44:48 +02:00
martmull
3190f4a87b
6658 workflows add a first twenty piece email sender (#6965) 2024-09-12 11:00:25 +02:00
Félix Malfait
f8e5b333d9
Add relations to notes/tasks list view (#6971)
<img width="664" alt="Screenshot 2024-09-10 at 17 00 11"
src="https://github.com/user-attachments/assets/37132805-ff67-4d28-b664-b03da680e166">

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-09-12 10:50:49 +02:00
Weiko
725ee837f9
Refactor graphql query runner + fix nested or (#6986) 2024-09-11 14:22:33 +02:00
Lucas Bordeau
b506332420
Fixed CI (#6982)
Fixed CI : 
- Unit test for useTimelineActivities
- Story for field creation with new 2-step process
2024-09-11 12:15:12 +02:00
Weiko
1317e1c4f2
[Flexible-schema] Add findOne and fix findMany pagination + soft-delete for graphql-query-runner (#6978) 2024-09-11 11:29:56 +02:00
Charles Bochet
425eb040f7
Fix not possible to edit options (#6979)
We have recently merged: https://github.com/twentyhq/twenty/pull/6700

However, this introduced a regression on field edition as we have
removed the type dropdown from the field edition page. This dropdown was
wrapped into a controller setting the type on the form. Without this
type, the form is considered as invalid and cannot be saved.

I'm setting the form values through useForm.

I'm unhappy with this PR for too reasons:
- usage of activeMetadataField?.icon ?? '' format because I cannot call
useForm conditionnally. This would imply splitting the component into
several components to avoid this issue
- usage of react hook form which is very hard to debug, we should remove
it from the project
2024-09-11 11:23:52 +02:00
gitstart-app[bot]
846953b0f4
Support for multiple values in the Phone field (#6882)
### Description

- This is the first PR on Phones field;


- We are introducing new field type(Phones)


- We are Forbidding creation of Phone field


- We Added support for filtering and sorting on Phones 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**

1. Checkout to TWNTY-6260 branch
2. Reset database using "npx nx database:reset twenty-server" command
3. Add custom field of type Phones in settings/data-model

**Loom Video:**\

<https://www.loom.com/share/3c981260be254dcf851256d020a20ab0?sid=58507361-3a3b-452c-9de8-b5b1abda70ac>

### Refs

#6260

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
2024-09-11 11:15:04 +02:00
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