Commit Graph

4421 Commits

Author SHA1 Message Date
Félix Malfait
bd18eb8b42
Add logging for scopeid error (#8513)
Can't figure out https://github.com/twentyhq/twenty/issues/8347 so I'm
adding logs, maybe it'll help debug in the future!
2024-11-15 14:16:09 +01:00
Thomas des Francs
30bcdda323
Modal Background & box shadow fixes (#8506)
# Before

![CleanShot 2024-11-14 at 19 20
59](https://github.com/user-attachments/assets/9a561416-a08c-4cc4-ac71-b3f4410950d8)

# After

![CleanShot 2024-11-14 at 19 21
34](https://github.com/user-attachments/assets/eaa78d94-a337-4d91-9c36-8ac0dd27d952)
2024-11-15 12:44:58 +01:00
martmull
4f99b8eea1
8495 workflow display relevant columns in workflow related tables (#8502)
## After
### Workflows

![image](https://github.com/user-attachments/assets/535e0ff5-1276-41b9-aa52-d66150cd85ae)
### WorkflowRuns

![image](https://github.com/user-attachments/assets/8a7e076b-53ec-4b72-97d8-41bd77ed59ac)
### WorkflowVersions

![image](https://github.com/user-attachments/assets/7d2566b2-e6ea-4a3a-8e88-0f6850203219)

## Change Created By into Executed By in workflowRuns

![image](https://github.com/user-attachments/assets/b90b7a07-a4bc-4bd2-b7f5-ab7d2ae6ee45)
2024-11-15 10:13:36 +00:00
Thomas Trompette
a2a272fed4
Add crud actions (#8500)
Adding update / delete / find actions

Update and delete are not really different than creation.

Find uses the same logique as for graphql filters.
Expected formats are:

Filter
```
{
  "and": [
    {
      "name": {
        "eq": "salut"
      }
    },
    {
      "employees": {
        "eq": "0"
      }
    }
  ]
}
```

Order
`[ { "name": 'AscNullsFirst' } ]`
2024-11-15 10:10:00 +01:00
Félix Malfait
736635a94b
Begin moving to postgres spilo + adding pgvector (#8309)
We will remove the `twenty-postgres` image that was used for local
development and only use `twenty-postgres-pilo` (which we use in prod),
bringing the development environment closer to prod and avoiding having
to maintain 2 images.


Instead of provisioning the super user after the db initialization, we
directly rely on the superuser provided by Spilo for simplicity. We also
introduce a change that tries to create the right database (`default` or
`test`) based on the context.
  

How to test:
```
docker build -t twentycrm/twenty-postgres-spilo:latest -f ./packages/twenty-docker/twenty-postgres-spilo/Dockerfile .
docker images --no-trunc | grep twenty-postgres-spilo
postgres-on-docker:
	docker run \
	--name twenty_pg \
	-e PGUSER_SUPERUSER=twenty \
	-e PGPASSWORD_SUPERUSER=twenty \
	-e ALLOW_NOSSL=true \
	-v twenty_db_data:/home/postgres/pgdata \
	-p 5432:5432 \
	REPLACE_WITH_IMAGE_ID
```
2024-11-15 09:38:30 +01:00
Weiko
cfe3515aa6
Set cache metadata version to infinite TTL (#8507)
## Context
To avoid having a corrupt metadata version, we want to remove TTL for
that key.

## Test
<img width="592" alt="Screenshot 2024-11-15 at 00 02 05"
src="https://github.com/user-attachments/assets/9da0ae33-26a8-4e7b-82d0-dd691135a08f">
2024-11-15 00:05:42 +01:00
Charles Bochet
5384b4aba5
Fix record board export not taking filters into account (#8505)
Fix Export CSV action not taking into account the filters applied on the
Kanban index view
2024-11-14 23:28:53 +01:00
Marie
a799370483
Aggregated queries #1 (#8345)
First step of https://github.com/twentyhq/twenty/issues/6868

Adds min.., max.. queries for DATETIME fields
adds min.., max.., avg.., sum.. queries for NUMBER fields 

(count distinct operation and composite fields such as CURRENCY handling
will be dealt with in a future PR)

<img width="1422" alt="Capture d’écran 2024-11-06 à 15 48 46"
src="https://github.com/user-attachments/assets/4bcdece0-ad3e-4536-9720-fe4044a36719">

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
Co-authored-by: Weiko <corentin@twenty.com>
2024-11-14 18:05:05 +01:00
Harsh Singh
c966533f26
fix: search error in filter & sort dropdowns (#8493)
Fixes: #8483

Co-authored-by: Félix Malfait <felix@twenty.com>
2024-11-14 17:51:54 +01:00
Ketan Mehta
51c54d4c5b
validation on Select field (#8316)
fix #8204
I changed "API keys" to "API values".
Stopped inputting special characters in Select field option keys.

@lucasbordeau please check the changes and tell me if I need to do any
other changes. :)

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2024-11-14 17:46:18 +01:00
Guillim
15b8b9b158
Feature : Adding percentage option to Input Number (#8481)
fixing #7375

---------

Co-authored-by: guillim <guillaume@twenty.com>
2024-11-14 14:23:25 +01:00
martmull
090f612c4b
Fix open api specs for MULTI_SELECT (#8494)
## Before

![image](https://github.com/user-attachments/assets/b7384fb3-0f32-498b-99bb-27b8c15db00c)

## After

![image](https://github.com/user-attachments/assets/a8429849-559d-4494-8636-e5a6ddda7b47)
2024-11-14 12:07:31 +01:00
martmull
9ac949dec8
[Workflow] Add search in variable dropdown (#8479)
- fix Icon variable Plus
- add search input 
- fix dropdown height

## Before

![image](https://github.com/user-attachments/assets/49f73efd-21cc-4ecd-a494-f51edc34dc57)


## After

![image](https://github.com/user-attachments/assets/2af2c7ee-72fd-4dae-a1ef-19e75e1ac026)
2024-11-14 11:40:06 +01:00
BOHEUS
d72068eb99
Fix BullMQ deprecation warning (#8486)
Related to #8470
2024-11-13 19:38:29 +01:00
Harsh Singh
c98a8a2258
fix: dropdown toggle functionality (#8476)
Fixes: #8468
2024-11-13 19:36:21 +01:00
Khuddite
2fb920f68c
Fix typo in branch name (#8480)
Fixes #8471 

Updated `0.33.0-canaray` -> `0.33.0-canary`

![CleanShot 2024-11-13 at 09 45
36](https://github.com/user-attachments/assets/6a365542-9b4d-4279-9ef4-966d22863eba)
2024-11-13 19:35:15 +01:00
nitin
795cb12a12
minor fix - spacing on Data model title fixed (#8467) 2024-11-13 19:34:15 +01:00
Nicolas Rouanne
cde96cf526
Fix/validate access token user not found (#8484)
# Description
Closes #7244 

See details about implementation:
https://github.com/twentyhq/twenty/issues/7244#issuecomment-2473845859
and
https://github.com/twentyhq/twenty/issues/7244#issuecomment-2473905514

# Changes
- return a `USER_NOT_FOUND` error instead of `INVALID_INPUT` error
- tweak unit tests to correctly test `AuthExceptionCode`, as it wasn't
properly tested; it was actually a _false positive_. This is because
[`toThrow`](https://jestjs.io/docs/expect#tothrowerror) from jest only
checks the `message`, and not any other method / attributes from the
`Error`. It's a know behaviour and not considered a bug, see
https://github.com/jestjs/jest/issues/13232#issuecomment-1252392845
2024-11-13 18:50:30 +01:00
Baptiste Devessier
898006f89d
Prevent automatic zoom when focusing inputs on iOS (#8477)
This is the result of a long discussion we had here:
https://github.com/twentyhq/twenty/issues/8001.

The goal is to stop iOS from automatically zooming when the user focuses
on an input whose font size is less than 16px.

The options were:

1. Disable zoom for all devices
2. Disable zoom for devices detected as iOS devices, which doesn't
prevent users from zooming manually but fixes the auto-zoom bug
3. Set the font size of the inputs to be equal to or greater than
16px—this change would take a lot of time

To me, the second option is the best, as iOS prevents developers from
disabling zoom. They saw that it was overused and chose to restrict this
setting. Setting a `maximum-scale` doesn't prevent users from zooming,
but it fixes the initial bug we had.

My implementation can be seen as [progressive
enhancement](https://developer.mozilla.org/en-US/docs/Glossary/Progressive_Enhancement
): If we can detect that the user uses an iOS device, we'll set the
`maximum-scale` viewport property. Relying on the user agent is always
unstable, and the check might fail unpredictably. We might not disallow
auto-zoom for some iOS devices.

However, I think we can either:

- Invest some time to choose a more reliable user detection pattern if
the one I suggest is not sufficient ([we find many different checks on
the
internet](https://stackoverflow.com/questions/9038625/detect-if-device-is-ios),
I'm not sure which one is the best)
- Choose to apply the viewport setting to all devices and remove the JS
code. According to my tests, it doesn't prevent zooming on desktops.
However, it does on Android phones. I think it's not lovely to disallow
zoom, but if the team agrees that we should go this way, I won't
disagree.

I know my JavaScript code does not follow a pattern we want to spread in
the app. The synchronous script will run as soon as possible to ensure
the viewport is correctly set when the website launches. This shouldn't
be an example followed by others.

Thanks, @harshit078, for your help in thinking about the best option.

I'm tagging @lucasbordeau and @charlesBochet for a technical review.

I would appreciate if someone could test on a more recent iOS device
than mine.

Here is a demonstration of the behavior on iOS:


https://github.com/user-attachments/assets/d49fb65f-dd76-455c-9ac0-d4c002a7fe89
2024-11-13 15:34:20 +01:00
Thomas Trompette
faeea2b887
Create record action (#8460)
- Add create record action
- Migrate all step name => action in a common folder
- Separate types
2024-11-13 15:21:40 +01:00
martmull
ba79a1d324
Fix style (#8475)
## Before

![image](https://github.com/user-attachments/assets/1c96c30c-da06-4caa-a05d-1c58006dcfa5)

## After

![image](https://github.com/user-attachments/assets/523fac64-7521-4c0f-bfa8-457d48493628)
2024-11-13 13:32:40 +00:00
Thomas des Francs
d2af97276d
0.32 changelog (#8461)
<img width="800" alt="0 32-webhooks"
src="https://github.com/user-attachments/assets/0c91bda3-4a8d-4808-bb8c-3b351a186a21">

<img width="800" alt="0 32-improved-cmdk"
src="https://github.com/user-attachments/assets/ebb98c2e-4b79-4dad-8946-e9ecd6c51bbc">
2024-11-13 12:57:30 +01:00
martmull
269eaf4422
Update zapier trigger payload (#8464)
- fixes zapier tests
2024-11-12 17:58:36 +01:00
Baptiste Devessier
31f03764d6
Improve the layout of the Workflow Visualizer (#8372)
- Increase the dimensions of the ReactFlow nodes. This allows to ditch
scaling which made it hard to get the width of the nodes as they were
visually scaled by 1.3.
- Center the flow when the flow mounts and when the state of the right
drawer opens.
- Put the node type inside of the node so it doesn't overlap with the
arrow
- Make the edges non deletable

We'll have to make a refactor so the viewport can be animated properly:
https://github.com/twentyhq/twenty/issues/8387.


https://github.com/user-attachments/assets/69494a32-5403-4898-be75-7fc38058e263

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2024-11-12 17:52:12 +01:00
martmull
aadcb49dcb
Fix missing timeline activity events (#8459)
Fixes bug introduced in https://github.com/twentyhq/twenty/pull/8193

Taking into account linked event name `linked-{eventName}` as before
issue

## Before
`linked-created` and `linked-updated` activity targets were not created
in `timelineActivity` table

## After
`linked-created` and `linked-updated` activity targets are created in
`timelineActivity` table
2024-11-12 12:04:58 +01:00
Marie
bec4da496d
Data settings new layout - anchor navigation (#8334)
Follow-up of https://github.com/twentyhq/twenty/pull/7979
Navigation between settings and fields tabs is now reflected in URL. 
<img width="1106" alt="Capture d’écran 2024-11-07 à 18 38 57"
src="https://github.com/user-attachments/assets/24b153ef-9e68-4aa2-8e3a-6bf70834c5ad">

---------

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: Weiko <corentin@twenty.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-11-11 14:06:38 +01:00
Charles Bochet
9d6a850ee8
Mark main version as 0.33 canary (#8453) 2024-11-11 11:59:33 +01:00
Khuddite
ff77f85aee
Fix broken documentation pages in mobile view (#8432)
Fixes: #8396

1. Summary
The document content container is missing `width` and has only `padding`
CSS property, which means the width can overflow its parent based on the
content. The code block inside headings was missing `fontSize` for
mobile view, it was set for only desktop views.
    
2. Solution
I set `width` for document content container and `fontSize` for code
blocks in headings for mobile view.
    
3. Screenshots

![localhost_3000_developers_local-setup(iPad
Mini)](https://github.com/user-attachments/assets/4adf695f-3849-4ddc-8629-be03a70d32b1)
![localhost_3000_developers(iPhone 12
Pro)](https://github.com/user-attachments/assets/52254b3a-674b-4db0-9e6c-a68d59cb4401)
2024-11-11 09:32:00 +01:00
Harsh Singh
29d92abaff
fix: bookmarkIcon flash on hover exit (#8448)
Fixes: #8447

Co-authored-by: Félix Malfait <felix@twenty.com>
2024-11-11 09:30:03 +01:00
nitin
c19e54f24b
Hide tabs (#7841)
@FelixMalfait WDYT?
We can refactor shouldDisplay Files/Tasks/Notes Tab etc into a hook.

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2024-11-11 09:26:27 +01:00
Harsh Singh
6d62dd9fd1
fix: object activate dropdown (#8438)
Fixes: #8436 
Fixes: #8435 
& other duplicate ```DropdownMenu```
2024-11-11 09:26:07 +01:00
Harsh Singh
51d1305e27
fix: timeline padding (#8440)
Fixes: #8437

Co-authored-by: Félix Malfait <felix@twenty.com>
2024-11-09 08:19:28 +01:00
Harshit Singh
8ee827d05d
fix: Developers page dropdown not optimised for mobile viewport (#8392)
## Description

- This PR is a minor fix to issue #8379 
- Fixed dropdown for mobile viewports

## Changes


https://github.com/user-attachments/assets/76692233-996e-4a1a-884a-84d31464fc85
2024-11-09 07:59:15 +01:00
Charles Bochet
eb316074ef
Add People API upgrade instruction to upgrade guide (#8441)
I'm updating the docs as we now require the People API to be available
to use messaging sync. This has been reported by a user self-hosting the
app on discord.
2024-11-08 20:34:10 +01:00
Hitarth Sheth
e3e638579b
[FIX] Text overflow on timeline (#8325)
FIX: #6977 

Implementation:

1. Parent (Summary componenet) width is set to 100%. (dosen't grow even
if the child exceeds width)
2. span element is set to `text-overflow: ellipses` when overflown.

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2024-11-08 18:20:41 +00:00
Hitarth Sheth
6ec8a5b76e
[FIX] slash-menu-height-fix (#8327)
FIX #8326 

I've used the `height: fit-content` property just for customSlashMenu
but I think it will work for all dropdown menu's.
I tested it for a few and works fine, but not sure for edge cases. 

Let me know if the height should be changed to `fir-content`


![image](https://github.com/user-attachments/assets/dacbedb5-08e0-4d08-8952-21d8b9de1176)

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-11-08 16:22:18 +00:00
martmull
354ee86cb9
8311 serverless function functions can be executed with any input (#8380)
- remove ts-morph
- update inputSchema shape

![image](https://github.com/user-attachments/assets/e62f3fdb-5be8-4666-8172-44f73a1981b9)


https://github.com/user-attachments/assets/913cd305-9e7c-48da-b20f-c974a8ac7cea

## TODO
- have inputTypes to match the inputSchema type (string, number,
boolean, etc...), only string for now
- handle required/optional inputs
- handle case when inputSchema changes, fix data reset when switching
function
2024-11-08 16:15:27 +00:00
Harshit Singh
0381996fb9
fix: dropdown menu doesn't close and remains open (#8302)
## Description

- Fixes #8285 
- Added fix for both Currency and PhoneCountry dropdown

## Changes



https://github.com/user-attachments/assets/cbf85100-7791-40da-a676-2c87c6a32976

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-11-08 16:13:15 +00:00
Lucas Bordeau
045f569d62
Fixed dropdown menu field settings (#8374)
2 dropdown menu components were used. Using only one and using dropdown
props for passing width to its internal dropdown menu component.
2024-11-08 17:11:37 +01:00
Raphaël Bosi
e8bf81de5b
8172 update the right drawer action menu to open with command o (#8375)
Closes #8172 

- Added a shortcut property to the button component
- Displays the actions inside a dropdown
- The dropdown is toggled either by clicking on the button or with the
`command + O` shortcut



https://github.com/user-attachments/assets/4c4c88fa-85dc-404e-bb42-f2b0d57c8960
2024-11-08 17:08:09 +01:00
khuddite
0bf2cb69da
Fix multi-dropdown field can't have no options selected (#8391)
Fixes: #8224 

1. Summary
All multi-dropdowns across the application don't accept empty options
because emptiness is perceived as an invalid state.

2. Solution
The issue came down to the back-end and the specific string utility
function that converts a string separated by `,` to an array of options.
But the problem with it is that it returns `['']` for an empty string
representing an emptiness. And then `['']` fails on the parser because
simply `''` is not a valid option the user selected for the dropdown. So
I updated the string utility function to return an empty array for cases
like `'', '{}', '{ }'`, etc

3. Recording


https://github.com/user-attachments/assets/071fe5d2-2123-4deb-878c-67f62d9b3431
2024-11-08 16:10:14 +01:00
Raphaël Bosi
5a53ef1ade
Make filters work on export csv action (#8389)
- Create a new component state `contextStoreFiltersComponentState` and
refactor `contextStoreTargetedRecordsRuleComponentState`
- Refactor `computeContextStoreFilters` to use filters when no records
are selected
2024-11-08 15:38:45 +01:00
Harshit Singh
d44f7a46b6
fix: Misalignment and Excessive Padding in Relation Card (#8292)
## Description

- This PR solves the issue #8249 
- Maintained the overall padding, aligned content to left matching and
decreased Spacing between the card title and content should be smaller

## Changes

<img width="346" alt="Screenshot 2024-11-03 at 2 37 13 AM"
src="https://github.com/user-attachments/assets/91ba35bb-ff25-4001-af15-1fa10e5e1772">

---------

Co-authored-by: Thomas des Francs <tdesfrancs@gmail.com>
2024-11-08 14:10:15 +00:00
Harsh Singh
61cdc0e6da
fix: kanban column margin should extend to bottom (#8394)
Fixes: #7868 

[Screencast from 2024-11-08
13-33-47.webm](https://github.com/user-attachments/assets/1de620d8-8f05-43f8-bde9-a2c9cbea4b9f)

---------

Co-authored-by: ehconitin <nitinkoche03@gmail.com>
2024-11-08 14:55:45 +01:00
Raphaël Bosi
aa270950d9
Make csv export unavailable when only one record is selected (#8409)
Make csv export unavailable when only one record is selected
2024-11-08 14:50:04 +01:00
Félix Malfait
a7a7d62502
Fix CI timeout (#8408) 2024-11-08 13:53:38 +01:00
Baptiste Devessier
f3e3c186dc
Fix noninteractive toggle (#8383)
- Use a label to make the whole card interactive
- Disallow the Toggle component to shrink; it used to on mobile devices

A focus indicator is missing for the Toggle component. We'll have to add
one.
2024-11-08 12:42:15 +01:00
Marie
8b5e90aca9
Update searchVector expression based on rich text fields (#8390)
Search vector fields based on `RICH_TEXT` fields were generated using a
treatment on `RICH_TEXT` fields's `body`
column, to only extract and index the core text.
([PR](https://github.com/twentyhq/twenty/pull/7953))

Actually our RICH_TEXT fields are of datatype `text` in our database,
allowing users to insert non-json values, which breaks the search vector
generation (as it expects json values).

Our vision is unclear for now: for instance we may want to turn
RICH_TEXT into a composite field where the plain text would be stored in
a different column.

So for now, we will (1) treat rich_text data as text, and (2) update the
search vector expressions for the existing workspaces.
2024-11-08 12:41:11 +01:00
Thomas Trompette
813c57fba6
Create workflow setup command (#8406)
Steps to enable workflows:
- enable feature flags
- run metadata sync
- run this command

If the feature flag is not true, the command will fail. Which will be
useful to prevent seeding a wrong workspace.

Including a little fix for send email aciton error
2024-11-08 12:40:11 +01:00
Félix Malfait
d8831512d4
Add CI timeouts and enable playwright (#8405) 2024-11-08 12:24:22 +01:00