Commit Graph

3397 Commits

Author SHA1 Message Date
Lucas Bordeau
9e08445bff
Fix date picker wrong on certain timezones (#5972)
Timezone with a negative offset weren't working good with date pickers.

I split the logic for display and parsing between date only and
datetime.

Date time is sending and displaying using timezone, and date only is
sending and displaying by forcing the date to take its UTC day and month
and 00:00:00 time.

This way its consistent across all timezones.
2024-06-20 17:13:30 +02:00
Aditya Pimpalkar
8c6e96c41b
fix: Column header menu Filter button (#5973)
fixes: #5957



https://github.com/twentyhq/twenty/assets/13139771/51d42aa5-c774-4cbe-adca-b95ea6e17bbd
2024-06-20 16:44:28 +02:00
Aditya Pimpalkar
59b9ce689d
add object id column to csv export (#5971)
closes: #5893

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-06-20 16:42:33 +02:00
Rushikesh Tarapure
bc8c895b0e
Feat : Introduced Delay Options for Tooltip (#5766)
Fixes https://github.com/twentyhq/twenty/issues/5727

---------

Co-authored-by: Rushikesh Tarapure <rushikeshtarapure@gofynd.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-06-19 16:37:44 +02:00
bosiraphael
86f95c0870
5898 Create a cron to monitor messageChannelSyncStatus (#5933)
Closes #5898
2024-06-19 16:04:01 +02:00
bosiraphael
016132ecf6
Fix reconnect google account bug (#5905)
Update syncStage to FULL_MESSAGE_LIST_FETCH_PENDING when reconnecting
the account to trigger a full sync on the next cron iteration.
2024-06-19 16:00:39 +02:00
bosiraphael
d6fcb9cae8
5934 create alert banner component (#5950)
Closes #5934

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-06-19 15:41:57 +02:00
gitstart-twenty
701059007b
Data Skeleton Loading on Indexes (#5828)
### Description
Data Skeleton Loading on Indexes

### Refs
#4459

### Demo


https://github.com/twentyhq/twenty/assets/140154534/d9c9b0fa-2d8c-4b0d-8d48-cae09530622a


Fixes #4459

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Matheus <matheus_benini@hotmail.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-06-19 15:25:20 +02:00
Thomas Trompette
ff21396bc6
[Bug] Put back subject is email right drawer (#5955)
Fix https://github.com/twentyhq/twenty/issues/5903
2024-06-19 14:48:09 +02:00
Joshua Zacek
60b60bd4b3
(5943) Match country selector button's background to phone number input's background (#5956)
Fixes #5943

### Before
Light
<img width="218" alt="Screenshot 2024-06-19 at 12 37 22 PM"
src="https://github.com/twentyhq/twenty/assets/57673080/981d1877-be4e-4071-9a8d-9d0ed7e933ab">
Dark
<img width="223" alt="Screenshot 2024-06-19 at 12 39 42 PM"
src="https://github.com/twentyhq/twenty/assets/57673080/a3730ef5-21ba-4d90-998d-d330aec350ad">


### After
Light
<img width="216" alt="Screenshot 2024-06-19 at 12 39 00 PM"
src="https://github.com/twentyhq/twenty/assets/57673080/eef3b743-1b28-43a5-8c1c-bd944a4915c7">
Dark
<img width="228" alt="Screenshot 2024-06-19 at 12 39 29 PM"
src="https://github.com/twentyhq/twenty/assets/57673080/5bf10e51-5a07-4d55-99f1-734517b22781">
2024-06-19 14:46:47 +02:00
Atchyut Preetham Pulavarthi
1c685e8a31
fix(twenty-front): update DateTimeInput styles to apply top border radius to date picker (#5946)
update DateTimeInput styled components to prevent the StyledInput from
overflowing out of it's parent container

<img width="860" alt="Screenshot 2024-06-19 at 9 55 04 AM"
src="https://github.com/twentyhq/twenty/assets/19223383/8c5daf6a-9eb6-4ecd-a2e9-aa2ba8db3874">



Fixes #5940
2024-06-19 14:38:30 +02:00
Lucas Bordeau
76bcf31341
Added a mechanism to reset error boundary on page change. (#5913)
Previously the error boundary component was re-rendering with the same
state as long as we stayed in the same router, so for page change inside
an index container, it would stay on error state.

The fix is to memorize the location the error page is on during its
first render, and then to reset the error boundary if it gets
re-rendered with a different location even in the same index container.

Fixes : #3592
2024-06-19 14:34:11 +02:00
Ravan
c7e6d6959f
Add a ⏎ shortcut on Select options (#5641)
fixes #5540 

Added onkeyDown to 
1. Create new option and 
2. Move focus to it.

[screen-capture
(6).webm](https://github.com/twentyhq/twenty/assets/69167444/ede54ad8-22db-4b09-9617-4d999c6c08c7)

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-06-19 14:30:26 +02:00
gitstart-twenty
64b456912a
Favicons are being re-rendered on hover (#5849)
### Description

Favicons are being re-rendered on hover

### Refs

#3523

### Demo


https://www.loom.com/share/e3944d940a014283af8c26baac1fed57?sid=e3e96a81-3a54-4969-8602-99c64bb3ffe7

Fixes #3523

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-06-19 13:34:42 +02:00
Thomas Trompette
96da777107
Handle no concurrency option (#5952)
Fix error in local `teamConcurrency must be an integer between 1 and
1000`
2024-06-19 11:54:11 +02:00
Thomas Trompette
d045bcbb94
Add http status to graphql errors (#5896)
Graphql errors are not properly filtered by our handler. We still
receive errors like `NOT_FOUND` in sentry while they should be filtered.
Example
[here](https://twenty-v7.sentry.io/issues/5490383016/?environment=prod&project=4507072499810304&query=is%3Aunresolved+issue.priority%3A%5Bhigh%2C+medium%5D&referrer=issue-stream&statsPeriod=7d&stream_index=6).

We associate statuses with errors in our map
`graphQLPredefinedExceptions` but we cannot retrieve the status from the
error.

This PR lists the codes that should be filtered.

To test:
- call `findDuplicates` with an invalid id
- before, server would breaks
- now the error is simply returned
2024-06-19 10:39:09 +02:00
martmull
6fd8dab552
5582 get httpsapitwentycomrestmetadata objects filters dont work (#5906)
- Remove filters from metadata rest api
- add limite before and after parameters for metadata
- remove update from metadata relations
- fix typing issue
- fix naming
- fix before parameter

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-06-18 18:55:13 +02:00
Félix Malfait
dbaa787d19
website / Fix broken links, slow loading, and prod errors (#5932)
The code is in a bad state, this is just fixing it but not improving the
structure
2024-06-18 18:40:19 +02:00
Thomas Trompette
6b1548ebbe
Add loader and transition for details page tabs (#5935)
Closes https://github.com/twentyhq/twenty/issues/5656



https://github.com/twentyhq/twenty/assets/22936103/3e4beea2-9aa9-4015-bb99-ee22adb53b63
2024-06-18 18:38:14 +02:00
martmull
cff8561597
Upgrade pg graphql version to 1.5.6 (#5937)
- update `pg_graphql` version doc
- update `pg_graphql` version to 1.5.6
2024-06-18 17:34:16 +02:00
Hanch Han
38537a3967
Add South Korean won to currency codes (#5914)
Greetings from Seoul! I found this amazing project a few days ago, and
trying to introduce it to my team. However there is a tiny but
significant problem, that South Korean won is not available in twenty.

So I added `KRW` to the enum `CurrencyCode` and the constant
`SETTINGS_FIELD_CURRENCY_CODES`. I tested it locally and apparently
works fine.
2024-06-18 11:14:31 +02:00
Aditya Pimpalkar
14abd99bb7
add multiple filters of same FieldMetadataType (#5892)
fixes: #5378
2024-06-18 10:49:33 +02:00
Thomas Trompette
de2b0527a3
Fix secondaryLinks field input (#5911)
PR https://github.com/twentyhq/twenty/pull/5785/files broke links
update.

Also, dropdown "Add link" will be displayed only if a link is already
added. Otherwise, it should be a normal input.
2024-06-17 18:09:46 +02:00
Lucas Bordeau
e1bd3a4c5a
Added and optimized missing RatingFieldDisplay component (#5904)
The display for Rating field type was missing, I just added it based on
RatingInput in readonly mode and optimized a bit for performance also.

Fixes https://github.com/twentyhq/twenty/issues/5900
2024-06-17 17:27:19 +02:00
Thomas Trompette
dba0b28eae
Fix verticale line timeline activity (#5894)
Before 

<img width="400" alt="Capture d’écran 2024-06-17 à 10 23 17"
src="https://github.com/twentyhq/twenty/assets/22936103/01408d7b-9a6c-4a21-9f08-c8cf304e2ea0">

After

<img width="400" alt="Capture d’écran 2024-06-17 à 10 05 39"
src="https://github.com/twentyhq/twenty/assets/22936103/df384726-bbf9-4828-ad47-d1c91724947d">
2024-06-17 11:54:04 +02:00
martmull
1ba7037fdc
5581 get httpsapitwentycomrestmetadata relations not working (#5867)
Filtering relations is not allowed
(see`packages/twenty-server/src/engine/metadata-modules/relation-metadata/dtos/relation-metadata.dto.ts`)
so we remove filtering for find many relation

we also fixed some bug in result structure and metadata open-api schema
2024-06-17 10:59:29 +02:00
martmull
d8034b1f40
5236 expandable list leave options when editing (#5890)
Fixes https://github.com/twentyhq/twenty/issues/5236
## After

![image](https://github.com/twentyhq/twenty/assets/29927851/5f0f910c-11b0-40ce-9c59-34e7ce0c2741)
2024-06-17 10:17:31 +02:00
Jérémy M
d99b9d1d6b
feat: Enhancements to MessageQueue Module with Decorators (#5657)
### Overview

This PR introduces significant enhancements to the MessageQueue module
by integrating `@Processor`, `@Process`, and `@InjectMessageQueue`
decorators. These changes streamline the process of defining and
managing queue processors and job handlers, and also allow for
request-scoped handlers, improving compatibility with services that rely
on scoped providers like TwentyORM repositories.

### Key Features

1. **Decorator-based Job Handling**: Use `@Processor` and `@Process`
decorators to define job handlers declaratively.
2. **Request Scope Support**: Job handlers can be scoped per request,
enhancing integration with request-scoped services.

### Usage

#### Defining Processors and Job Handlers

The `@Processor` decorator is used to define a class that processes jobs
for a specific queue. The `@Process` decorator is applied to methods
within this class to define specific job handlers.

##### Example 1: Specific Job Handlers

```typescript
import { Processor, Process, InjectMessageQueue } from 'src/engine/integrations/message-queue';

@Processor('taskQueue')
export class TaskProcessor {

  @Process('taskA')
  async handleTaskA(job: { id: string, data: any }) {
    console.log(`Handling task A with data:`, job.data);
    // Logic for task A
  }

  @Process('taskB')
  async handleTaskB(job: { id: string, data: any }) {
    console.log(`Handling task B with data:`, job.data);
    // Logic for task B
  }
}
```

In the example above, `TaskProcessor` is responsible for processing jobs
in the `taskQueue`. The `handleTaskA` method will only be called for
jobs with the name `taskA`, while `handleTaskB` will be called for
`taskB` jobs.

##### Example 2: General Job Handler

```typescript
import { Processor, Process, InjectMessageQueue } from 'src/engine/integrations/message-queue';

@Processor('generalQueue')
export class GeneralProcessor {

  @Process()
  async handleAnyJob(job: { id: string, name: string, data: any }) {
    console.log(`Handling job ${job.name} with data:`, job.data);
    // Logic for any job
  }
}
```

In this example, `GeneralProcessor` handles all jobs in the
`generalQueue`, regardless of the job name. The `handleAnyJob` method
will be invoked for every job added to the `generalQueue`.

#### Adding Jobs to a Queue

You can use the `@InjectMessageQueue` decorator to inject a queue into a
service and add jobs to it.

##### Example:

```typescript
import { Injectable } from '@nestjs/common';
import { InjectMessageQueue, MessageQueue } from 'src/engine/integrations/message-queue';

@Injectable()
export class TaskService {
  constructor(
    @InjectMessageQueue('taskQueue') private readonly taskQueue: MessageQueue,
  ) {}

  async addTaskA(data: any) {
    await this.taskQueue.add('taskA', data);
  }

  async addTaskB(data: any) {
    await this.taskQueue.add('taskB', data);
  }
}
```

In this example, `TaskService` adds jobs to the `taskQueue`. The
`addTaskA` and `addTaskB` methods add jobs named `taskA` and `taskB`,
respectively, to the queue.

#### Using Scoped Job Handlers

To utilize request-scoped job handlers, specify the scope in the
`@Processor` decorator. This is particularly useful for services that
use scoped repositories like those in TwentyORM.

##### Example:

```typescript
import { Processor, Process, InjectMessageQueue, Scope } from 'src/engine/integrations/message-queue';

@Processor({ name: 'scopedQueue', scope: Scope.REQUEST })
export class ScopedTaskProcessor {

  @Process('scopedTask')
  async handleScopedTask(job: { id: string, data: any }) {
    console.log(`Handling scoped task with data:`, job.data);
    // Logic for scoped task, which might use request-scoped services
  }
}
```

Here, the `ScopedTaskProcessor` is associated with `scopedQueue` and
operates with request scope. This setup is essential when the job
handler relies on services that need to be instantiated per request,
such as scoped repositories.

### Migration Notes

- **Decorators**: Refactor job handlers to use `@Processor` and
`@Process` decorators.
- **Request Scope**: Utilize the scope option in `@Processor` if your
job handlers depend on request-scoped services.

Fix #5628

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-06-17 09:49:37 +02:00
Ymir
605945bd42
Added Thai Baht support (#5881)
Hey, saw Thai Baht support was
[requested](https://github.com/twentyhq/twenty/issues/5876) and thought
it was a cool first issue to get to know the project a little bit.
2024-06-16 09:39:16 +02:00
Félix Malfait
99f4a75b58
Fix website docs (#5873)
There was a 500 on the playground and the switch between core and
metadata
2024-06-14 19:05:48 +02:00
Thomas des Francs
9c8407c197
Wrote 0.20 changelog (#5870)
Created the changelog for 0.2
2024-06-14 16:59:42 +02:00
Michael Gold
3d3cef0797
fix: 404 generate API key link (#5871)
- update api key link in the docs
2024-06-14 16:48:29 +02:00
RobertoSimonini1
dd2db083ce
Record horizontal scrolling mobile (#5843)
I have fixed the scrolling the record container page on mobile making it
hidden.
This PR aims to fix #5745

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-06-14 16:27:16 +02:00
martmull
eaa2f83eb1
Fix overflow on notes (#5853)
##before

![image](https://github.com/twentyhq/twenty/assets/29927851/c1784340-0741-4701-b11f-d2cf50fab9fb)

##after

![image](https://github.com/twentyhq/twenty/assets/29927851/c095eaf1-15c4-4e68-8cff-c175f99856d0)
2024-06-14 13:11:15 +02:00
martmull
be18ee4d7d
Fix sentry error (#5848)
Fixes
https://twenty-v7.sentry.io/issues/5363536663/?environment=prod&project=4507072499810304&query=is%3Aunresolved+issue.priority%3A%5Bhigh%2C+medium%5D&referrer=issue-stream&statsPeriod=7d&stream_index=0

- handle error properly in twenty-server
- display backend error message
2024-06-14 12:41:55 +02:00
bosiraphael
82741d3b04
Fix error log on message import (#5866)
Modify #5863 to log the connected account id rather than the message
channel id to be consistent with the other logs and stringify the error.
2024-06-14 12:38:35 +02:00
martmull
28202cc9e0
Fix workspaceLogo in invite-email (#5865)
## Fixes wrong image url in email 

![image](https://github.com/twentyhq/twenty/assets/29927851/5fb1524b-874d-4723-8450-0284382bbeb3)

## Done
- duplicates and adapt `getImageAbsoluteURIOrBase64` from `twenty-front`
in `twenty-email`
- send `SERVER_URL` to email builder
2024-06-14 12:36:24 +02:00
Félix Malfait
a2e89af6b2
Collapsible menu (#5846)
A mini PR to discuss with @Bonapara tomorrow

Separating remote objects from others and making the menu collapsible
(style to be changed)
<img width="225" alt="Screenshot 2024-06-12 at 23 25 59"
src="https://github.com/twentyhq/twenty/assets/6399865/b4b69d36-6770-43a2-a5e8-bfcdf0a629ea">

Biggest issue is we don't use local storage today so the collapsed state
gets lost.
I see we have localStorageEffect with recoil. Maybe store it there?
Seems easy but don't want to introduce a bad pattern.


Todo:
- style update
- collapsible favorites
- persistent storage
2024-06-14 12:35:23 +02:00
Siddhant Rai
8d8bf1c128
fix: text field overflow beyond cell limits (#5834)
- fixes #5775 


https://github.com/twentyhq/twenty/assets/47355538/9e440018-ec1e-4faa-a9f3-7131615cf9f1

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-06-14 11:41:49 +02:00
Aditya Pimpalkar
4603999d1c
Support orderBy as array (#5681)
closes: #4301

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-06-14 11:23:37 +02:00
Charles Bochet
85fd801480
Add log for errors on message import (#5863)
As per title :)
2024-06-14 09:36:39 +02:00
Weiko
39af374de0
fix timeline activity pagination overflow (#5861)
## Before
<img width="250" alt="Screenshot 2024-06-13 at 18 51 56"
src="https://github.com/twentyhq/twenty/assets/1834158/d6c7f5fa-3cc7-48bc-a711-29345e93af92">


## After
<img width="284" alt="Screenshot 2024-06-13 at 18 51 41"
src="https://github.com/twentyhq/twenty/assets/1834158/25029e0a-c1b0-4458-b715-dbab217eeee0">
2024-06-13 19:04:53 +02:00
Thomas Trompette
00d2294728
Add label to mocked connections (#5858)
<img width="865" alt="Capture d’écran 2024-06-13 à 17 48 03"
src="https://github.com/twentyhq/twenty/assets/22936103/2d313448-fbd5-4ff1-a65b-afd4df86117a">
2024-06-13 18:56:55 +02:00
Lucas Bordeau
65fc83a763
Added a fallback default record chip generator (#5860)
The record chip generator context was missing a edge were a new field of
type relation is created and not yet in the metadata so no chip
generator function can be precomputed.

For now I added a fallback default chip generator, to prevent any bug,
but we might want to add a new chip generator function while creating
the new field ?
2024-06-13 18:28:02 +02:00
Marie
582653f9df
Bump to version 0.20.0 (#5857) 2024-06-13 17:39:46 +02:00
Weiko
93c17a8a5b
Remove timelineActivity featureFlag (#5856) 2024-06-13 17:39:31 +02:00
kikoleitao
21dbd6441a
feat: implement row re-ordering via drag and drop (#4846) (#5580)
# Context

Currently, the Twenty platform incorporates "positions" for rows on the
backend, which are functional within the Kanban view. However, this
advantageous feature has yet to be leveraged within list views.

# Feature Proposal

## Implement Row-Reordering via Drag-and-Drop on Frontend (#4846)

- This PR addresses the implementation of row reordering via
Drag-and-Drop on frontend. The objective is to enrich the list view
functionality by introducing a grip that dynamically appears upon
hovering over the left space preceding the checkbox container. This grip
empowers users to effortlessly reposition rows within the list.

#### Proposal Highlights:

- **Enhanced User Interaction**: Introduce a draggable grip to
facilitate intuitive row reordering, enhancing user experience and
productivity.
- **Preservation of Design Aesthetics**: By excluding the grip from the
first row and maintaining the left gap, we uphold design integrity while
providing enhanced functionality.
- **Consistency with Existing Features**: Align with existing
drag-and-drop functionalities within the platform, such as Favorites
re-ordering or Fields re-ordering in table options, ensuring a seamless
user experience.

## Implementation Strategy

### Grip Implementation:

- Add an extra column to the table (header + body) to accommodate the
grip cell, which displays the IconListViewGrip when its container is
hovered over.
- Ensure the preceding left-space is maintained by setting the
corresponding width for this column and removing padding from the table
container (while maintaining padding in other page elements and the
Kanban view for coherence).

### Row Drag and Drop:

- Implement row drag-and-drop functionality using draggableList and
draggableItem, based on the existing logic in the KanbanView for row
repositioning.
- Create a draggableTableBody and apply it to the current
RecordTableBody (including modal open triggering - if dragging while
sorting exists).
- Apply the draggableItem logic to RecordTableRow.

### Sorting Modal Implementation:

- Reuse the ConfirmationModel for the removeSortingModal.
- Create a new state to address the modal.
- Implement sorting removal logic in the corresponding modal file.

## Outcome

- The left-side margin is preserved.
- The grip appears upon hovering.
- Dragging a row gives it and maintains an aesthetic appearance.
- Dropping a row updates its position, and the table gets a new
configuration.
- If sorting is present, dropping a row activates a modal. Clicking on
the "Remove Sorting" button will deactivate any sorting (clicking on
"Cancel" will close the modal), and the table will revert to its default
configuration by position, allowing manual row reordering. Row
repositioning will not occur if sorting is not removed.
- The record table maintains its overall consistency.
- There are no conflicts with DragSelect functionality.


https://github.com/twentyhq/twenty/assets/92337535/73de96cc-4aac-41a9-b4ec-2b8d1c928d04

---------

Co-authored-by: Vasco Paisana <vasco.paisana@tecnico.ulisboa.pt>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-06-13 17:22:51 +02:00
Weiko
81c4939812
Fix timeline activity missing updated fields (#5854)
## Before
<img width="883" alt="Screenshot 2024-06-13 at 14 48 05"
src="https://github.com/twentyhq/twenty/assets/1834158/0e72ead1-2d59-4ee3-af3b-dfdd593b7f2e">


## After
<img width="908" alt="Screenshot 2024-06-13 at 14 48 14"
src="https://github.com/twentyhq/twenty/assets/1834158/00e32ddf-e40d-4cc9-a80a-9f5b76bd377a">
2024-06-13 15:22:15 +02:00
Lucas Bordeau
e072254555
Fixed new date time formatting util (#5852)
The new date time formatting util made for performance optimization
missed two things :
- Padding 0 for hours and minutes with 1 digit only.
- Correctly parsing the day of the month (now uses JS Date native
getDate() instead of slicing the ISO String)
2024-06-13 14:18:10 +02:00
Lucas Bordeau
6f65fa295b
Added RecordValue use-context-selector to settings field's logic (#5851)
In the settings part of the app, where display fields are used as in
table cell and board cards, we didn't have the new context selector
logic implemented, due to the recent performance optimization.
2024-06-13 12:43:13 +02:00