Commit Graph

4072 Commits

Author SHA1 Message Date
Weiko
082c614013
update makefile rules to use docker run (#7747)
Fixes https://github.com/twentyhq/twenty/issues/7739

FYI @BOHEUS, thanks
2024-10-16 14:32:58 +02:00
Thomas Trompette
e811bae10e
Execute variables in action input (#7715)
- send context from all previous steps rather than unique payload
- wrap input data in settings into input field
- add email into send email action settings
- update output shape

<img width="553" alt="Capture d’écran 2024-10-15 à 15 21 32"
src="https://github.com/user-attachments/assets/0f5ed004-0d6e-4a59-969b-a5710f3f3985">

<img width="761" alt="Capture d’écran 2024-10-15 à 15 20 09"
src="https://github.com/user-attachments/assets/ac140846-c383-483b-968a-eab469b76785">
2024-10-16 14:32:06 +02:00
Thomas des Francs
a88c2fa453
Added Jobs to tsx footer (#7706)
![CleanShot 2024-10-15 at 09 32
23](https://github.com/user-attachments/assets/c2b21359-52d9-4e46-8700-0937fba5391d)

New "Jobs"
2024-10-16 11:51:37 +02:00
Charles Bochet
4d0af3eb7e
Fix tests (#7722)
As per title ;)
2024-10-16 09:28:31 +02:00
Ali Yar Khan
0a5bc02499
Oss.gg gif magic (#7725)
Task: Create a  gif related to Twenty. Tweet it, and tag  @twentycrm.

Points: 150

Proof:

![image](https://github.com/user-attachments/assets/58da313f-1a94-45ac-88a4-9a0c90eff545)
2024-10-16 09:27:39 +02:00
Charles Bochet
1b99a05dec Put back twenty-website dockerfile 2024-10-15 18:36:10 +02:00
Félix Malfait
f3fe3abf71
Fix unique index created twice (#7718)
`isUnique` was passed to TypeORM's column creation API resulting in
double index creation because it's already done via the decorator and
then in `WorkspaceMigrationIndexFactory`

It would be interesting to move it at this field level in a later step,
which is why I also fixed `CompositeColumnActionFactory` to pass
isUnique on the correct columns, even though it's being ignored later on
2024-10-15 17:50:39 +02:00
Weiko
7e808cf529
Remove pgGraphql from setup (#7716)
## Context
This PR removes pg_graphql from the setup. It also updates the local
setup documentation accordingly.

Note: We removed local setup scripts to align with redis installation,
the setup should be much simpler since we don't rely on pg_graphql
anymore.

## Test
tested locally with docker + mac (brew) setup
2024-10-15 16:59:44 +02:00
Marie
1de739176c
Update searchVector at label identifier update for custom fields (#7588)
By default, when custom fields are created, a searchVector field is
created based on the "name" field, which is also the label identifier by
default.
When this label identifier is updated, we want to update the
searchVector field to use this field as searchable field instead, if it
is of "searchable type" (today it is only possible to select a text or
number field as label identifier, while number fields are not
searchable).
2024-10-15 16:34:05 +02:00
Ali Yar Khan
b1cc7b7dbb
Promotion Poster (#7695)
Task: Create a poster that promotes Twenty and share it on social media.
Points: 300
Attachment:

![image](https://github.com/user-attachments/assets/ec219e9c-e087-4635-80ce-e65f71302ef0)
2024-10-15 14:23:25 +02:00
nitin
a9deede9ba
feat - Compact sidebar (#7414) 2024-10-15 14:02:28 +02:00
Weiko
c0610419c2
Fix unique index email people (#7713)
## Context
WorkspaceIsUnique decorator allows us to create unique indexes on our
tables. Here Emails is a composite field containing a TEXT subfield. Due
to the fact that TEXT fields are non-nullable and have empty strings as
default values, adding a unique index on a TEXT field or any composite
containing TEXT as subfields will fail and throw if we try to create
more than 1 record that does not specify a value to the TEXT field.

This PR simply removes the index for the time being until we find a
solution
2024-10-15 11:31:42 +02:00
Marie
17ec538da5
Fix DateTimeSettingsTimeZoneSelect (#7688)
Fixing
[sentry](https://twenty-v7.sentry.io/issues/5990711011/?alert_rule_id=15135099&alert_type=issue&notification_uuid=06fea945-1c24-4ee6-94f6-99f1d7f94010&project=4507072563183616&referrer=discord)
_Cannot read properties of undefined (reading 'label')_
2024-10-15 10:57:24 +02:00
Ronin
1492340079
[Fix] : Horizontal scroll issue in dropdown (#7682)
In this PR, I changed the hard-coded width value to a dynamic value
which will be calculated based on the parent container.

This PR closes issue: #7615
2024-10-14 21:52:50 +05:30
Weiko
efba3b14be
cleanup pg_graphql #1 (#7673)
## Context
This PR removes workspace-query-runner/builder in preparation for fully
deprecating pg_graphql

next steps: Remove from the setup and make a command to remove comments
on schema/tables related to pg_graphql
2024-10-14 14:19:13 +02:00
Yash Parmar
a64635a9db
Oss.gg : side quest challenge 4 meme magic and 1 retweet with quote (#7663)
### Description

Here i have completed side quest challenge 1 and 4. 

Proof: 

Side quest 1: https://x.com/yashp3020/status/1845720834716959009

![twitter
image](https://github.com/user-attachments/assets/f42691ef-996f-4884-a47b-4b97362a3837)

Side quest 4: https://x.com/yashp3020/status/1845720142702842093

![Capture-2024-10-14-131006](https://github.com/user-attachments/assets/e9940485-77c7-485b-a807-9aa9e27af8d2)
2024-10-14 10:04:45 +02:00
Aditya Deshlahre
b41d1d2a4b
Added oss-gg hackathon issue opening template (#7662)
## Added [oss.gg](https://oss.gg/) hackathon issue opening template 

### This is issue template is consistent in other oss-gg participating
repos. So this helps the participant to open the issue with proof of
work and makes it easy for the maintainer to award points on the simple
side quests.

### If any changes needed lmk

### {can I get some Brownie Point for this template addition}?

### Thank You 🙂 

#### DEMO

![image](https://github.com/user-attachments/assets/864b2c9e-c147-4e67-bdd7-e90eb481ba44)

![image](https://github.com/user-attachments/assets/799edbab-0039-435d-8608-1a809ddb7533)
2024-10-14 08:44:45 +02:00
Vardhaman Bhandari
1a57dd654f
fix: prevent flashing of search results during input (#7592)
solves #7511

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-10-14 08:29:54 +02:00
Ali Yar Khan
653085f1e6
OSS.gg Meme Around Twenty (#7660)
Task: Meme Magic: Craft a meme where the number twenty plays a role.
Tweet it, and tag @twentycrm.
Points: 150
Attachment:

![image](https://github.com/user-attachments/assets/8999dd0d-70b5-4065-9e44-e1e72132c27b)
2024-10-14 08:07:15 +02:00
BOHEUS
a7a4052109
Docker cleanup (#7655)
Related to #7648 

@charlesBochet I've deleted only dev related commands in Makefile, if
it's wrong, I'll change it ASAP
2024-10-13 20:40:27 +02:00
Ali Yar Khan
ee093edc77
OSS.GG Tweet about fav feature (#7658)
Task: Tweet favourite feature and tag Twenty CRM
Point 50
Attachment:

![image](https://github.com/user-attachments/assets/4096c349-e908-4148-8212-2f04cf7659b3)
2024-10-13 20:29:11 +02:00
Ali Yar Khan
c8365dea0d
Like & Re-Tweet oss.gg Launch Tweet (#7656)
Point: 50 Points
Task: Like & Re-Tweet oss.gg Launch Tweet
Attachement:

![image](https://github.com/user-attachments/assets/d6349672-4423-4019-b22f-c1d90d7561a6)
2024-10-13 20:15:00 +02:00
Baptiste Devessier
05e8f8a0b1
Use <label> HTML element when possible (#7609)
This PR:

- Uses `<label>` HTML elements when possible to represent labels
- Uses the new `useId()` React hook to get an identifier to link the
label with its input; it's more suitable than generating a UUID at every
render

Fixes #7281

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-10-13 20:04:24 +02:00
Karan Khatik
284b2677be
[Fix] - Issue with Email Validation and API Call Trigger on Login #7510 (#7596)
Purpose: Enhance email validation in the SignInUpForm component.

Changes:
- Implemented strict email format validation.
- Disabled the "Continue" button until email validation is complete.
- Displayed error messages for invalid email formats.


![image](https://github.com/user-attachments/assets/62f3c114-002e-4f9f-b18f-5309dfc43587)

---------

Co-authored-by: karankhatik <karan13699@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-10-13 19:52:35 +02:00
Charles Bochet
73cb8c5561 Re-add nivo to twenty-website package 2024-10-13 19:50:56 +02:00
Nabhag Motivaras
508252b14c
fix: API ObjectMetadata labelSingular and labelPlural which eventually solves typo in dropdown (#7614)
## ISSUE 

- Closes #7478 

## Description 

- Fixes typo in dropdown + in general any apikeys label around.
2024-10-13 19:37:39 +02:00
Dylan Ullrich
da7a394e0c
Allow use of paru in addition to yay as aur helper (#7652)
Hello Twenty Team,

If this is not an appropriate PR, please feel to close it. I am hoping
to make larger contributions down the road.

I was getting twenty setup locally, and I had a problem with the install
script. I noticed that `yay` was named as an AUR helper, but `paru` was
not. I use [paru](https://github.com/Morganamilo/paru), and this caused
the setup script to fail.

I made a small change in the if statement that checks if `pg-graphql`
can be installed with `yay`. I included a check for `paru` on the same
line.

Thanks everyone who has made this project what it is.
2024-10-13 19:15:43 +02:00
Karan Khatik
1e6346febd
[Fix] - Trim Names in Settings > Members table #7509 (#7525)
Issue: Long names in the Members table were overflowing, affecting the
layout.

Fix:
- Trimmed long names with ellipses.
- Added tooltips to display the full content on hover.
- Max-width of the text dynamically set to 90px on large screens, and
60px on mobile.

![image](https://github.com/user-attachments/assets/3b5d1c08-fe0e-4c0b-952a-0fc0f9e513bc)

---------

Co-authored-by: karankhatik <karan13699@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-10-13 18:32:50 +02:00
BOHEUS
1e2c5bb8de
Typo in local-setup.mdx (#7647) 2024-10-13 18:20:07 +02:00
dostavic
a4e52c5ba0
Enhance postgre sql setup script and documentation for various distros 7636 (#7637)
Co-authored-by: Your Name <you@example.com>
2024-10-13 18:19:47 +02:00
dragonnnn
bdbe495b2c
Like & Re-Tweet oss.gg Launch Tweet (#7645)
Point: 50 Points
Task: Like & Re-Tweet oss.gg Launch Tweet
Attachement:

<img
src="https://github.com/user-attachments/assets/f680d8b5-a45e-47df-abfc-af6912f2231b"
width="420" height="600" alt="WhatsApp Image">
2024-10-13 16:39:34 +02:00
Teddy ASSIH
3332dcfb80
Submission for new logo design side quest (#7642)
This is my submission for the new logo design side quest
2024-10-13 16:22:37 +02:00
Nabhag Motivaras
8becedf552
[OSS.GG] Gif Magic Side Quest (#7644)
# Side Quest  Challenge: GIF Magic 


![twentyCRM](https://github.com/user-attachments/assets/74cabf0e-ba3c-4a86-8a5c-5e90edf4606b)

- GIF Link:
https://giphy.com/gifs/twenty-twentycrm-opensourcecrm-wCcsmnJuzzzGrfuf9B

- Related Tweet Link:
https://x.com/NabhagMotivaras/status/1845455575716352363


####  For Fun added Music to Video I recorded hehe.



https://github.com/user-attachments/assets/bedebc33-82a4-4e78-a4b2-19ab25dab364


### - Thank you Raycast 🚀

Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>
2024-10-13 16:20:58 +02:00
Harsh Singh
d3e503c564
fix: droppable-placeholder (#7600)
Fixes: #7597

This PR fixes the missing placeholder from Droppable component.
2024-10-13 16:06:26 +02:00
Nabhag Motivaras
8967181212
[oss.gg] Like & Retweet side quest (#7641)
### Side Quest: Like and Retweet

----
<img width="608" alt="Like Launch Tweet"
src="https://github.com/user-attachments/assets/c03a651e-890d-49e6-bc19-bb7b02d2b671">

---

<img width="608" alt="RetweetSideQuest"
src="https://github.com/user-attachments/assets/58ff243a-10f0-4071-aada-7fafe7894068">
2024-10-13 15:56:14 +02:00
nitin
5ca47507dc
minor - ts error fix (#7635)
@FelixMalfait :) follow up - #7628
2024-10-13 14:50:29 +02:00
Atharva_404
6c0959b2e6
Added new Logo to design new logo twenty.md (#7633)
Added my own name and Logo to the list.

Here is a small preview of the logo:
![Twenty CRM new
Logo](https://github.com/user-attachments/assets/53c265cb-898e-4ec8-bd98-7c3805c850e1)
2024-10-13 13:19:48 +02:00
Utsav bhattarai
ce7059dcbf
Update 1-quote-tweet-20-oss-gg-launch.md (#7634)
completed Side quest #7632
2024-10-13 13:19:11 +02:00
Tushar Ranjan
ccdef0e97b
Fix: Nav Item Api & Webhook and Functions stay selected (#7628)
Fixed Nav Item Api & Webhook and Functions stay selected like data model
settings.
 Now when clicked stays selected and deos not loose its selection

Fixes #7573


https://github.com/user-attachments/assets/4cb78158-8411-4ee1-9bcc-2870344c0c62

---------

Co-authored-by: ehconitin <nitinkoche03@gmail.com>
Co-authored-by: Félix Malfait <felix@twenty.com>
2024-10-13 13:18:33 +02:00
Chirag Arora
38d7f0bc6b
Quest meme magic submission (#7619)
![Screenshot
(16)](https://github.com/user-attachments/assets/4dcb0d4e-9195-4cba-b195-1fb1d52a5e89)
2024-10-13 11:41:57 +02:00
Chirag Arora
1a0e706462
Quest Gif Magic Submission (#7622)
![Screenshot
(17)](https://github.com/user-attachments/assets/b481f9fa-7b31-47da-b6ae-97b52162fcae)
2024-10-13 11:40:22 +02:00
Teddy ASSIH
2bfca3b661
Design a poster promoting Twenty (#7625)
Designed a poster for twenty and then made a X post about it. 
Here is the link of the post
https://x.com/ion_finisher/status/1845168965963628802
2024-10-13 11:38:24 +02:00
Charles Bochet
d252a23d04
Fix lessThan operator not applying column case (#7624)
Our postgres column naming convention is camelCase ; this forces SQL
queries to wrap column names with double quotes.

We previously forgot the quotes in a filter parsing case
2024-10-13 11:35:26 +02:00
Félix Malfait
b792d2a4d3
Add unique indexes and indexes for composite types (#7162)
Add support for indexes on composite fields and unicity constraint on
indexes

This pull request includes several changes across multiple files to
improve error handling, enforce unique constraints, and update database
migrations. The most important changes include updating error messages
for snack bars, adding a new command to enforce unique constraints, and
updating database migrations to include new fields and constraints.

### Error Handling Improvements:
*
[`packages/twenty-front/src/modules/error-handler/components/PromiseRejectionEffect.tsx`](diffhunk://#diff-e7dc05ced8e4730430f5c7fcd0c75b3aa723da438c26e0bef8130b614427dd9aL23-R23):
Updated error messages in `enqueueSnackBar` to use `error.message`
directly.
*
[`packages/twenty-front/src/modules/object-metadata/hooks/useFindManyObjectMetadataItems.ts`](diffhunk://#diff-74c126d6bc7a5ed6b63be994d298df6669058034bfbc367b11045f9f31a3abe6L44-R46):
Simplified error messages in `enqueueSnackBar`.
*
[`packages/twenty-front/src/modules/object-record/hooks/useFindDuplicateRecords.ts`](diffhunk://#diff-af23a1d99639a66c251f87473e63e2b7bceaa4ee4f70fedfa0fcffe5c7d79181L56-R58):
Simplified error messages in `enqueueSnackBar`.
*
[`packages/twenty-front/src/modules/object-record/hooks/useHandleFindManyRecordsError.ts`](diffhunk://#diff-da04296cbe280202a1eaf6b1244a30490d4f400411bee139651172c59719088eL22-R24):
Simplified error messages in `enqueueSnackBar`.

### New Command for Unique Constraints:
*
[`packages/twenty-server/src/database/commands/upgrade-version/0-31/0-31-enforce-unique-constraints.command.ts`](diffhunk://#diff-8337096c8c80dd2619a5ba691ae5145101f8ae0368a75192a050047e8c6ab7cbR1-R159):
Added a new command to enforce unique constraints on company domain
names and person emails.
*
[`packages/twenty-server/src/database/commands/upgrade-version/0-31/0-31-upgrade-version.command.ts`](diffhunk://#diff-20215e9981a53c7566e9cbff96715685125878f5bcb84fe461a7440f2e68f6fcR13-R14):
Integrated the new `EnforceUniqueConstraintsCommand` into the upgrade
process.
[[1]](diffhunk://#diff-20215e9981a53c7566e9cbff96715685125878f5bcb84fe461a7440f2e68f6fcR13-R14)
[[2]](diffhunk://#diff-20215e9981a53c7566e9cbff96715685125878f5bcb84fe461a7440f2e68f6fcR31)
[[3]](diffhunk://#diff-20215e9981a53c7566e9cbff96715685125878f5bcb84fe461a7440f2e68f6fcR64-R68)
*
[`packages/twenty-server/src/database/commands/upgrade-version/0-31/0-31-upgrade-version.module.ts`](diffhunk://#diff-da52814efc674c25ed55645f8ee2561013641a407f88423e705dd6c77b405527R7):
Registered the new `EnforceUniqueConstraintsCommand` in the module.
[[1]](diffhunk://#diff-da52814efc674c25ed55645f8ee2561013641a407f88423e705dd6c77b405527R7)
[[2]](diffhunk://#diff-da52814efc674c25ed55645f8ee2561013641a407f88423e705dd6c77b405527R24)

### Database Migrations:
*
[`packages/twenty-server/src/database/typeorm/metadata/migrations/1726757368824-migrationDebt.ts`](diffhunk://#diff-c450aeae7bc0ef4416a0ade2dc613ca3f688629f35d2a32f90a09c3f494febdcR1-R53):
Added a migration to update the `relationMetadata_ondeleteaction_enum`
and set default values.
*
[`packages/twenty-server/src/database/typeorm/metadata/migrations/1726757368825-addIsUniqueToIndexMetadata.ts`](diffhunk://#diff-8f1e14bd7f6835ec2c3bb39bcc51e3c318a3008d576a981e682f4c985e746fbfR1-R19):
Added a migration to include the `isUnique` field in `indexMetadata`.
*
[`packages/twenty-server/src/database/typeorm/metadata/migrations/1726762935841-addCompostiveColumnToIndexFieldMetadata.ts`](diffhunk://#diff-7c96b7276c7722d41ff31de23b2de4d6e09adfdc74815356ba63bc96a2669440R1-R19):
Added a migration to include the `compositeColumn` field in
`indexFieldMetadata`.
*
[`packages/twenty-server/src/database/typeorm/metadata/migrations/1726766871572-addWhereToIndexMetadata.ts`](diffhunk://#diff-26651295a975eb50e672dce0e4e274e861f66feb1b68105eee5a04df32796190R1-R14):
Added a migration to include the `indexWhereClause` field in
`indexMetadata`.

### GraphQL Exception Handling:
*
[`packages/twenty-server/src/engine/api/graphql/workspace-query-runner/utils/workspace-query-runner-graphql-api-exception-handler.util.ts`](diffhunk://#diff-58445eb362dc89e31107777d39b592d7842d2ab09a223012ccd055da325270a8R1-R4):
Enhanced exception handling for `QueryFailedError` to provide more
specific error messages for unique constraint violations.
[[1]](diffhunk://#diff-58445eb362dc89e31107777d39b592d7842d2ab09a223012ccd055da325270a8R1-R4)
[[2]](diffhunk://#diff-58445eb362dc89e31107777d39b592d7842d2ab09a223012ccd055da325270a8R23-R59)
*
[`packages/twenty-server/src/engine/api/graphql/workspace-resolver-builder/factories/create-many-resolver.factory.ts`](diffhunk://#diff-233d58ab2333586dd45e46e33d4f07e04a4b8adde4a11a48e25d86985e5a7943L58-R58):
Updated the `workspaceQueryRunnerGraphqlApiExceptionHandler` call to
include context.
*
[`packages/twenty-server/src/engine/api/graphql/workspace-resolver-builder/factories/create-one-resolver.factory.ts`](diffhunk://#diff-68b803f0762c407f5d2d1f5f8d389655a60654a2dd2394a81318655dcd44dc43L58-R58):
Updated the `workspaceQueryRunnerGraphqlApiExceptionHandler` call to
include context.

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-10-13 10:21:03 +02:00
Charles Bochet
d1d4af0c63 Make main the new 0.32 canary 2024-10-12 17:48:20 +02:00
Charles Bochet
70bbc65e61 Increase test coverage 2024-10-12 17:36:47 +02:00
nitin
cac00e93b8
minor fix - dropdown doesnt close onClick in configure step (#7587) 2024-10-11 21:24:25 +02:00
Lucas Bordeau
fef3d32237
Fixed bugs in ViewBar filtering (#7608)
- Fixed CSS for SortOrFilter chips
- Fixed bug when refreshing with an actor source filter set

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-10-11 20:25:15 +02:00
Charles Bochet
7b96be6f8c
Fix optimistic effect deletedAt (#7606)
In this PR, I'm fixing part of the impact of soft deletion on optimistic
rendering.

## Backend Vision

1) Backend endpoints will not return soft deleted records (having
deletedAt set) by default. To get the softDeleted records, we will pass
a { withSoftDelete: true } additional param in the query.
2) Record relations will NEVER contain softDeleted relations

## Backend current state

Right now, we have the following behavior:
- if the query filters do not mention deletedAt, we don't return
softDeletedRecords
- if the query filters mention deletedAt, we take it into consideration.
Meaning that if we want to have the softDeleted records in any way we
need to do { or: [ deletedAt: NULL, deletedAt: NOT_NULL] }

## Optimistic rendering strategy

1) useDestroyOne/Many is triggering destroyOptimisticEffects (previously
deleteOptimisticEffects)
2) UseDeleteOne/Many and useRestoreOne/Many are actually triggering
updateOptimisticEffects (as they only update deletedAt field) AND we
need updateOptimisticEffects to take into account deletedAt (future
withSoftDelete: true) filter.
2024-10-11 20:23:01 +02:00
nitin
d350143c92
Fix field forms (#7595)
@lucasbordeau 
forms are broken!
revert - #7363 
used useRelationSettingsFormInitialValues hook from that commit.
TODO - figure out a way to change the relation name label from singular
to plural and vice versa, until it is edited.
related issue - #7355

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-10-11 19:07:56 +02:00