Commit Graph

2803 Commits

Author SHA1 Message Date
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
Quentin G
9c8cb52952
fix: release workflow (#5053)
Couple fixes to the release workflow in order to make it work as
intended
2024-04-19 15:16:48 +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
Charles Bochet
03e0fd2a65
Fix storybook tests 2 (#5026) 2024-04-18 10:41:11 +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