Commit Graph

910 Commits

Author SHA1 Message Date
gitstart-twenty
de228be5ca
AAU I want to re-order my views with drag & drop (#5002)
### Description
I want to re-order my views with drag & drop

### Refs
#4782 

### Demo
https://jam.dev/c/699ece8a-0467-494a-b9a3-faf666ee9c93

Fixes #4782

---------

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: FellipeMTX <fellipefacdir@gmail.com>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-05-15 17:57:17 +02:00
Fabio Nettis
6898c1e4d8
fix: resolve issues with edit input offset (#5426)
## Description

This PR fixes a display issue when editing the company name or the name
of a person where the edit input would be offset to the left instead of
being in the middle.


![image](https://github.com/twentyhq/twenty/assets/36916632/beb91dc1-2d3c-46a5-93aa-f8189913fece)

Fixes #5416

### Type of change

<!-- Please delete options that are not relevant. -->

- [x] Bug fix (non-breaking change which fixes an issue)

## Checklist

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream
modules
2024-05-15 16:26:14 +02:00
Thaïs
602d5422a2
feat: display Links field as Expandable List (#5374)
Closes #5114
2024-05-15 15:52:23 +02:00
Marie
38eb293b3c
Compare distant tables schema with remote tables schema (#5413)
Closes #4532 and part of #5062
2024-05-15 15:47:54 +02:00
Lucas Bordeau
cfacdfce60
Generic Profiling story to wrap any component (#5341)
This PR introduces a Profiling feature for our story book tests.

It also implements a new CI job : front-sb-test-performance, that only
runs stories suffixed with `.perf.stories.tsx`

## How it works 

It allows to wrap any component into an array of React Profiler
components that will run tests many times to have the most replicable
average render time possible.

It is simply used by calling the new `getProfilingStory` util.

Internally it creates a defined number of tests, separated by an
arbitrary waiting time to allow the CPU to give more stable results.

It will do 3 warm-up and 3 finishing runs of tests because the first and
last renders are always a bit erratic, so we want to measure only the
runs in-between.

On the UI side it gives a table of results : 

<img width="515" alt="image"
src="https://github.com/twentyhq/twenty/assets/26528466/273d2d91-26da-437a-890e-778cb6c1f993">

On the programmatic side, it stores the result in a div that can then be
parsed by the play fonction of storybook, to expect a defined threshold.

```tsx
play: async ({ canvasElement }) => {
    await findByTestId(
      canvasElement,
      'profiling-session-finished',
      {},
      { timeout: 60000 },
    );

    const profilingReport = getProfilingReportFromDocument(canvasElement);

    if (!isDefined(profilingReport)) {
      return;
    }

    const p95result = profilingReport?.total.p95;

    expect(
      p95result,
      `Component render time is more than p95 threshold (${p95ThresholdInMs}ms)`,
    ).toBeLessThan(p95ThresholdInMs);
  },
```
2024-05-15 13:50:02 +02:00
Vinod Rathod
8842292196
Fixed left padding for switcher icon on the table checkboxes #4351 (#4963)
Closes #4351  - Fixed spacing issue in TopBar file.

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-05-14 18:28:13 +02:00
Anchit Sinha
ce195826f5
4599-feat(front): Add Copy Button to Floating Inputs (#4789)
Closes #4599 

**Changes:**
- Added copy button to floating inputs of Text, Number, Phone, Link and
Email fields.

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
Co-authored-by: Weiko <corentin@twenty.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-05-14 17:02:53 +02:00
gitstart-twenty
1bc9b780e5
Show Data Skeleton Loading (#5328)
### Description

Show Data Skeleton loading

### Refs

#4460

### Demo

Figma:
https://www.figma.com/file/xt8O9mFeLl46C5InWwoMrN/Twenty?type=design&node-id=25429-70096&mode=design&t=VRxtgYCKnJkl2zpt-0

https://jam.dev/c/178878cb-e600-4370-94d5-c8c12c8fe0d5

Fixes #4460

---------

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>
2024-05-14 11:58:30 +02:00
Thomas Trompette
de438b0171
Add stripe connection option (#5372)
- Refactor creation and edition form so it handles stripe integration
and not only postgres
- Add a hook `useIsSettingsIntegrationEnabled` to avoid checking feature
flags everywhere
- Add zod schema for stripe

<img width="250" alt="Capture d’écran 2024-05-13 à 12 41 52"
src="https://github.com/twentyhq/twenty/assets/22936103/a77e7278-5d79-4f95-bddb-ae9ddd1426eb">
<img width="250" alt="Capture d’écran 2024-05-13 à 12 41 59"
src="https://github.com/twentyhq/twenty/assets/22936103/d617dc6a-31a4-43c8-8192-dbfb7157de1c">
<img width="250" alt="Capture d’écran 2024-05-13 à 12 42 08"
src="https://github.com/twentyhq/twenty/assets/22936103/c4e2d0e4-f826-436d-89be-4d1679a27861">

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-05-13 18:00:13 +02:00
Marie
b9154f315e
Enable deletion of relation fields (#5338)
In this PR
1. Enable deletion of relation fields in the product and via the api
(migration part was missing in the api)
3. Change wording, only use "deactivate" and "delete" everywhere (and
not a mix of the two + "disable", "erase")
2024-05-13 17:43:51 +02:00
Thomas Hillesøy
92acfe57a1
feat: Currencies NOK and SEK (#5359)
Related to #5351 and #5353 

Adding both currencies NOK and SEK, using icon
https://tabler.io/icons/icon/currency-krone-swedish

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-05-13 09:55:57 +02:00
Mohamed Muhsin
321ce72ec7
Add new Currencies with Corresponding Icons (#5353)
### **Description**
Add 3 new currencies

### **Refs**
https://github.com/twentyhq/twenty/issues/5351

### **Demo** 
<img width="678" alt="Screenshot 2024-05-11 at 1 30 55 AM"
src="https://github.com/twentyhq/twenty/assets/62111075/cc88ba46-cc5a-41d6-baf8-c28851c629ae">
2024-05-13 08:16:51 +02:00
brendanlaschke
eb2b89694a
Releases page (#5346)
closes #4103 

<img width="696" alt="Bildschirmfoto 2024-05-10 um 08 16 19"
src="https://github.com/twentyhq/twenty/assets/48770548/e34cd348-2522-408c-886c-636595292e0f">
2024-05-13 08:14:47 +02:00
Thaïs
0fb416d17c
fix: fix field select options positions after option removal (#5350)
- Adds an util `toSpliced`. We cannot used the native Javascript
`Array.prototype.toSpliced` method as Chromatic servers don't support
it.
- Makes sure Select field options have sequential positions after
removing an option (form validation schema checks that positions are
sequential and considers options invalid otherwise).
2024-05-10 18:31:22 +02:00
Marie
72521d5554
Disable save button while submitting form in settings (#5352)
as per title
2024-05-10 18:18:39 +02:00
Marie
ae0e31abc7
Bump versions to 0.11.2 (#5349) 2024-05-10 13:56:41 +02:00
Marie
999a66882d
[fix] Do not stringify json field value if null (#5348)
as per title 


https://github.com/twentyhq/twenty/assets/51697796/74ff0185-f20c-4ff1-9d89-3078063f23e1
2024-05-10 13:00:24 +02:00
Charles Bochet
8590bd7227
Refactor default value for select (#5343)
In this PR, we are refactoring two things:
- leverage field.defaultValue for Select and MultiSelect settings form
(instead of option.isDefault)
- use quoted string (ex: "'USD'") for string default values to embrace
backend format

---------

Co-authored-by: Thaïs Guigon <guigon.thais@gmail.com>
2024-05-10 10:26:46 +02:00
Thaïs
7728c09dba
fix: fix several field bugs (#5339)
After discussing with @charlesBochet, several fixes are needed on
fields:
- [x] Disable Boolean field `defaultValue` edition for now (On
`defaultValue` update, newly created records are not taking the updated
`defaultValue` into account. Setting the `defaultValue` on creation is
fine.)
- [x] Disable Phone field creation for now
- [x] For the Person object, display the "Phone" field as a field of
type Phone (right now its type is Text; later we'll migrate it to a
proper Phone field).
- [x] Fix RawJson field display (displaying `[object Object]` in Record
Table cells).
- [x] In Settings/Data Model, on Relation field creation/edition,
"Object destination" select is not working properly if an object was not
manually selected (displays Companies by default but creates a relation
to another random object than Companies).
2024-05-09 01:56:15 +02:00
Thaïs
005045c596
fix: fix Settings field form validation for certain field types (#5335)
Related to #4295

Following #5326, field types other than:
- `FieldMetadataType.Boolean`
- `FieldMetadataType.Currency`
- `FieldMetadataType.Relation`
- `FieldMetadataType.Select`
- `FieldMetadataType.MultiSelect`

Cannot be saved as they are not included in the form validation schema.
This PR makes sure they are included and can therefore be
created/edited.
2024-05-08 12:13:34 +02:00
Charles Bochet
863554bb13
Fix storybook (#5334)
Fixing the last broken stories, tests should be back to green!
2024-05-08 09:28:28 +02:00
Indrakant D
770ee11b9c
fix: Blue Button Secondary Color Issue in Dark Mode (#5333)
fixes
[#5305](https://github.com/twentyhq/twenty/issues/5305#issue-2280997523)

light mode:

<img width="738" alt="Screenshot 2024-05-08 at 2 24 41 AM"
src="https://github.com/twentyhq/twenty/assets/60315832/de01bbfa-6b54-4149-9930-b38840483ddf">

<br>
<br>

dark mode

<img width="735" alt="Screenshot 2024-05-08 at 2 24 55 AM"
src="https://github.com/twentyhq/twenty/assets/60315832/7c2bbc3e-e999-42ff-a320-8bf84bce8384">
2024-05-08 08:53:26 +02:00
Charles Bochet
eef497cb57
Fix front jest tests (#5331) 2024-05-08 01:49:49 +02:00
Thaïs
bb995d5488
refactor: use react-hook-form for Field type config forms (#5326)
Closes #4295

Note: for the sake of an easier code review, I did not rename/move some
files and added "todo" comments instead so Github is able to match those
files with their previous version.
2024-05-07 21:07:56 +02:00
Thaïs
b7a2e72c32
fix: fix storybook pages tests coverage (#5319) 2024-05-07 21:05:45 +02:00
Charles Bochet
ce4e78aa85
Fix Rest API id UUID error (#5321)
A user has reported an issue with REST API.
We have recently migrated the graphql IDs from UUID to ID type. As Rest
API is leveraging the graphql API under the hood, the Rest API query
builder should be updated accordingly
2024-05-07 21:04:45 +02:00
Marie
7c3e82870c
[fix] Increment cache version after object/field/relation update (#5316)
Fixes #5276.

Updates were not triggering a cache version incrementation because they
do not trigger migrations while that is where the caching version logic
was.
We have decided to move the cache incrementation logic to the services.
2024-05-07 16:30:25 +02:00
Thaïs
b0d1cc9dcb
feat: add links to Links field (#5223)
Closes #5115, Closes #5116

<img width="242" alt="image"
src="https://github.com/twentyhq/twenty/assets/3098428/ab78495a-4216-4243-8de3-53720818a09b">

---------

Co-authored-by: Jérémy Magrin <jeremy.magrin@gmail.com>
2024-05-07 15:05:18 +02:00
gitstart-twenty
d10efb15d5
Add unit tests on object record mutation and query hooks (#5014)
### Description
Add unit tests on object record mutation and query hooks

### Refs
#4884

### Demo
![Screenshot 2024-04-18 at 15 16
19](https://github.com/twentyhq/twenty/assets/140154534/c75f716a-725e-43eb-a703-3db29065fb18)

Fixes #4884

---------

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: Toledodev <rafael.toledo@engenharia.ufjf.br>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-05-07 14:04:55 +02:00
Thaïs
d0759ad7cc
refactor: use react-hook-form to validate Settings/DataModel/Field (#4916)
Closes #4295
2024-05-07 11:44:46 +02:00
Sean Hellwig
5f467ab5ca
Removes erroneous debugger call in twenty-front (#5311)
Erroneous debugger call throws an error in twenty-front app console

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-05-06 19:45:14 +02:00
Charles Bochet
2c9f50ecb1
Fix enum defaultValue issues (#5307)
This PR fixes several issues:
- enum naming should be: {tableName}_{fieldName}_enum and respecting the
case
- defaultValue format handled in the FE should respect the one in the BE

In my opinion we should refactor the defaultValue:
- we should respect backend format: "'myDefault'" for constant default
and "0" for float, "now" for expressions, "true" for booleans. we can
rename it to defaultValueExpression if it is more clear but we should
not maintain a parallel system
- we should deprecate option: isDefaultValue which is confusing
- we should re-work backend to have a more unified approach between
fields and avoid having if everywhere about select, multiselect, and
currency cases. one unified "computeDefaultValue" function should do the
job

What is still broken:
- currency default Value on creation. I think we should do the refactor
first
- select default value edition.
These cases do not break the schema but are ignored currently
2024-05-06 17:00:38 +02:00
Pacifique LINJANJA
ff77a4ee21
Feat/migrate password reset token to app token table (#5051)
# This PR

- Fix #5021 
- Migrates `passwordResetToken` and `passwordResetTokenExpiresAt` fields
from `core.users` to `core.appToken`
- Marks those fields as `deprecated` so we can remove them later if we
are happy with the transition -- I took this decision on my own,
@FellipeMTX let me know what you think about it, we can also remove them
straight away if you think it's better
- Fixed the `database:migration` script from the `twenty-server` to:
```json
    "database:migrate": {
      "executor": "nx:run-commands",
      "dependsOn": ["build"], // added this line
      "options": {
        "cwd": "packages/twenty-server",
        "commands": [
          "nx typeorm -- migration:run -d src/database/typeorm/metadata/metadata.datasource",
          "nx typeorm -- migration:run -d src/database/typeorm/core/core.datasource"
        ],
        "parallel": false
      }
    },
```
The migration script wasn't running because the builds were not executed
- [x] Added unit tests for the token.service file's changes

Looking forward to hearing feedback from you

cc: @charlesBochet

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-05-06 15:30:03 +02:00
Orinami Olatunji
a1c95b92ab
feat: add sign out and book a call buttons to "Choose your plan" page (#5292)
Resolves #5281

<img width="399" alt="buttions-light"
src="https://github.com/twentyhq/twenty/assets/16918891/d1a0ba4e-696e-476b-a792-01ae19a06a55">
<img width="390" alt="buttons-dark"
src="https://github.com/twentyhq/twenty/assets/16918891/40bea83b-bc32-45ea-a522-ecf8239cfe51">
2024-05-06 10:48:34 +02:00
martmull
77c0dee846
Add missing info from verify mutation (#5283)
Fix wrong error billing message
2024-05-04 15:21:37 +02:00
Thaïs
fc87a51acf
fix: fix storybook:build memory allocation error in CI (#5284) 2024-05-03 19:19:21 +02:00
Charles Bochet
839a7e2a10
Bump versions to 0.11 (#5289)
As per title! 
Bumping to 0.11.1 as we have already merged a few minor upgrades on top
of 0.11
2024-05-03 19:11:03 +02:00
Charles Bochet
6fda55609f
Fix Filtered index view infinite re-render (#5286)
The whole viewBar component was re-rendered on view changes which was
introducing performance issue. The need was to compute page title, this
should be done in a lower level component
2024-05-03 19:10:55 +02:00
Charles Bochet
a750901582
Remove Feature Flag on Calendar (#5288)
Remove Calendar feature Flag!
2024-05-03 19:10:33 +02:00
Thomas Trompette
a5a9e0e238
Remove isMultiSelect feature flag (#5280)
As title

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-05-03 16:30:58 +02:00
Thomas Trompette
5285a428d1
Fix export with relations (#5279)
As title. Only relations are exported right now

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-05-03 16:14:37 +02:00
Weiko
2a0c74ab0f
[calendar] Fix calendar sync status (#5272)
## Context
There is no calendarChannel syncStatus column compared to the
messageChannel table. In the meantime, we are trying to infer its status
based on the fact that the connection hasn't failed and the sync is
enabled
2024-05-03 15:32:34 +02:00
martmull
87994c26ff
4900 multi select field front implement expanded cells (#5151)
Add expanded cell


https://github.com/twentyhq/twenty/assets/29927851/363f2b44-7b3c-4771-a651-dfc4014da6ac


![image](https://github.com/twentyhq/twenty/assets/29927851/741bb0f9-fd1e-4a38-8b0e-71e144376876)
2024-05-03 15:03:06 +02:00
Thaïs
1351a95754
fix: fix storybook coverage task (#5256)
- Fixes storybook coverage command: the coverage directory path was
incorrect, but instead of failing `storybook:test --configuration=ci`,
it was hanging indefinitely.
- Switches back to `concurrently` to launch `storybook:static` and
`storybook:test` in parallel, which allows to use options to explicitly
kill `storybook:static` when `storybook:test` fails.
- Moves `storybook:test --configuration=ci` to its own command
`storybook:static:test`: used in the CI, and can be used locally to run
storybook tests without having to launch `storybook:dev` first.
- Creates command `storybook:coverage` and enables cache for this
command.
- Fixes Jest tests that were failing.
- Improves caching conditions for some tasks (for instance, no need to
invalidate Jest test cache if only Storybook story files were modified).
2024-05-03 14:59:09 +02:00
Weiko
50421863d4
Fix filter transform with logic operators (#5269)
Various fixes

- Remote objects are read-only for now, we already hide and block most
of the write actions but the button that allows you to add a new record
in an empty collection was still visible.
- CreatedAt is not mandatory on remote objects (at least for now) so it
was breaking the show page, it now checks if createdAt exists and is not
null before trying to display the human readable format `Added x days
ago`
- The filters are overwritten in query-runner-args.factory.ts to handle
NUMBER field type, this was only working with filters like
```
      {
        "id": {
          "in": [
            1
          ]
        }
```
but not with more depth such as 
```
    "and": [
      {},
      {
        "id": {
          "in": [
            1
          ]
        }
      }
    ]
 ```
- Fixes CREATE FOREIGN TABLE raw query which was missing ",".
2024-05-03 14:52:20 +02:00
Thomas Trompette
f9c19c839b
Build stripe integration on backend side (#5246)
Adding stripe integration by making the server logic independent of the
input fields:
- query factories (remote server, foreign data wrapper, foreign table)
to loop on fields and values without hardcoding the names of the fields
- adding stripe input and type
- add the logic to handle static schema. Simply creating a big object to
store into the server

Additional work:
- rename username field to user. This is the input intended for postgres
user mapping and we now need a matching by name

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-05-02 17:13:15 +02:00
Thaïs
5128ea3ffb
fix: fix storybook build script not found by Chromatic (#5235) 2024-05-02 16:15:36 +02:00
Charles Bochet
f802964de4 Bump to 0.10.6 2024-05-02 15:55:11 +02:00
Weiko
8d90c60ada
[calendar] hide calendar settings until implemented (#5252)
## Context
Those settings are not implemented yet, we would like to move them to a
different page as well.
In the meantime, we are hiding them since we plan to launch calendar in
the next release and this won't be implemented before.

We will implement it in this
https://github.com/twentyhq/twenty/issues/5140
2024-05-02 15:47:43 +02:00
Marie
1da64c7715
[feat] Minor updates to the edit db connection page (#5250)
- Add placeholders in db connection edit page
- Fix icon alignement and size (should not change) in Info banner
2024-05-02 15:25:54 +02:00
Charles Bochet
27a3d7ec27 Bump to 0.10.5 2024-05-02 11:00:24 +02:00
gitstart-app[bot]
268c6b44d9
Enable phone field type (#5052)
### Description

 Enable phone field type

### Refs

https://github.com/twentyhq/twenty/issues/2700

### Demo


https://github.com/twentyhq/twenty/assets/140154534/e9810718-9916-4ad4-a080-4d718777de15

Fixes #2700

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-05-01 15:47:19 +02:00
gitstart-app[bot]
485670c823
Add relation in CSV exports (#5085)
### Description

Add Relation Id to Table in CSV exports

### Demo

Before:


<https://www.loom.com/share/c853cf32767947dcb23a91363bff52c4?sid=0295b6ee-4510-47f8-8ba9-b81b5182985a>

After:


<https://www.loom.com/share/5aa4f87a266c4d96881170a38e063fc0?sid=44eed60c-01a2-406f-9bac-af162e39b66e>

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Chiazokam <chiazokamecheta@gmail.com>
2024-05-01 15:24:23 +02:00
Thaïs
0d023e5e77
feat: update links field (#5212)
Closes #5113

---------

Co-authored-by: Jérémy Magrin <jeremy.magrin@gmail.com>
2024-05-01 14:56:55 +02:00
Thaïs
8853226d17
feat: add Links field type (#5176)
Closes #5113

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-05-01 11:56:14 +02:00
Marie
e0ece3c917
Rename types for UserMappingOptions (#5230)
Following #5210

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-05-01 11:46:47 +02:00
Charles Bochet
bf7c4a5a89 Fix restrictive javascript heap memory 2024-04-30 19:17:12 +02:00
Charles Bochet
b7c2f83abf
Fix sign up (#5231)
Sign up was broken by #5199
2024-04-30 18:48:07 +02:00
Charles Bochet
7dad6e3b5e Re-add chromatic CI 2024-04-30 18:21:08 +02:00
Charles Bochet
ccd1100773
Fix tests (#5228)
Fixing typecheck + storybook:modules!
2024-04-30 17:54:07 +02:00
Marie
1b2ed80c1c
[feat][Remote objects] Edit a connection (for pg) (#5210)
## Context
#4774 

## How was it tested
Locally

## In further PRs
- Update connection status upon page change
- Adapt Info banner to dark mode
- placeholders for form
2024-04-30 17:46:30 +02:00
gitstart-twenty
9ad68ffe84
Favorites should be user-level not workspace-level (#5186)
### Description
Favorites should be user-level not workspace-level

### Refs
#3374

### Demo


https://github.com/twentyhq/twenty/assets/140154534/38a34cc7-ac58-494f-92d5-e15c43ae542e

Fixes #3374

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-04-30 16:42:44 +02:00
Thaïs
c193663a71
chore: use Nx affected tasks in CI (#5110)
Closes #5097

- Uses "nx affected" to detect what projects need to be checked in the
current PR (for now, `ci-front` and `ci-server` workflows only).
- Caches results of certain tasks (`lint`, `typecheck`, `test`,
`storybook:build`) when a PR pipeline runs. The next runs of the same
PR's pipeline will then be able to reuse the PR's task cache to execute
tasks faster.
- Caches Yarn's cache folder to install dependencies faster in CI jobs.
- Rewrites the node modules cache/install steps as a custom, reusable
Github action.
- Distributes `ci-front` jobs with a "matrix" strategy.
- Sets common tasks config at the root `nx.json`. For instance, to
activate the `typecheck` task in a project, add `typecheck: {}` to its
`project.json` and it'll use the default config set in `nx.json` for the
`typecheck` task. Options can be overridden in each individual
`project.json` if needed.
- Adds "scope" tags to some projects: `scope:frontend`, `scope:backend`,
`scope:shared`. An eslint rule ensures that `scope:frontend` only
depends on `scope:frontent` or `scope:shared` projects, same for
`scope:backend`. These tags are used by `nx affected` to filter projects
by scope and generates different task cache keys according to the
requested scope.
- Enables checks for twenty-emails in the `ci-server` workflow.
2024-04-30 16:28:25 +02:00
bosiraphael
7c605fc2f9
4002 prevent user from creating twice the same blocklist item (#5213)
Closes #4002
2024-04-30 14:36:33 +02:00
Thomas Trompette
3a61c922f1
Import full distant schema and store in remote server (#5211)
We should not depend on the foreign data wrapper type to manage distant
table. The remote server should be enough to handle the table creation.

Here is the new flow to fetch available tables:
- check if the remote server have available tables already stored
- if not, import full schema in a temporary schema
- copy the tables into the available tables field 
- delete the schema

Left todo:
- update remote server input for postgres so we receive the schema

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-04-30 14:18:33 +02:00
bosiraphael
907f0a1ea6
Add feature flag gate on calendar settings dropdown and fix queries (#5221)
- Add feature flag gate on calendar settings dropdown
- Fix find many messages
- Fix connected accounts settings
2024-04-30 14:12:48 +02:00
Weiko
95d80af0c6
Remove debounce on filter search bar (#5215)
A search bar has been introduced in the filter dropdown menu however we
don't want to apply debounce since the search has no side-effect and is
purely FE (it's not querying the DB compared to other search bars). Also
adding autofocus on the search bar when the dropdown is open.
2024-04-30 10:44:32 +02:00
Charles Bochet
fab385179b Fix Favorites issue 2024-04-30 00:38:22 +02:00
Charles Bochet
dd366dba47 Bump version to 0.10.4 2024-04-29 23:48:15 +02:00
Charles Bochet
6a14b1c6d6
Fix tasks (#5199)
## Query depth deprecation

I'm deprecating depth parameter in our graphql query / cache tooling.
They were obsolete since we introduce the possibility to provide
RecordGqlFields

## Refactor combinedFindManyRecordHook

The hook can now take an array of operationSignatures

## Fix tasks issues

Fix optimistic rendering issue. Note that we still haven't handle
optimisticEffect on creation properly
2024-04-29 23:33:23 +02:00
gitstart-app[bot]
c946572fde
TWNTY-4203 - Improve Email Thread Visibility with Collapse/Expansion Rules (#5202)
### Description

Improve Email Thread Visibility with Collapse/Expansion Rules

### Refs
#4203

### Demo


https://github.com/twentyhq/twenty/assets/140154534/ece1d783-57ef-45c9-9895-3b4b0e02b9e2


Fixes #4203

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
2024-04-29 18:10:42 +02:00
Vinod Rathod
6065201acd
Implemented Search Feature in Filter Menu (#5068)
Closes #4367
2024-04-29 17:59:26 +02:00
hnrykm
6e87554445
updated: removed gradient from onboarding buttons (#5178)
Fixes #5168

- Added primaryInverted and primaryInvertedHover to design system.
- Changed primary button background with a gradient to inverted-flat for
both light and dark themes.
- Hover added to go lighter (consistent with tertiary color of +5 step
on GRAY_SCALE).
- Font color changed from primary to inverted.
- Modified button border from light to strong.

Two components are still utilizing the button with gradient background -
email and chrome extension.
Figma design guidelines show them to be inverted and flat (not
gradient).

- Should I change those as well?
- Should the gradient style be removed altogether after this has been
completed?

Co-authored-by: Henry Kim <henrykim@Henrys-iMac.local>
2024-04-29 16:11:42 +02:00
Shubham Kumar
a064708d8b
chore: add sentry captureException for global error logging (#5198)
I have added error logging to Sentry using Sentry.captureException. The
_info object which includes the componentStack will be sent in extra
data along with the exception.
2024-04-29 15:53:57 +02:00
Charles Bochet
27cd577dbb Fix login by email blocked 2024-04-26 18:22:36 +02:00
Charles Bochet
b15533e4b3 Bump version to 0.10.3 2024-04-26 17:52:13 +02:00
Thaïs
8beec03762
fix: fix SignInUpForm Continue button being disabled (#5185)
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-04-26 16:27:40 +02:00
Hinson Chan
e1d0b26cf9
5180 - does not call debounced update for invalid names (#5181)
fix: #5180 

Previously, clearing your name would kick you to the profile creation
page.


https://github.com/twentyhq/twenty/assets/68029599/8c0087da-6b03-4b6e-b202-eabe8ebcee18


Fixed so it checks your name is valid before calling the debounced
update


https://github.com/twentyhq/twenty/assets/68029599/4bc71d8f-e4f4-49ae-9cb8-497bd971be94

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-04-26 15:23:03 +02:00
Thomas Trompette
224c8d361b
Setup relations for remote objects (#5149)
New strategy:
- add settings field on FieldMetadata. Contains a boolean isIdField and
for numbers, a precision
- if idField, the graphql scalar returned will be a GraphQL id. This
will allow the app to work even for ids that are not uuid
- remove globals dateScalar and numberScalar modes. These were not used
- set limit as Integer
- check manually in query runner mutations that we send a valid id

Todo left:
- remove WorkspaceBuildSchemaOptions since this is not used anymore.
Will do in another PR

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
Co-authored-by: Weiko <corentin@twenty.com>
2024-04-26 14:37:34 +02:00
Deepak Kumar
dc576d0818
GH-3546 Recaptcha on login form (#4626)
## Description

This PR adds recaptcha on login form. One can add any one of three
recaptcha vendor -
1. Google Recaptcha -
https://developers.google.com/recaptcha/docs/v3#programmatically_invoke_the_challenge
2. HCaptcha -
https://docs.hcaptcha.com/invisible#programmatically-invoke-the-challenge
3. Turnstile -
https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/#execution-modes

### Issue
- #3546 

### Environment variables - 
1. `CAPTCHA_DRIVER` - `google-recaptcha` | `hcaptcha` | `turnstile`
2. `CAPTCHA_SITE_KEY` - site key
3. `CAPTCHA_SECRET_KEY` - secret key

### Engineering choices
1. If some of the above env variable provided, then, backend generates
an error -
<img width="990" alt="image"
src="https://github.com/twentyhq/twenty/assets/60139930/9fb00fab-9261-4ff3-b23e-2c2e06f1bf89">
    Please note that login/signup form will keep working as expected.
2. I'm using a Captcha guard that intercepts the request. If
"captchaToken" is present in the body and all env is set, then, the
captcha token is verified by backend through the service.
3. One can use this guard on any resolver to protect it by the captcha.
4. On frontend, two hooks `useGenerateCaptchaToken` and
`useInsertCaptchaScript` is created. `useInsertCaptchaScript` adds the
respective captcha JS script on frontend. `useGenerateCaptchaToken`
returns a function that one can use to trigger captcha token generation
programatically. This allows one to generate token keeping recaptcha
invisible.

### Note
This PR contains some changes in unrelated files like indentation,
spacing, inverted comma etc. I ran "yarn nx fmt:fix twenty-front" and
"yarn nx lint twenty-front -- --fix".

### Screenshots

<img width="869" alt="image"
src="https://github.com/twentyhq/twenty/assets/60139930/a75f5677-9b66-47f7-9730-4ec916073f8c">

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-04-25 23:52:28 +02:00
martmull
44855f0317
Fix broken billing portal when subscription canceled (#5082)
Fix billing portal link for canceled subscription
2024-04-25 18:33:49 +02:00
bosiraphael
d23e02adca
4001 add validation for blocklist (#5172)
Closes #4001
2024-04-25 15:32:55 +02:00
Vinod Rathod
4af2c5f298
Added a search box in sort menu (#5045)
Closes #4368

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-04-25 15:31:41 +02:00
Orinami Olatunji
0ccbdacb5a
feat: Status tags can show loader to complement displayed text (#5137)
Resolves #5134 



https://github.com/twentyhq/twenty/assets/16918891/48475f1b-a61f-4b87-8b9b-1271a183ac4b

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-04-25 10:27:17 +02:00
Hinson Chan
a283a3deed
5161 - fix workspace icon is missing on multi-workspace (#5165)
Fixes #5161

<img width="179" alt="image"
src="https://github.com/twentyhq/twenty/assets/68029599/5a7a5b11-c6ec-4f1f-b94d-37be470a7f79">

detail: before this PR, the icon would display as normal for the default
data:// icons, but not for uploaded files
(`workspace-logo/original/{}.png` for example). This PR fixes this by
calling the getImageAbsoluteURIOrBase64 function to resolve the missing
path.
2024-04-25 10:01:44 +02:00
Orinami Olatunji
2b8116f57f
fix: Calendar events participated in should be displayed in red (#5146)
Resolves #5131
2024-04-25 09:56:23 +02:00
Orinami Olatunji
adbc8ab96f
#5073 - fix datepicker styling in dark mode (#5074)
This PR fixes three issues with the datepicker in dark mode. The
following UI elements now appear in light colors when the theme is set
to dark mode:

- The selected date.
- The clock icon.
- The date time input component.

Before:
<img width="1003" alt="theming bug"
src="https://github.com/twentyhq/twenty/assets/16918891/914b7043-e692-4de8-8440-ddd89cbf3973">

After:
<img width="374" alt="dark_theme_calendar_after"
src="https://github.com/twentyhq/twenty/assets/16918891/346fd950-1ef8-405e-9486-59abb81f92db">
<img width="347" alt="light_theme_calendar_after"
src="https://github.com/twentyhq/twenty/assets/16918891/17463094-53e5-4bc4-8812-a53a37cd08ed">

#5073

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-04-24 15:18:26 +02:00
martmull
87a9ecee28
D gamer007/add microsoft oauth (#5103)
Need to create a new branch because original branch name is `main` and
we cannot push additional commits
Linked to https://github.com/twentyhq/twenty/pull/4718


![image](https://github.com/twentyhq/twenty/assets/29927851/52b220e7-770a-4ffe-b6e9-468605c2b8fa)

![image](https://github.com/twentyhq/twenty/assets/29927851/7a7a4737-f09f-4d9b-8962-5a9b8c71edc1)

---------

Co-authored-by: DGamer007 <prajapatidhruv266@gmail.com>
2024-04-24 14:56:02 +02:00
Dev
b634057fdd
Fix ellipsis overflow causing edit icon to be hidden on links (#5071)
Fixes #5064 

### Demo


https://github.com/twentyhq/twenty/assets/21654351/28ab7374-c57e-4f7e-9720-05138c53a33d

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-04-24 13:27:59 +02:00
Aditya Pimpalkar
c63ee519ea
feat: oauth for chrome extension (#4870)
Previously we had to create a separate API key to give access to chrome
extension so we can make calls to the DB. This PR includes logic to
initiate a oauth flow with PKCE method which redirects to the
`Authorise` screen to give access to server tokens.

Implemented in this PR- 
1. make `redirectUrl` a non-nullable parameter 
2. Add `NODE_ENV` to environment variable service
3. new env variable `CHROME_EXTENSION_REDIRECT_URL` on server side
4. strict checks for redirectUrl
5. try catch blocks on utils db query methods
6. refactor Apollo Client to handle `unauthorized` condition
7. input field to enter server url (for self-hosting)
8. state to show user if its already connected
9. show error if oauth flow is cancelled by user

Follow up PR -
Renew token logic

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2024-04-24 11:45:16 +02:00
Lucas Bordeau
444e97fa3e
Fixed date picker UI that was too overloaded (#5039)
Date picker UI was off because of the recent refactor with new field
types Date and DateTime. We had to allow the date picker to edit both.

In this PR we come back to the previous design and we only use the input
to modify time.

Also we use our Select component instead of the ones from the library
`react-datepicker`

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-04-23 18:45:32 +02:00
Marie
ff39ba5a15
[fix] Support non latin characters in schema names (#5063)
Fixes #4943

## How was it tested?
Local (front + /metadata)
Unit tests for utils

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-04-23 13:37:29 +02:00
Orinami Olatunji
8f6460bec5
#4976 fix dark mode for multi-select picker in activity target chips (#5111)
#4976 - Fixed the dark mode for multi-select picker in
ActivityTargetChips.

Bug:

![image](https://github.com/twentyhq/twenty/assets/16918891/53f55bba-f692-4dc9-a6b6-440d4ff5b278)

Fix:


https://github.com/twentyhq/twenty/assets/16918891/8e72cd02-0956-468d-b898-a10313448f62

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-04-23 11:46:05 +02:00
Ikko Eltociear Ashimine
0db35c9a5f
Fix typo in config/index.ts (#5109)
seperate -> separate
2024-04-23 11:22:31 +02:00
Marie
68662fa543
[refacto] Introduce stateless TextInputV2 (#5013)
## Context
As discussed with @lucasbordeau and @charlesBochet we are looking at
making low level UI components stateless when possible.
Therefore TextInput should not handle a hotkey state. Instead hotkeys
should be defined in the parent component (as done here in
CreateProfile).

Introducing here TextInputV2 that is stateless and that can already
replace TextInput without any behaviour change everywhere it is used
with `disableHotkey` prop.

## How was it tested?
Locally + Storybook

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-04-22 11:19:41 +02:00
Charles Bochet
4bd2cdd580
Load all data on record boards (#5070)
## Context

For users with many records, only the first n*60 records were loaded on
board views (n being the number of visible columns). This was because of
the following behavior:
- watch for end of column visibility changes. If an end of column is
visible, try to fetch more. However, watching for visbility changes is
not reliable enough.

## What we want

If an end of column is visible, try to fetch more. If no more records is
availble in pagination, do not fetch more
2024-04-19 23:39:19 +02:00
Thaïs
d3170fc1ea
fix: fix root start script (#5032)
Fixes #5022

See https://nx.dev/recipes/running-tasks/root-level-scripts#setup
2024-04-19 18:28:02 +02:00
Félix Malfait
d145684966
New Timeline (#4936)
Refactored the code to introduce two different concepts:
- AuditLogs (immutable, raw data)
- TimelineActivities (user-friendly, transformed data)

Still some work needed:
- Add message, files, calendar events to timeline (~2 hours if done
naively)
- Refactor repository to try to abstract concept when we can (tbd, wait
for Twenty ORM)
- Introduce ability to display child timelines on parent timeline with
filtering (~2 days)
- Improve UI: add links to open note/task, improve diff display, etc
(half a day)
- Decide the path forward for Task vs Notes: either introduce a new
field type "Record Type" and start going into that direction ; or split
in two objects?
- Trigger updates when a field is changed (will be solved by real-time /
websockets: 2 weeks)
- Integrate behavioral events (1 day for POC, 1 week for
clean/documented)

<img width="1248" alt="Screenshot 2024-04-12 at 09 24 49"
src="https://github.com/twentyhq/twenty/assets/6399865/9428db1a-ab2b-492c-8b0b-d4d9a36e81fa">
2024-04-19 17:52:57 +02:00
Arun Kumar
e0efa358de
Fixes #5024: Update local recoil state when workspace name changes (#5033)
This PR fixes #5024.

Local recoil state was not updated when workspace name is changed. This
PR updates local recoil state so that dropdown (and other parts of the
app) correctly shows the workspace name without reload.
2024-04-18 16:54:32 +02:00
Charles Bochet
d07dc11124
Fix activity Target picker not being displayed (#5040)
<img width="1025" alt="image"
src="https://github.com/twentyhq/twenty/assets/12035771/3f37ed27-661e-43ea-bc15-f59efa12bfca">
2024-04-18 16:16:12 +02:00
martmull
1c1a055c94
Improve multi word filtering (#5034)
improve multi word search

closes #4212 
closes #3386
2024-04-18 15:46:59 +02:00
Lucas Bordeau
88c14b7e52
Fix Record Inline Cell position on Edit mode (#5038)
Fixed 0.5 offset of inline cell edit mode
2024-04-18 15:46:40 +02:00
Lucas Bordeau
dc91d06e1b
Fixed position in query fields (#5036)
Position was not passed to the request query fields so it changed every
time we updated a field.
2024-04-18 15:24:28 +02:00
Lucas Bordeau
df49575c3e
Fix component id to scope id (#5035)
This pull request fixes the component id to scope id in the
useUpsertRecordV2 function.
2024-04-18 15:24:15 +02:00
bosiraphael
8702c71d45
4746 create created listener on blocklist (#5031)
Closes #4746 for messaging.

I will create another PR to implement the listener on calendar.
2024-04-18 15:06:13 +02:00
Charles Bochet
c42fcf435a Improve performance on TableBody but disable shadow on first column freeze 2024-04-18 14:45:45 +02:00
Zoltán Völcsey
c402631067
fix: Added isDisplayModeContentEmpty to the showEditButton's check (#5025)
Closes #5011 

Hi! I added isDisplayModeContentEmpty to the showEditButton's check.


https://github.com/twentyhq/twenty/assets/41576384/54a87c16-b58a-4a46-8373-f6c924201113
2024-04-18 13:47:12 +02:00
gitstart-twenty
168358a327
Implement a masked currency input (#5010)
### Description
Implement a masked currency input

### Refs
#4358 

### Demo
https://jam.dev/c/93da117c-b193-488f-b9f9-906b33ac5190

Fixes #4358

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Toledodev <rafael.toledo@engenharia.ufjf.br>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-04-18 13:44:07 +02:00
Lucas Bordeau
bc5cfd046c
Fixed default currency code in currency field (#5028)
Default currency logic was not handling a specific case where the
default currency is empty in the field metadata.

I fixed the ternary cascade and made it more explicit, thus also
avoiding falling into having an empty currency code being persisted.
2024-04-18 11:25:17 +02:00
Thaïs
7065495223
fix: attempt to fix Dockerfile front build (#5020) 2024-04-18 11:24:39 +02:00
Lucas Bordeau
86afc34e61
Speed up RecordTableCell by 5x (#5023)
Improved table cell performances by putting all hooks from
RecordTableCell in RecordTableContext and RecordTable component, so that
each cell now only subscribes to a reference to those hooks' returned
function.

We couldn't do memoization here since the problem is not to memoize
between re-renders but to share the same function reference between
hundreds of different components, so a context it the fastest way for
this.

I had to refactor the hooks a little bit so that they take as arguments
what was previously taken from the cell's context.
2024-04-18 10:44:00 +02:00
Marie
3e60c0050c
[fix] Fix white screen when error handled by AppErrorBoundary (#5017)
[In a previous PR](https://github.com/twentyhq/twenty/pull/5008) I was
fixing dark mode by calling useTheme in AppErrorBoundary while there was
actually no parent ThemeProvider. This was causing a bug when an error
was actually intercepted by AppErrorBoundary because theme was empty.

Now I am providing the error theme in GenericErrorFallback, fallbacking
to THEME_LIGHT as it can be called from outside a ThemeProvider (as it
is the case today), but also reading into ThemeProvider in case we end
up using this component in a part of the application where it is
available, not to necessarily use THEME_LIGHT.

## How was it tested?
with @thaisguigon 
Locally (dark mode works + error mode works (throwing an error in
RecoilDebugObserver))
2024-04-18 10:42:30 +02:00
Deepak Kumar
5c30509d21
GH-4362 Add syncing status (#4950)
This PR adds a `syncing` status on frontend.

Issue
- #4362

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-04-17 22:06:52 +02:00
Charles Bochet
a52f2e5bd9
Fix Storybook stories (Datamodel edition / preview / signOut) (#5019)
As per title ; some small changes on broken stories
2024-04-17 18:48:41 +02:00
Pacifique LINJANJA
627a6bda29
Update twenty-front commands (#4667)
# This PR

- Moves dev and ci scripts to the `project.json` file in the
twenty-front package
- Adds a project.json file in the root of the project with the main
start command that start both twenty-server and twenty-front
applications concurrently
- Updates the script command of the root project with the start:prod
command (replacing the start command which will be used in dev with the
help of nx)
- Add a start:prod command in the twenty-front app, replacing the start
command (now used for dev purpose)

Issue ref #4645 

@charlesBochet @FelixMalfait please let me know how can I improve it

---------

Co-authored-by: Thaïs Guigon <guigon.thais@gmail.com>
2024-04-17 18:06:02 +02:00
Anchit Sinha
1ab31f4cac
4798-feat(front): Add calendar settings option in settings account dropdown (#4997)
Closes #4798 


![image](https://github.com/twentyhq/twenty/assets/22574091/cbdd941a-47bf-4bf4-982d-cc9538586e85)

---------

Co-authored-by: bosiraphael <raphael.bosi@gmail.com>
2024-04-17 17:41:24 +02:00
gitstart-twenty
d54e690f0d
Fix explicit boolean predicates rule not working with boolean constants (#5009)
### Description
Fix explicit boolean predicates rule not working with boolean constants

### Refs
#4881

### Demo

Fixes #4881

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>
2024-04-17 17:06:37 +02:00
Thomas Trompette
6cf3ade300
Make id available in remote table output (#5003)
Wrongly use `PrimaryGeneratedColumn` typeOrm decorator instead of the
nest query one.

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-04-17 17:05:47 +02:00
Charles Bochet
d02509b1b6
Fix chromatic tests (#5012) 2024-04-17 16:56:39 +02:00
Marie
ac9ccbc2b5
[fix] Fix dark mode (#5008)
## Context
Fixing broken dark mode
<img width="826" alt="Capture d’écran 2024-04-17 à 15 50 39"
src="https://github.com/twentyhq/twenty/assets/51697796/94df50bd-5b43-4def-a39d-268a10ac560a">

## How was it tested
Locally
Test of dark mode on storybook is added on another PR
2024-04-17 16:54:03 +02:00
Charles Bochet
75fd430149
Increase storybook pages coverage (#4885)
On FE:
- refreshing metadata mocks
- updating jest tests
- fixing storybook pages coverage
- fixing storybook modules coverage
2024-04-17 16:24:04 +02:00
martmull
64cc6ecc3b
Fix relation field type (#4992) 2024-04-17 14:56:27 +02:00
Zoltán Völcsey
cf50391b00
fix: Display hidden columns and separator conditionally (#4982)
Closes #4979 

Hi! `RecordTableHeaderPlusButtonContent.tsx` component displays hidden
columns and separator, only if length of `hiddenTableColumns` array is
greater than zero.

The top right corner looked good.

![add-field1](https://github.com/twentyhq/twenty/assets/41576384/0b75ce42-d524-42ba-a76d-66c3d15d523e)

![add-field2](https://github.com/twentyhq/twenty/assets/41576384/44cf3910-2f99-4e99-8130-5cafa58c5828)

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-04-17 14:51:57 +02:00
bosiraphael
3024e04a1c
4971 add issyncenabled toggle in messaging settings (#4995)
- Closes #4971
- Fix calendar import to take isSyncEnabled into account
2024-04-17 13:35:23 +02:00
Charles Bochet
67db7d85c0
Proposal Date picker overflow (#4996)
Unfortunately, it is not possible in CSS to have an overflow:visible
over x-axis while having an overflow:hidden over y-axis, leading to the
following issue:

<img width="1512" alt="image"
src="https://github.com/twentyhq/twenty/assets/12035771/9b84cbbb-c6c4-4fd6-a630-a24f01eccf73">

I'm refactoring the RecordInlineCell and RecordTableCell to use
useFloating + createPortal to open the cell.
2024-04-17 11:35:45 +02:00
Ashutosh Gupta
340af9a244
fix: Auto Reset Opportunity Creation Search Field (#4951)
## Description

In the previous implementation, we saved the user's search field input.
However, I have introduced a new prop called `clearOnOpen`, which allows
us to reset the search field upon loading.

Closes: #4923 



https://github.com/twentyhq/twenty/assets/95065270/dd2cab30-ea47-444e-b356-d5c98087bcc6

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-04-17 11:31:33 +02:00
Marie
17422b7690
fix: I should be able to use "enter" key to create profile (#4978)
## Context
Fixes #4808 

TL;DR
Introducing pure stateless modal component ("UI modal") for our auth
modal not to have default hotkeyScope overriding our create-profile
hotkeyScope
+ we dont want the shortcut to be available for all the modal content, only for the input that should not be using a hotkeyscope, so we are using onKeyDown for the specific issue on create profile.

Explanation
create-profile hotkey scope is set by PageChangeEffect; CreateProfile
component adds enter key shortcut; but this scope is overwritten by the
default scope by the Modal component that expects a hotkeyScope to reset
to (and defaults to the default hotkeyScope if none indicated).
In the auth flow we were using that Modal component to give a modal look
to the flow but it is not a modal per say, it's a set of pages contained
within a modal look.
By creating this UI component we are escaping that hotkeyScope
overriding that does not make sense in our context.

## How was it tested
Locally
Storybook
2024-04-17 10:45:02 +02:00
Lucas Bordeau
19a3be7b1b
Date picker for Date and DateTime field input (#4981)
- Implemented correct mask for Date and DateTime field in
InternalDatePicker
- Use only keyDown event and click outside in InternalDatePicker and
DateInput
- Refactored InternalDatePicker UI to have month and year displayed
- Fixed bug and synchronized date value between the different inputs
that can change it

---------

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>
2024-04-16 16:58:08 +02:00
martmull
1c3775e4a0
Fix Never api key expiration dates (#4965)
closes #4714 

We cannot set null expiration dates for api keys. So we will set to 100
years instead of null. If apiKey expires in more that 10 years, it is
displayed as "Never expires"
2024-04-15 20:05:59 +02:00
bosiraphael
d7d9f0c16b
Fix ParticipantChip and stories imports (#4974)
- Fix ParticipantChip
- Fix stories imports after some component have been moved to twenty UI
2024-04-15 18:09:05 +02:00
Emad
42e50cb818
fix: record object chip background color when idle (not hovered) (#4662)
Fixes #4651 


https://github.com/twentyhq/twenty/assets/50639499/c4b604a1-4e73-422a-bc13-a2764f564a75

---------

Co-authored-by: Marie Stoppa <marie.stoppa@essec.edu>
2024-04-15 15:40:27 +02:00
Félix Malfait
9d992143ff
Improve phone input display (#4968)
Small UI improvements to border / display on phone input field
2024-04-15 15:31:22 +02:00
Zoltán Völcsey
5477665e5d
feat: Improved Page and History names (#4908)
Improved page and history names. 
Closes #4684 

---------

Co-authored-by: Marie Stoppa <marie.stoppa@essec.edu>
2024-04-15 14:40:30 +02:00
Thomas Trompette
756de8a31b
Add connection failed status (#4939)
1/ When the user inputs wrong connection informations, we do not inform
him. He will only see that no tables are available.
We will display a connection failed status if an error is raised testing
the connection

2/ If the connection fails, it should still be possible to delete the
server. Today, since we try first to delete the tables, the connection
failure throws an error that will prevent server deletion. Using the
foreign tables instead of calling the distant DB.

3/ Redirect to connection show page instead of connection list after
creation

4/ Today, foreign tables are fetched without the server name. This is a
mistake because we need to know which foreign table is linked with which
server. Updating the associated query.

<img width="632" alt="Capture d’écran 2024-04-12 à 10 52 49"
src="https://github.com/twentyhq/twenty/assets/22936103/9e8406b8-75d0-494c-ac1f-5e9fa7100f5c">

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-04-15 14:09:01 +02:00
Quentin G
96bd5f1803
feat: add sourcemap generation for front (#4949)
This PR changes the vite config to enable the generation of sourcemaps
with the help of an Env.
It also adds a new script to run the build with the said env as well as
more memory (the dafault 2go leads to an OOM)
2024-04-15 12:12:59 +02:00
Thaïs
b6d0b8a895
refactor: move Checkmark, Avatar, Chip and Tooltip to twenty-ui (#4946)
Split from https://github.com/twentyhq/twenty/pull/4518

Part of #4766
2024-04-15 12:05:06 +02:00
gitstart-app[bot]
efcb5dc6d4
New Datetime field picker (#4907)
### Description
New Datetime field picker

### Refs
https://github.com/twentyhq/twenty/issues/4376

### Demo


https://github.com/twentyhq/twenty/assets/140154534/32656323-972c-413a-9986-a78efffae1b4


Fixes #4376

---------

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>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-04-13 19:07:51 +02:00
Thaïs
9f83cc1426
refactor: move @/ui/display/icon to twenty-ui (#4820)
Split from https://github.com/twentyhq/twenty/pull/4518

Part of https://github.com/twentyhq/twenty/issues/4766
2024-04-12 15:30:48 +02:00
bosiraphael
c0b3a8715f
4810 display participants in the right drawer of the calendar event (#4896)
Closes #4810

- Introduces a new component `ExpandableList` which uses intersection
observers to display the maximum number of elements possible
2024-04-12 10:33:46 +02:00
martmull
e6a5a63acf
Provide initialSnapshot to logout recoil state update snapshot (#4929) 2024-04-11 18:26:55 +02:00
bosiraphael
bc3930911e
Fix calendar preview avatar display (#4930)
- Fix avatar preview
- Fix border radius
2024-04-11 18:02:08 +02:00
Thomas Trompette
f332213e0d
Fix remote object read-only + remove relations (#4921)
- Set `readOnly` boolean in table row context. Preventing updates and
deletion
- Show page is null for remote objects. No need for complicated design
since this is temporary?
- Relation creations are now behind a feature flag for remote objects
- Refetch objects and views after syncing objects

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-04-11 17:58:02 +02:00
gitstart-app[bot]
7211730570
New field type: DATE (#4876)
### Description
New field type: DATE

### Refs
https://github.com/twentyhq/twenty/issues/4377

### Demo

https://jam.dev/c/d0b59883-593c-4ca3-966b-c12d5d2e1c32

Fixes #4377

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Toledodev <rafael.toledo@engenharia.ufjf.br>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-04-11 17:29:29 +02:00
brendanlaschke
ca9cc86742
Storybook fix dark mode (#4865)
preview has now also a dark background & added a one click change theme
button

<img width="994" alt="Bildschirmfoto 2024-04-06 um 18 27 45"
src="https://github.com/twentyhq/twenty/assets/48770548/95f12617-e48f-4492-9b51-13410aff43ee">
2024-04-11 17:28:12 +02:00
Artur
ffda4058e0
4809 - disable double signup with mouse click / enter (#4878)
Fixing #4809 

The form has a button with a disabled condition, unfortunately there was
an error in checking the condition.
```
disabled={
       SignInUpStep.Init
                ? false
                ...
```
SignInUpStep.Init is always equal to true, so the first arm was
returning false and button was never disabled. Fixing this check fixes
the double mouse click bug as expected.
```
disabled={
              signInUpStep === SignInUpStep.Init
```

Still, the enter keypress is handled a little bit differently. There is
a handleKeyDown event that was ignoring if the form is submitting or
not. I added the check for that, and now pressing enter multiple times
does not result in any errors
2024-04-11 17:08:23 +02:00
Quentin G
bf60227d67
feat: add SENTRY_RELEASE env (#4912)
Add support for a new SENTRY_RELEASE and SENTRY_ENVIRONMENT env.
It is optional and allows to init sentry with a Release version and an
env (used internally at Twenty).
Docker image have been updated do intergrate the new env as an Argument
2024-04-11 16:53:15 +02:00
Lucas Bordeau
c69a3f01da
Use defaultValue in currency input (#4911)
- Fix default value sent to backend, using single quotes by default
- Use default value in field definition and column definition so that
field inputs can access it
- Used currency default value in CurrencyFieldInput

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-04-11 16:49:00 +02:00
martmull
ee64576e5f
Fix phone cell display (#4924)
Closes #4796 

## What has been done
- fix phone number value detection
- Update formatting from International format to National format

## Before
phone were formatted as text field type

![image](https://github.com/twentyhq/twenty/assets/29927851/27d87522-5b02-4131-8b83-6bce7501fb1b)

## After
phone are properly formatted in National format

![image](https://github.com/twentyhq/twenty/assets/29927851/72f71b0f-4fd7-4060-afe3-feb87bddab0d)

## FYI
Phones in International format look like

![image](https://github.com/twentyhq/twenty/assets/29927851/6bd47dc1-6350-46b9-b5fd-94f4344bffac)
2024-04-11 16:30:49 +02:00
martmull
a7fcc5d47e
4778 multi select field front implement multi select type (#4887) 2024-04-11 12:57:08 +02:00
Thomas Trompette
aecf8783a0
Sync table from frontend (#4894)
This PR:
- separates the existing updateSyncStatus endpoint into 2 endpoints
- creates mutations and hooks that will call those endpoints
- trigger the hook on toggle
- removes form logic and add a separated component for toggling

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-04-11 11:51:49 +02:00
gitstart-app[bot]
584d90ec89
Create new field type JSON (#4729)
### Description
Create new field type JSON

### Refs
https://github.com/twentyhq/twenty/issues/3900

### Demo


https://github.com/twentyhq/twenty/assets/140154534/9ebdf4d4-f332-4940-b9d8-d9cf91935b67

Fixes #3900

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
Co-authored-by: Marie Stoppa <marie.stoppa@essec.edu>
2024-04-11 11:41:36 +02:00
Marie
f25d58b0d9
[feat][FE] Stop persisting new empty records (#4853)
## Context
Closes [#4773](https://github.com/twentyhq/twenty/issues/4773)
Persisting of new records is delayed to cell escape and not performed
for empty records.

## How was it tested?
Locally tested + jest

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-04-10 19:16:34 +02:00
Charles Bochet
f1cc1c60e0
Fix ID type being used in place of UUID in graphql and metadata queries (#4905)
We have recently discovered that we were using ID type in place of UUID
type in many place in the code.
We have merged #4895 but this introduced bugs as we forgot to replace it
everywhere
2024-04-10 11:33:17 +02:00
Weiko
4f2c29dce0
uuid codegen update (#4897)
Following https://github.com/twentyhq/twenty/pull/4895/files
2024-04-09 18:06:39 +02:00
Thaïs
704f7f6d8e
feat: fetch database connection tables in Settings/Integrations/Datab… (#4882)
…ase/Connection

Closes #4758

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-04-09 14:22:15 +02:00
Lucas Bordeau
b1242bb850
4087 refactor object metadata item hooks and utils (#4861)
- Extracted each exported element from useObjectMetadataItem into its
own hook.
2024-04-09 09:19:52 +02:00
Thomas Trompette
d4a9a26069
Delete connection from frontend (#4880)
This PR:
- creates the query to delete a connection
- creates the hook that triggers the query
- triggers the hook function when clicking on remove + get back to
connection page

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-04-08 17:27:14 +02:00
Lucas Bordeau
97f9fc3f81
Fixed hotkey bug with Select component and added debug logs for hotkeys (#4879)
- Select component was adding a duplicate useListenClickOutside already
present in useDropdown for closing dropdown.
- Added debug logs for hotkeys scopes
2024-04-08 17:08:30 +02:00
Anoop P
84f8c14e52
Implement context specific icon in breadcrumb navigation (#4839)
fixes #4834 

<img width="447" alt="Screenshot 2024-04-05 at 4 13 21 PM"
src="https://github.com/twentyhq/twenty/assets/44577841/036f6c51-c6c5-4e15-a895-e356ca230e5c">

<img width="437" alt="Screenshot 2024-04-05 at 4 13 35 PM"
src="https://github.com/twentyhq/twenty/assets/44577841/335d0317-43b2-4827-9cf7-42373b3953f5">

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-04-08 15:44:01 +02:00
bosiraphael
018b9efc2c
4743 use auth google apis callback url instead of messaging provider gmail callback url (#4838)
Closes #4743
2024-04-08 14:56:12 +02:00
Thaïs
1cbbb1600c
feat: add Remove menu option to Settings/Integrations/Database/Connec… (#4874)
…tion page

Closes #4872
2024-04-08 11:28:04 +02:00
Karthik S Kashyap
3eef4a8938
#4852 - Remove margin left on Record Board (Kanban) (#4862)
https://github.com/twentyhq/twenty/issues/4852

Hey, I'm very new to React! Also, this is my first try at contributing
to open source.

Hoping to learn React and Nestjs, I look forward to contributing more in
the future!

Looking forward to your feedback and guidance!

**Edit:**
![Group
9](https://github.com/twentyhq/twenty/assets/47709410/210a0b9e-0a26-4e3e-8e1b-a88837c90f10)

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2024-04-07 21:44:18 +02:00
Charles Bochet
4713ba0279 Fix sign-up bug because currentCacheVersion does not exist yet 2024-04-06 00:47:23 +02:00
Charles Bochet
0a9c79b3b3 Fix userload on signout 2024-04-05 21:01:03 +02:00
Charles Bochet
9f2c9ee76e
Remove repetitive query of ClientConfig and CurrentWorkspace member (#4859)
## Removing repetitive queries (impacting performance on page load)

We have recently introduced the capability to detect schema version
mismatch. To do that, we add a new header in all our queries. On page
load, this header is added once we know the currentUser and especially
its currentWorkspace and related schema version.
However, applying this header to apollo client will re-trigger all
queries that have been already performed (GetClientConfig and
GetCurrentUser). To avoid re-triggering them, I'm introducing two new
"isLoaded" states and skip the query if the query has already been
performed

## Fixing Relation Detail not displaying data on show page

Small bug introduced in a previous PR
2024-04-05 20:33:02 +02:00
Lucas Bordeau
a3184dcc2f
Used query fields for record table and record board (#4857)
- Added two hooks for computing query keys for index table and index
board.
- Using query keys for findManyRecords on index table and index board
2024-04-05 20:30:16 +02:00
Dmitriy Voytovich
a95972f808
refactor(chore):3896-replace-lodash-debounce-to-useDebounce (#4814)
Close: #3896 

## PR Details

Changed `lodash.debounce` to `useDebounce`.

Co-authored-by: VoitovychDM <voitovych.dm.m@gmail.com>
2024-04-05 19:07:44 +02:00
Charles Bochet
7774ef68a2
Release 0.4.0 (#4856)
0.4.0 Release!
2024-04-05 18:35:48 +02:00
Thaïs
bbdb926687
feat: add Tables settings to Settings/Integrations/Database/Connectio… (#4851)
…n page

Closes #4560
2024-04-05 18:12:54 +02:00
Charles Bochet
f4017119ab
Various cosmetic fixes for 0.4.0 (#4844)
In this PR:
- fix empty list placeholder positionning
- prevent user from erasing custom address field as composite types
removal is not supported yet @ijreilly FYI
- fix show page relation error
- Implement address filter
2024-04-05 17:32:14 +02:00
Thomas Trompette
4b34e7bf1e
Add new database connection (#4837)
Closes https://github.com/twentyhq/twenty/issues/4555

<img width="593" alt="Capture d’écran 2024-04-05 à 11 54 28"
src="https://github.com/twentyhq/twenty/assets/22936103/e6021417-bc78-460b-adf6-834330bbd894">

Connect the existing for with the backend so we can now create database
connections.

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-04-05 15:36:57 +02:00
Félix Malfait
3df4b78e38
Fix dropdown menu header (#4835)
Fix an issue I add introduced by removing "position:static" and an other
regression from https://github.com/twentyhq/twenty/issues/4366
2024-04-05 10:31:08 +02:00
Charles Bochet
e8c58ae541
Make field input transparency consistent (#4828)
Minor fix until for the release 0.4.0 until we properly fix all input
background and backdrop-filters
2024-04-04 20:51:41 +02:00
Charles Bochet
499e1a09e3
Fix ScrollWrapper inner elements padding (#4827)
Closes https://github.com/twentyhq/twenty/issues/4824 and
https://github.com/twentyhq/twenty/issues/4788
2024-04-04 19:19:26 +02:00
Thaïs
e784dc8a98
chore: enable no-console eslint rule for tests and stories (#4816)
Re-enables no-console eslint rule in stories and tests files:
- In stories, use `action` from '@storybook/addon-actions' or `fn` from
'@storybook/test' instead of console.
- In tests, console methods can be mocked like this:
`global.console.error = jest.fn()`.
2024-04-04 18:36:39 +02:00
Charles Bochet
48b1be9917
Fix ViewPicker create mode: view type switcher (#4821)
In this PR, I'm fixing two things on the ViewPicker in Create mode:
- if the Dropdown has no max height, it should not be scrollable (which
is causing issue with inner dropdowns being cut by overflow: hidden
- if the user has changed the icon, the type or the name of the view,
consider the create form as isDirty and prevent its value to be
overriden by re-renders (cache updates for example)
2024-04-04 18:32:55 +02:00
Thaïs
1f98bc899d
feat: fetch database connections (#4813)
Closes #4757

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-04-04 17:27:36 +02:00
Thaïs
f184541293
feat: add Database Connection Summary Card to Settings/Integrations/D… (#4791)
…atabase/Connection page

Closes #4558

<img width="542" alt="image"
src="https://github.com/twentyhq/twenty/assets/3098428/16d7d8ce-57db-4e48-ba72-a2318a2d34a4">

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-04-04 15:56:52 +02:00
TRP
9d45f7811e
adjust window size for scroll (#4792)
related to #4749. 

Adjusted the max height for window so that it cuts the last option a
little.

I wanted to test the menu from the second pic in the issue with the
multi select option but could not figure out where it was in the
application.

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-04-04 15:55:39 +02:00
Kanav Arora
18072d2935
Fixed attachment field type (#4811)
updatedAt and deletedAt field changed to string like createdAt field. On
file upload updatedAt field will be given date same as createdAt.

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-04-04 15:51:45 +02:00
Thomas Trompette
2e419091cc
Prevent remote object updates (#4804)
Backend: Adding a new util function that throw an error if the
objectMetadata is remote

Frontend: hiding the save button when remote

Also renaming `useObjectMetadataItemForSettings` since this hook is used
in other places than settings and is not in the settings repo. Name can
definitely be challenged!

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-04-04 15:47:08 +02:00
Thaïs
c5349291c8
chore: setup twenty-ui absolute path alias (#4732)
Split from https://github.com/twentyhq/twenty/pull/4518

- Setup `@ui/*` as an internal alias to reference `twenty-ui/src`.
- Configures twenty-front to understand the `@ui/*` alias on development
mode, so twenty-ui can be hot reloaded.
- When building on production mode, twenty-front needs twenty-ui to be
built beforehand (which is automatic with the `dependsOn` option).
- Configures twenty-front to understand the `@ui/*` alias when launching
tests, so there is no need to re-build twenty-ui for tests.

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-04-04 15:38:01 +02:00
Kanav Arora
f8ec40dbfb
Fix: File Upload (#4806)
File upload issue fixed.
There was a type mismatch and isDate was returning false
2024-04-04 15:33:17 +02:00
Jérémy M
04c06e3f91
fix: isIconDisplayedOnHoverOnly marked as required (#4805)
Fix PR #4676, `isIconDisplayedOnHoverOnly` should be provided or not
marked as required
2024-04-04 14:38:54 +02:00
Basant Besra
9d2bb33646
fix: Add isIconStatic prop item to allow the icons to be always rendered statically ignoring hover behaviour (#4676)
Fix #4653

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-04-04 14:05:56 +02:00
bosiraphael
85caed3463
4702 rename calendareventattendee to calendareventparticipant (#4761)
Closes #4702
2024-04-04 14:00:10 +02:00
Marie
357882c395
[feat][FE] Enable deletion of custom fields in workspace (#4802)
**Context**
Fixes https://github.com/twentyhq/twenty/issues/4597
Enables deletion of custom fields that aren't active nor of type
relation ([BE PR](https://github.com/twentyhq/twenty/pull/4780))

**How was it tested?**
Locally tested

<img width="541" alt="Capture d’écran 2024-04-04 à 13 33 18"
src="https://github.com/twentyhq/twenty/assets/51697796/bc462b86-b494-409e-9836-69bdaeb812cb">
<img width="661" alt="Capture d’écran 2024-04-04 à 13 34 25"
src="https://github.com/twentyhq/twenty/assets/51697796/8fe47114-545e-48b5-a107-34be531b7ea5">
2024-04-04 13:45:15 +02:00
Charles Bochet
b1a586d324
Fix View creation, view fields re-ordering, view filters and view sorts erratic behaviors (#4800)
We used to not type properly the return of getRecordFromCache before the
work from last week.
The getViewFromCache function was patching this temporarily in a "dirty"
way.

Now that this is cleaner, I'm removing the typescript patch. This fixing
several behaviors on viewBar
2024-04-04 13:24:58 +02:00
Thaïs
bf8ee99ebb
chore: use common eslint config for most packages (#4705)
Split from https://github.com/twentyhq/twenty/pull/4518

Related to #4766 

Mutualizes eslint config between projects.
I didn't include `twenty-server` in this PR as this was causing too many
lint errors.
2024-04-04 12:05:26 +02:00
Muralidhar
ff0db8d716
fix: linked records redirection (#4312)
Closes: #4093 
---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-04-04 11:01:33 +02:00
Thaïs
f58d855097
feat: add Settings/Integrations/Database/New Connection form (#4787)
Closes #4554

<img width="556" alt="image"
src="https://github.com/twentyhq/twenty/assets/3098428/56738254-aa43-4bfd-b7c5-29a9e1b7258f">

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-04-04 10:03:40 +02:00
rostaklein
306ef1df9c
feat: schema version header check (#4563)
closes https://github.com/twentyhq/twenty/issues/4479

tried to catch the error inside various places including
https://github.com/twentyhq/twenty/blob/main/packages/twenty-server/src/engine/integrations/exception-handler/exception-handler.service.ts
but it seems like the error never reaches the GraphQL module 😮

any idea where we could intercept such an error `Cannot query field`?

---------

Co-authored-by: Jérémy Magrin <jeremy.magrin@gmail.com>
2024-04-04 09:52:45 +02:00
Kanav Arora
bcf5268f7f
3886 - Shortcut Sort/Filter (#3901)
Closes #3886

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-04-04 00:43:44 +02:00
Thaïs
5c3e5a0d8a
feat: create Settings/Integrations/Database/Connection page (#4785)
Closes #4556

- Renames some pages and components after discussion about terminology
with @thomtrp.
- Creates the Settings/Integrations/Database/Connection page.
2024-04-03 17:15:02 +02:00
Thomas Trompette
1c6f0eb577
Integrate relations for remote objects (#4754)
Foreign table id cannot be a foreign key of a base table. But the
current code use foreign keys to link object metadata with activities,
events... So we will:
- create a column without creating a foreign key
- add a comment on the table schema so pg_graphql sees it as a foreign
key

This PR:
- refactor a bit object metadata service so the mutation creation is
separated into an util
- adds the mutation creation for remote object relations
- add a new type of mutation to create a comment

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-04-03 14:56:51 +02:00
Félix Malfait
3b72eed2dc
Fix issue caused by a merge conflict (#4768) 2024-04-03 09:18:33 +02:00
Aditya Pimpalkar
6ed0a5e2d6
feat: Redirect to previous page after login (#4731)
fix: #4721
2024-04-03 08:05:18 +02:00
martmull
7dc053c576
Add back export all action button (#4750)
![image](https://github.com/twentyhq/twenty/assets/29927851/e78186bf-c6ab-4ae6-8041-eb9ac2e86f90)

![image](https://github.com/twentyhq/twenty/assets/29927851/048dc9b3-c6e5-4049-8344-16b6fee48059)
2024-04-02 19:08:48 +02:00
kikoleitao
9364a58477
Fix #4160: fix upload image bug (#4734)
# Context
This PR addresses the solving of the upload image issue.
(Fixes #4160)

# Cause
The `<StyledBlockNoteStyledContainer onClick={() => editor.focus()}>`
handler was the origin of the problem, after removing it the issue
disappeared, maintaining all the other functionalities.

# Outcome
_Videos before and after removal:_


https://github.com/twentyhq/twenty/assets/92337535/9d8eb635-4164-4fea-a763-19becabf44ac


https://github.com/twentyhq/twenty/assets/92337535/8fedb50f-5306-42ad-be21-58d89ff7d1c7
2024-04-02 16:31:18 +02:00
Simão Sanguinho
bc6db2d8b0
fix panel opening wrapping glitch (#4204) (#4673)
Fix: (#4204)

The issue was that when that panel was opened its content would wrap
instead of maintaining its desired structure. I fixed this bug by adding
a minimum width to the panel's contents so that they would stay
correctly formatted throughout the opening transition.

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-04-02 16:20:08 +02:00
Anoop P
bbffde1ca0
New field currency (#4338)
Closes #4122 
---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-04-02 15:29:57 +02:00
Jeet Desai
d694ab1b16
Fix: Update Icon Button Color and Menu Transparency with Icons (#4704)
Fixes: #4654
2024-04-02 12:32:17 +02:00
Charles Bochet
514417245a
Add JsDom to server dependencies (#4740)
We were missing `JsDom` dependencies in the package.json generated by nx
while running `twenty-server`: `yarn nx build:packageJson`

Detailed explanation: 
- we are currently using nx paradigm which is to put dependencies of all
projets at root, which enables global package migrations for the whole
monorepo
- for production containers, we only want specific project dependency to
be added. This is done by running `yarn nx build:packageJson` on
`twenty-server`. Nx is statically analyzing twenty-server dependencies
and generating a tailored package.json that production containers can
later use.
- However, `nx` static analysis is not flawless and is missing some
packages. We are going to stop using it as the value is not there yet
but the burden for developers is high. The guideline is to put back
project dependencies into specific package `package.json`
- Therefore, I'm adding `jsdom` to twenty-server `package.json`
2024-04-02 12:07:12 +02:00
bosiraphael
ffb1733f39
Fix invalid token after credentials change (#4717)
- If sync fails we set authFailedAt
- This information is displayed in the frontend in accounts with a `Sync
Failed` pill
- The user can reconnect his account in the dropdown menu
- A new OAuth flow is triggered
- The account is synced
2024-04-02 11:32:27 +02:00
Thaïs
dc8ab5d95a
feat: expand relation record cards on click in Record Show page (#4570)
Closes #3126
2024-04-02 09:42:57 +02:00
Charles Bochet
746747ba2b
Fix jest tests broken with apollo metadata client (#4728)
The tests were broken. It turns out that it is not easy to mock two
apolloClients as apollo only provides "MockedProvider" component to mock
apollo in tests.
MockedProvider Api does not allow us to mock on client level.

For now, I'm defaulting to the base ApolloClient in test mode to avoid
the issue
2024-04-01 14:55:28 +02:00
Thaïs
8ae6af6bd7
refactor: move createState to twenty-ui (#4716)
Split from https://github.com/twentyhq/twenty/pull/4518

Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>
2024-04-01 13:22:51 +02:00
Thaïs
a3e5cf37b0
chore: upgrade Nx to v18.1.3 (#4706)
Split from https://github.com/twentyhq/twenty/pull/4518

- Upgrades dependencies and applies automatic config migrations with the
command: `npx nx migrate nx` (see
https://nx.dev/nx-api/nx/documents/migrate)
- Fixes lint errors after upgrading `@typescript-eslint`

Note: it was not possible (for now) to migrate Nx to the latest stable
version (v18.2.1) because it upgrades Typescript to v5.4.3, which seems
to cause a bug on install when Yarn tries to apply its native patches.
Might be a bug on the Yarn side.
2024-04-01 13:16:50 +02:00
Thaïs
5d07b6347e
refactor: move Tabler Icon exports to twenty-ui (#4727)
Split from https://github.com/twentyhq/twenty/pull/4518
2024-04-01 13:15:47 +02:00
Charles Bochet
02673a82af
Feat/put target object identifier on use activities (#4682)
When writing to the normalized cache (record), it's crucial to use _refs
for relationships to avoid many problems. Essentially, we only deal with
level 0 and generate all fields to be comfortable with their defaults.

When writing in queries (which should be very rare, the only cases are
prefetch and the case of activities due to the nested query; I've
reduced this to a single file for activities
usePrepareFindManyActivitiesQuery 🙂), it's important to use queryFields
to avoid bugs. I've implemented them on the side of query generation and
record generation.

When doing an updateOne / createOne, etc., it's necessary to distinguish
between optimistic writing (which we actually want to do with _refs) and
the server response without refs. This allows for a clean write in the
optimistic cache without worrying about nesting (as the first point).

To simplify the whole activities part, write to the normalized cache
first. Then, base queries on it in an idempotent manner. This way,
there's no need to worry about the current page or action. The
normalized cache is up-to-date, so I update the queries. Same idea as
for optimisticEffects, actually.

Finally, I've triggered optimisticEffects rather than the manual update
of many queries.

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-04-01 13:12:37 +02:00
Thaïs
3f102b2934
fix: fix Settings/Developers page error (#4722)
Closes #4669
2024-04-01 11:36:36 +02:00
Aditya Pimpalkar
d24d5a9a2e
feat: authorize screen (#4687)
* authorize screen

* lint fix

* add BlankLayout on Authorize route

* typo fix

* route decorator fix

* Unrelated fix

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-03-31 12:23:56 +02:00
brendanlaschke
aacb3763e7
Fix overlay scroll gaps (#4512)
* fix overlay scroll leaving gap

* fixed tests

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-03-31 10:53:37 +02:00
brendanlaschke
da8f1b0a66
Fix display empty value if boolean instead of false on show page (#4468)
* default value boolean fixed

* fixed creation, fixed updating a value to false

* fixed default value for default value if boolean

* fixed tests

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-03-30 11:38:08 +01:00
Thomas Trompette
1d351a29b8
Sync remote object (#4713)
* Sync objects

* Generate data for isRemote

* Add cache version update

* Add label identifier + fix field metadata input

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-03-29 18:23:58 +01:00
Anchit Sinha
7f3623239a
4410-feat(front): Implement Confirmation Prompt for Multiple Record Deletion (#4514)
* feat: implement confirmation prompt

* feat: remove prop drilling and introduce recoil state

* chore: fix eslint issues

* feat: set record text according to length of records

* chore: fix eslint issues

* refactor: made changes according to code review

* fix: show delete according to singular and plural records.

* fix: eslint issues

* feat: show number of selected records

* style: fix positioning of actionbar

* feat: display ConfirmationModal seperately

* chore: remove recoil state and use usestate instead

* chore: minor change

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-03-29 18:18:21 +01:00
Ravan
aaf429a907
fix: impossible to unselect all check box (#4471)
* fix: impossible to unselect all check box

* fix: newly loaded records adopts select/unselect status

* Fix

* Fixes

* Fixed naming

* Used better naming

* Fixed naming

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-03-29 18:02:22 +01:00
Simão Sanguinho
743e203bc7
fix icon search menu (#4565) (#4712) 2024-03-29 15:20:32 +01:00
Kanav Arora
00eee3158e
4698-Renamed to inbox (#4701)
Renamed to inbox
2024-03-28 17:11:13 +01:00
rostaklein
3171d0c87b
feat: address composite field (#4492)
Added new Address field input type.

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-03-28 16:50:38 +01:00
Jeet Desai
a28ffee80f
Fix: Save view by clicking outside popup while editing (#4678)
* fix: #4657 Save view by clicking outside popup while editing

* made changes on save view

* resolved comment
2024-03-28 10:52:42 +01:00
arnavsaxena17
f00b9f229a
fixed view switcher by changing zindex of TopBar (#4685) 2024-03-27 21:15:29 +01:00
bosiraphael
d687523e22
4643 create a pre hook for calendar events (#4666)
* copy message pre hook

* add CalendarQueryHookModule to workspace-pre-query-hook.module

* use CalendarChannelVisibility enum

* add calendarEvent to workspace-pre-query-hook.config

* fix pre-hook

* fix findOne prehook in config

* rename fragments

* fix import

* update findOne prehook and create can-access-calendar-event.provider

* replace provider with service

* fix type

* renaming

* remove unnecessary eslint skip

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-03-27 19:44:35 +01:00
Thaïs
c3cc0f651c
feat: add remote object integration databases list card (#4621)
* feat: add remote object integration databases list card

Closes #4549

* fix: fixes after rebase
2024-03-27 18:59:40 +01:00
Thaïs
6637ae586f
feat: add Integrations/Integration Details/New Database page (#4593)
Closes #4553
2024-03-27 16:28:40 +01:00
bosiraphael
416eb1eafd
4506 change field labels and field type for calendarevent object metadata to match figma (#4679)
* update calendarEvent labels and description to match Figma

* modify conferenceUri to conferenceLink with LINK type

* update format-google-calendar-event.util to match new conferenceLink

* update CalendarEventDetails since overriding the fields is no longer needed

* fix mock metadata

* generate new uuid for field conferenceLink
2024-03-27 15:17:45 +01:00
Thaïs
2ffe519478
feat: add date format calendar setting (#4600)
Closes #4184
2024-03-27 15:17:31 +01:00
bosiraphael
77e08daa79
4486 connect settingsaccountscalendars to backend (#4605)
* add useFindOneRecord and useUpdateOneRecord

* remove mock

* use calendar channel information in display

* renaming

* refactoring

* handleSyncEventsToggle

* improve typing using generics

* modifications after review

* rename components

* renaming
2024-03-27 15:01:00 +01:00
Jérémy M
5c0b65eecb
feat: simplification of default-value specification in FieldMetadata (#4592)
* feat: wip refactor default-value

* feat: health check to migrate default value

* fix: tests

* fix: refactor defaultValue to make it more clean

* fix: unit tests

* fix: front-end default value
2024-03-27 10:56:04 +01:00
Jérémy M
3acec7731c
Fix/enum bug (#4659)
* fix: sever not throwing when enum contains two identical values

* fix: enum column name cannot be change

* fix: put field create/update inside transactions

* fix: check for options duplicate values front-end

* fix: missing commit transaction
2024-03-26 16:16:29 +01:00
bosiraphael
fefa37b300
4488 connect calendar tab to backend (#4624)
* create states and hooks

* implement fetch more records

* add empty state

* update types

* fix error

* add fetchmoreloader and add scroll to container

* fix visibility in calendarEventFragment

* fix fetchMoreRecords

* update TIMELINE_CALENDAR_EVENTS_DEFAULT_PAGE_SIZE

* add test

* modify empty state subtitle

* replace entity by activityTargetableObject

* create useCustomResolver hook

* refactor

* refactoring

* use generic component

* rename FetchMoreLoader

* remove deprecated states and hooks

* fix typing

* update typing

* update error message

* renaming

* improve typing

* fix bug on contact creation from same company
2024-03-26 14:50:32 +01:00
Charles Bochet
c54acb35b6
Update Dev Seeds to use Ids (#4663) 2024-03-26 14:19:40 +01:00
Thaïs
17bf315a1d
feat: add remote object integration preview (#4614)
Closes #4548
2024-03-26 10:02:25 +01:00
Jérémy M
d1ab063000
feat: use ApolloFactory for metadata client (#4608)
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-03-25 19:15:46 +01:00
Kanav Arora
9dda6a8fa1
4162-Sticky-Header (#4627)
* initial commit

* functionality added

* Suggested changes fixed

* Fix broken shadow

* Unrelated fix (input stuck under container)

* Performance improvement

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-03-25 19:05:56 +01:00
Thaïs
8baa59b6f4
feat: add Active and Add integration card displays (#4591)
* feat: add Active and Add integration card displays

Closes #4541

* docs: add PaymentSuccess page stories

* refactor: move page components
2024-03-25 18:53:30 +01:00
Thaïs
6ab43c608f
feat: create Integrations/IntegrationDetail page (#4574)
* feat: create Integrations/IntegrationDetail page

Closes #4546

* docs: add Settings/Integrations/Integration Detail page stories

* docs: add Settings/Billing page stories

* refactor: move some Settings components to @/settings

* refactor: move some Settings integrations components to @/settings/integrations
2024-03-25 18:06:46 +01:00
gitstart-app[bot]
e126c5c7f3
TWNTY-4602 - Increase coverage for coverage for twenty-front:storybook:modules (#4649)
* Increase coverage for coverage for  `twenty-front:storybook:modules`

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Chiazokam <chiazokamecheta@gmail.com>

* Increase code coverage threshold

* Increase code coverage threshold

* Increase code coverage threshold

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Chiazokam <chiazokamecheta@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-03-25 18:03:55 +01:00
Thaïs
61e5d5bcb9
fix: fix Select field preview (#4507)
* fix: fix Select field preview

Closes #4084

* fix: fix field preview utils tests
2024-03-25 16:37:41 +01:00
Thaïs
b77d589497
refactor: merge FieldType and FieldMetadataType (#4504)
* refactor: merge FieldType and FieldMetadataType

* fix: fix args passed to assertFieldMetadata

* fix: omit RawJson from supported types in settings
2024-03-25 15:45:28 +01:00
Charles Bochet
e576fe0d67
Update yarn commands (#4644)
* Simplify commands

* Simplify commands

* Migrate all dev commands to project.json

* Fix tests
2024-03-25 12:31:18 +01:00
Thaïs
1639b2ad0e
refactor: improve Settings supported field types validation (#4496)
* refactor: improve Settings supported field types validation

Related to: #4084, #4295

* fix: fix wrong import
2024-03-25 12:27:00 +01:00
brendanlaschke
922d632607
Basic log styling (#4634)
* basic log styling

* fixed mobile wrap and changed default event icon

* add group by test
2024-03-25 10:15:39 +01:00
Charles Bochet
0a15994695 Allow usage of multiple select fields on Kanban board 2024-03-23 20:36:14 +01:00
Charles Bochet
bd8718269a Improve performances on main 2024-03-23 16:12:07 +01:00
karthik
0315f35979
Replace Terms & Conditions with Sign Up Link on Sign In #4502 (#4617)
* Replace Terms & Conditions with Sign Up Link on Sign In #4502

* terms replaced with signup link

* begin fix (incomplete / do not merge)

* Revert

* Introduce welcome page

* Update Twenty website

---------

Co-authored-by: Mamatha Yarramaneni <mamathayarramaneni@Mamathas-Macbook.local>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-03-22 22:40:01 +01:00
Charles Bochet
3c5c9c2f31
Release 0.3.3 (#4622)
* Release 0.3.3

* Fix tests
2024-03-22 17:28:53 +01:00
Charles Bochet
6713ac589d Object creation triggers view creation 2024-03-22 16:39:55 +01:00
Charles Bochet
4a493b6ecf
New view picker (#4610)
* Implement new view picker

* Complete feature

* Fixes according to review
2024-03-22 15:04:17 +01:00
Félix Malfait
d876b40056
Logs show page (#4611)
* Being implementing events on the frontend

* Rename JSON to RAW JSON

* Fix handling of json field on frontend

* Log user id

* Add frontend tests

* Update packages/twenty-server/src/engine/api/graphql/workspace-query-runner/jobs/save-event-to-db.job.ts

Co-authored-by: Weiko <corentin@twenty.com>

* Move db calls to a dedicated repository

* Add server-side tests

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-03-22 14:01:16 +01:00