Commit Graph

1166 Commits

Author SHA1 Message Date
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
bosiraphael
6cafd25c97
Fix duplicated calendar events (#5209)
Fix duplicated calendar events when two workspace members participate to
the same event.
2024-04-29 15:23:40 +02:00
Félix Malfait
9809298753
Add jobs (#5208)
Adding job descs for intern + senior software eng role!
2024-04-29 14:41:16 +02:00
brendanlaschke
adf64f0a4c
Add known sources dropdown to api docs (#5204)
closes #5156
2024-04-29 10:39:40 +02:00
Charles Bochet
e976a1bdfc
Uniformize datasources (#5196)
## Context

We recently enabled the option to bypass SSL certificate authority
validation when establishing a connection to PostgreSQL. Previously, if
this validation failed, the server would revert to unencrypted traffic.
Now, it maintains encryption even if the SSL certificate check fails. In
the process, we overlooked a few DataSource setups, prompting a review
of DataSource creation within our code.

## Current State

Our DataSource initialization is distributed as follows:
- **Database folder**: Contains 'core', 'metadata', and 'raw'
DataSources. The 'core' and 'metadata' DataSources manage migrations and
static resolver calls to the database. The 'raw' DataSource is utilized
in scripts and commands that require handling both aspects.
- **typeorm.service.ts script**: These DataSources facilitate
multi-schema connections.

## Vision for Discussion
- **SystemSchema (formerly core) DataSource**: Manages system schema
migrations and system resolvers/repos. The 'core' schema will be renamed
to 'system' as the Core API will include parts of the system and
workspace schemas.
- **MetadataSchema DataSource**: Handles metadata schema migrations and
metadata API resolvers/repos.
- **(Dynamic) WorkspaceSchema DataSource**: Will be used in the Twenty
ORM to access a specific workspace schema.

We currently do not support cross-schema joins, so maintaining these
DataSources separately should be feasible. Core API resolvers will
select the appropriate DataSource based on the field context.
- **To be discussed**: The potential need for an AdminDataSource (akin
to 'Raw'), which would be used in commands, setup scripts, and the admin
panel to connect to any database schema without loading any model. This
DataSource should be reserved for cases where utilizing metadata,
system, or workspace entities is impractical.

## In This PR
- Ensuring all existing DataSources are compliant with the SSL update.
- Introducing RawDataSource to eliminate the need for declaring new
DataSource() instances in commands.
2024-04-27 11:43:44 +02:00
Weiko
ebc25c8695
Add redis to useMetadataCache yoga plugin (#5194)
## Context
@lucasbordeau introduced a new Yoga plugin that allows us to cache our
requests (👏), see https://github.com/twentyhq/twenty/pull/5189
I'm simply updating the implementation to allow us to use different
cache storage types such as redis
Also adding a check so it does not use cache for other operations than
ObjectMetadataItems

## Test
locally, first call takes 340ms, 2nd takes 30ms with 'redis' and 13ms
with 'memory'
2024-04-26 19:27:09 +02:00
bosiraphael
5e143f1f49
5187 delete all emails and events from a blocklisted domain name (#5190)
Closes #5187
2024-04-26 18:24:02 +02:00
Charles Bochet
27cd577dbb Fix login by email blocked 2024-04-26 18:22:36 +02:00
Marie
76d4188ba8
[feat] Add updateRemoteServer endpoint (#5148)
## Context
#4765 

Following investigations
([#5083](https://github.com/twentyhq/twenty/issues/5083)) we decided to
restrict updates of server from which zero tables have been synchronized
only

## How was it tested
Locally with /metadata
1. Updating a database that already has synchronized tables
<img width="1072" alt="Capture d’écran 2024-04-24 à 16 16 05"
src="https://github.com/twentyhq/twenty/assets/51697796/f9a84c34-2dcd-4f3c-b0bc-b710abae5021">

2. Updating a database that has no synchronized tables
<img width="843" alt="Capture d’écran 2024-04-24 à 16 17 28"
src="https://github.com/twentyhq/twenty/assets/51697796/f320fe03-a6bc-4724-bcd0-4e89d3ac31f5">
+ tested that the connection works well
2024-04-26 18:12:08 +02:00
Charles Bochet
b15533e4b3 Bump version to 0.10.3 2024-04-26 17:52:13 +02:00
Lucas Bordeau
77eece77ea
Add a cache on /metadata (#5189)
In this PR I'm introducing a simple custom graphql-yoga plugin to create
a caching mechanism specific to our metadata.

The cache key is made of : workspace id + workspace cache version, with
this the cache is automatically invalidated each time a change is made
on the workspace metadata.
2024-04-26 17:31:40 +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
9f1818aef7
4748 create updated listener on blocklist (#5145)
Closes #4748
2024-04-25 17:39:56 +02:00
Ady Beraud
6e8c6c8e58
fixed twenty website build (#5174)
Made code compile during build even when then environment variable is
not yet available

Co-authored-by: Ady Beraud <a.beraud96@gmail.com>
2024-04-25 15:54:54 +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
Quentin G
806666d909
feat: allow self signed certificates with postgres connections (#5143) 2024-04-25 15:29:07 +02:00
Charles Bochet
11a7db5672
Fix workspace schema caching when user is not logged in (#5173)
In this PR:
- Follow up on #5170 as we did not take into account not logged in users
- only apply throttler on root fields to avoid performance overhead
2024-04-25 14:45:14 +02:00
Lucas Bordeau
52f4c34cd6
Cache yoga conditional schema (#5170)
In this PR I'm introducing a new patch on @graphql-yoga/nestjs package.

This patch overrides a previous patch that was made to compute the
conditionnal schema on each request,

Here we use a cache map to compute only once per schema workspace cache
version.

This allows us to have sub 100ms query time.
2024-04-25 14:01:32 +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
Charles Bochet
07c8779411
Fix broken sync-metadata (#5154)
An error has been recently introduced in the sync of fieldMetadata. This
PR fixes it

Additionnally, we are enabling email for trialing and past_due
workspaces. There is an ongoing work to introduce a more robust
activationStatus on workspace.
2024-04-24 17:45:17 +02:00
Ady Beraud
5d2d6bae08
Remove SQLite from twenty-website (#5142)
Removed SQLite from twenty-website

---------

Co-authored-by: Ady Beraud <a.beraud96@gmail.com>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-04-24 17:02:02 +02:00
bosiraphael
0f47426d19
4747 create deleted listener on blocklist (#5067)
Closes #4747
2024-04-24 16:10:56 +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
bosiraphael
d130b78166
5044 Dispatch createcontact job instead of emitting an event (#5135)
Closes #5044
2024-04-24 15:01:13 +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
Charles Bochet
b3e1d6becf
Fix default value fixer script (#5144)
While trying to migrate a workspace from 0.3.3 to 0.10.0, we've faced an
issue with the script to migrate default-values format.
This PR fixes it.

We really need to add tests on this part ;)
2024-04-24 14:50:57 +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
Hinson Chan
3b0f81e7e1
5125 - fix npx nx start does not exit gracefully (#5133)
Fixes: https://github.com/twentyhq/twenty/issues/5125

Updated nx version that includes fix (see fix PR:
https://github.com/nrwl/nx/pull/22895, release confirming fix:
https://github.com/nrwl/nx/releases/tag/18.3.3)

<img width="291" alt="image"
src="https://github.com/twentyhq/twenty/assets/68029599/b72b4a5c-9957-445d-b8b2-8352122cade8">
2024-04-24 11:53:53 +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
Ady Beraud
0a7f82333b
Make Github stars dynamic and improve database init (#5000)
I extracted the init database logic into its own file. 
You can now run it with yarn database:init.
Added database entry for GitHub stars. 

Do you want me to remove the init route or is it used for something else
?

---------

Co-authored-by: Ady Beraud <a.beraud96@gmail.com>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-04-24 09:44:44 +02:00
Ady Beraud
fda0c3c93c
Added SEO to website pages (#5106)
Added SEO to Contributors, Contributor, User Guide (+ each of it's
pages), Changelog, OSS friends: titles, descriptions

Co-authored-by: Ady Beraud <a.beraud96@gmail.com>
2024-04-24 08:13:59 +02:00
Ady Beraud
dc82ff56b8
Update oss friends (#5108)
Modified OSS friends to fit figma (fonts, colors, margins etc. ) and
made it responsive.

---------

Co-authored-by: Ady Beraud <a.beraud96@gmail.com>
2024-04-24 08:03:15 +02:00
Charles Bochet
fafa56411c
Fix email sync (#5132) 2024-04-23 18:50:37 +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
Ady Beraud
2dc89b8f1d
Added releases to navbar (#5124)
-Added "Releases" to mobile/desktop navbar

Co-authored-by: Ady Beraud <a.beraud96@gmail.com>
2024-04-23 15:49:18 +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
bosiraphael
824786ff04
4746 create created listener on blocklist for calendar (#5046)
Follows #5031.
Closes #4746
2024-04-23 11:46:27 +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
Dev
bd2a6cbbd3
Add company to default opportunity fields (#5075)
Fixes #4484 

<img width="1904" alt="Screenshot 2024-04-21 at 6 58 10 AM"
src="https://github.com/twentyhq/twenty/assets/21654351/dd1dcd3b-3bbe-48d9-8576-dc6e885fc11e">
2024-04-23 11:43:27 +02:00
Ikko Eltociear Ashimine
0db35c9a5f
Fix typo in config/index.ts (#5109)
seperate -> separate
2024-04-23 11:22:31 +02:00
Weiko
fa4670b14d
chore: extend root eslint config in twenty-server (#5101)
Reopening @thaisguigon work from
https://github.com/twentyhq/twenty/pull/4781

---------

Co-authored-by: Thaïs Guigon <guigon.thais@gmail.com>
2024-04-22 17:34:24 +02:00
Ady Beraud
b9a7eb5a98
User guide layout (#5016)
- Modified CSS: font-size, colors, margins...

- Added an ArticleContent Component that will be used for the changelog
and user guide articles, which contains the styles for each titles,
paragraphs, images etc.

- Added link to User Guide in footer

- Added a UserGuideWarning Component: 

<img width="332" alt="Screenshot 2024-04-17 at 18 14 48"
src="https://github.com/twentyhq/twenty/assets/102751374/0f5c601b-a2c0-4c63-baeb-1990d65fc332">

- Added a UserGuideEditContent Component:

<img width="394" alt="Screenshot 2024-04-17 at 18 16 24"
src="https://github.com/twentyhq/twenty/assets/102751374/6c7c3bd4-c5bb-4d02-8f93-bd99bc30ce7b">

- Added a UserGuideLink Component (for usage in MDX to allow links to
open in new tab)

- Fixed table of content

- Made responsive

---------

Co-authored-by: Ady Beraud <a.beraud96@gmail.com>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-04-22 17:04:26 +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
3e8d42f2ed Fix standard field ids of timelineActivities relations 2024-04-20 19:29:42 +02:00
Charles Bochet
72b7d41cac Fix syncing of old event models 2024-04-20 18:12:27 +02:00
Charles Bochet
d77ad1052c Fix demo workspace seed 2024-04-20 00:11:04 +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
martmull
43f0b11aab
Fix playground (#5043)
Some code quality updates on the doc api playgrounds
2024-04-19 18:18:08 +02:00
Aditya Pimpalkar
14f97e2e80
fix: "Add to Twenty" button render fix (chrome-extension) (#5048)
fix - #5047
2024-04-19 18:13:53 +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
Weiko
3a959248f9
Fix billing check for trial sub status (#5054)
## Context
Sub status is not binary as you can also be in trial mode and still
should be able to share invite link. This PR should fix this issue
2024-04-19 15:16:08 +02:00
martmull
36d4c38c3d
Check password in signinup only when email/password signInUp (#5042)
- disable password check when signInUp from google (sso)
- check password when signInUp with email password
2024-04-18 17:52:01 +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
Weiko
220a0e91d2
[messaging/calendar] fix missing authFailedAt reset once refreshToken is updated (#5037) 2024-04-18 15:43:35 +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
Thomas Trompette
b08e95494c
Move id column check before foreign table creation (#5029)
When distant table does not have an id column, syncing does not work.
Today the check is only made after creating the foreign table locally.
We should do it first, so we avoid having a foreign table created and
failing right after.

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-04-18 11:34:21 +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
Charles Bochet
977927af04
Disable audit log on system objects (#5018)
## Context

We have recently added an event listener to create audit logs on objects
update. However, we have only created the structure (relations on event
standard objects) for Company, Person, Opportunity and custom objects.
There is a larger effort in #4936 to refactor this.
For now, we are disabling log auditing on all other objects

## How
Add @IsNotAuditLogged() annotation on all standard objects except
Company, Person, Opportunity
2024-04-17 17:52:39 +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
Weiko
979b8d29cc
UpdateSubscriptionJob should not be enqueued if billing is not enabled (#5007)
## Context
Adding this check to avoid enqueuing this job and following return-early
good practice

## Test
Without IS_BILLING_ENABLED env set

<img width="565" alt="Screenshot 2024-04-17 at 15 31 12"
src="https://github.com/twentyhq/twenty/assets/1834158/fcc43ce0-4455-4c4a-9889-02d99f0cd519">

With IS_BILLING_ENABLED env set
<img width="581" alt="Screenshot 2024-04-17 at 15 32 28"
src="https://github.com/twentyhq/twenty/assets/1834158/dc9756bd-2f6b-49bd-8897-84b6d8e09d56">
2024-04-17 17:04:48 +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
Weiko
6804a90f2f
Fix invite link sign-up with workspace without subcription and billing not enabled (#5006)
## Context

We recently introduced this verification but we didn't take into account
self-hosting that might not use billing.

## Test
tested locally with
- new workspace and new account
- existing workspace with new account and billing not enabled and status
incomplete => OK
- existing workspace with new account and billing enabled and status
incomplete => NOK
- existing workspace with new account and billing enabled and status
active => OK
2024-04-17 15:09:51 +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
Weiko
6211f84de8
block invite link if workspace subscription is not active (#4991)
Fixes https://github.com/twentyhq/twenty/issues/4980

## Test
tested locally with incomplete and active
2024-04-17 10:55:47 +02:00
Thomas Trompette
6fa2aee624
Introduce remote table entity (#4994)
We will require remote table entity to map distant table name and local
foreign table name.
Introducing the entity:
- new source of truth to know if a table is sync or not
- created synchronously at the same time as metadata and foreign table

Adding a few more changes:
- exception rather than errors so the user can see these
- `pluralize` library that will allow to stop adding `Remote` suffix on
names

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-04-17 10:52:10 +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
Ady Beraud
5ecc4ad378
Modify UI website and fix navbar issue on small devices (#4961)
-Fixed scroll issue on navbar:


https://github.com/twentyhq/twenty/assets/102751374/19f609f0-637d-483f-a695-f4a276155f2c

-Modified various UI elements, including design and layout adjustments
Example: 
**Before:**

<img width="279" alt="Screenshot 2024-04-14 at 18 45 04"
src="https://github.com/twentyhq/twenty/assets/102751374/c0f58aa6-440b-475a-bc85-69fef564f693">

**After:** 
<img width="312" alt="Screenshot 2024-04-14 at 18 45 17"
src="https://github.com/twentyhq/twenty/assets/102751374/2da4c2e8-e482-4d36-b6dc-02a51dde1950">

---------

Co-authored-by: Ady Beraud <a.beraud96@gmail.com>
2024-04-17 10:18:18 +02:00
Weiko
2efc794b43
[messaging] Add message deletion during partial sync (#4972)
## Context

- Rename remaining V2 services.
- Delete messages in DB when gmail history tells us they've been
deleted. I removed the logic where we store those in a cache since it's
a bit overkill because we don't need to query gmail and can use those
ids directly. The strategy is to delete the message channel message
association of the current channel, not the message or the thread since
they can still be linked to other channels. However, we will need to
call the threadCleaner service on the workspace to remove orphan
threads/non-associated messages.

Note: deletion for full-sync is a bit tricky because we need the full
list of message ids to compare with the DB and make sure we don't
over-delete. Currently, to keep memory, we don't have a variable that
holds all ids as we flush it after each page. Easier solution would be
to wipe everything before each full sync but it's probably not great for
the user experience if they are currently manipulating messages since
full-sync can happen without a user intervention (if a partial sync
fails due to historyId being invalidated by google for some reason)
2024-04-16 17:18:06 +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
bosiraphael
d63937ec6f
4988 dont import emails with ics attachments (#4990)
- Closes #4988 
- Fix parenthesis error in filter
2024-04-16 15:45:31 +02:00