Commit Graph

101 Commits

Author SHA1 Message Date
Syed Md Mihan Chistie
be20a690b3
added typechecking for all ts files (#6466)
Fixes: #6436 

Changes made: 

- Added typecheck step before twenty-ui build to check stories TS errors
- Added a tsconfig.dev.json to add stories and tests to typecheking when
in dev mode
- Added tsconfig.dev.json to storybook dev command of twenty-ui to
typecheck stories while developing
- Fixed twenty-ui stories that were broken

- Added a serve command to serve front build
- Fixed unit test from another PR

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-08-20 11:05:13 +02:00
Jérémy M
db54469c8a
feat: soft delete (#6576)
Implement soft delete on standards and custom objects.
This is a temporary solution, when we drop `pg_graphql` we should rely
on the `softDelete` functions of TypeORM.

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-08-16 21:20:02 +02:00
Weiko
02a1da1330
Fix prettier (#6583)
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-08 17:40:35 +02:00
Thomas Trompette
12e55fd5b7
Bump version to 0.23.1 (#6567)
As title

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-08-07 17:09:30 +02:00
nitin
c836bbbfc2
Fixed SignInUp Modal misalignment for devices smaller than 400px width (#6386)
Hi @Bonapara,
Issue #6385 

I encountered an issue with the Modal component where its width was
fixed at 400px. While the container housing the Modal adjusted its size
based on the screen width, the Modal itself remained at 400px regardless
of the screen size.

I have implemented a change to address this problem. Could you please
review the changes and let me know your thoughts?

Thank you!




https://github.com/user-attachments/assets/8358aacb-d6c3-440e-895e-7abc4f8a3534

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-07 15:37:32 +02:00
Charles Bochet
1b9d2c8151
Release 0.23 (#6547)
Here we go!
https://twenty.com/releases
2024-08-05 23:18:44 +02:00
NitinPSingh
fa738ec373
fix #5660 standardized relation icon (#6504)
fix #5660 

- updated One to many [1:N] icon across app
- created many to one icon [N:1] , and added it in app


![download
(2)](https://github.com/user-attachments/assets/35ce05be-0f5f-4cd0-a1b7-7ab9062f74a0)
![download
(1)](https://github.com/user-attachments/assets/57316e49-c931-4ab5-ad4b-d04b241724c3)

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-05 15:47:25 +02:00
Jérémy M
6432ad39b9
feat: add new ACTOR field type and createdBy standard fields (#6324)
This pull request introduces a new `FieldMetadataType` called `ACTOR`.
The primary objective of this new type is to add an extra column to the
following objects: `person`, `company`, `opportunity`, `note`, `task`,
and all custom objects.

This composite type contains three properties:

- `source`
    ```typescript
    export enum FieldActorSource {
      EMAIL = 'EMAIL',
      CALENDAR = 'CALENDAR',
      API = 'API',
      IMPORT = 'IMPORT',
      MANUAL = 'MANUAL',
    }
    ```
- `workspaceMemberId`
- This property can be `undefined` in some cases and refers to the
member who created the record.
- `name`
- Serves as a fallback if the `workspaceMember` is deleted and is used
for other source types like `API`.

### Functionality

The pre-hook system has been updated to allow real-time argument
updates. When a record is created, a pre-hook can now compute and update
the arguments accordingly. This enhancement enables the `createdBy`
field to be populated with the correct values based on the
`authContext`.

The `authContext` now includes:
- An optional User entity
- An optional ApiKey entity
- The workspace entity

This provides access to the necessary data for the `createdBy` field.

In the GraphQL API, only the `source` can be specified in the
`createdBy` input. This allows the front-end to specify the source when
creating records from a CSV file.

### Front-End Handling

On the front-end, `orderBy` and `filter` are only applied to the name
property of the `ACTOR` composite type. Currently, we are unable to
apply these operations to the workspace member relation. This means that
if a workspace member changes their first name or last name, there may
be a mismatch because the name will differ from the new one. The name
displayed on the screen is based on the workspace member entity when
available.

### Missing Components

Currently, this PR does not include a `createdBy` value for the `MAIL`
and `CALENDAR` sources. These records are created in a job, and at
present, we only have access to the workspaceId within the job. To
address this, we should use a function similar to
`loadServiceWithContext`, which was recently removed from `TwentyORM`.
This function would allow us to pass the `authContext` to the jobs
without disrupting existing jobs.
Another PR will be created to handle these cases.

### Related Issues

Fixes issue #5155.

### Additional Notes

This PR doesn't include the migrations of the current records and views.
Everything works properly when the database is reset but this part is
still missing for now. We'll add that in another PR.

- There is a minor issue: front-end tests are broken since this commit:
[80c0fc7ff1).

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-08-03 15:43:31 +02:00
nitin
8c7ae9e07f
Adjusted empty tag style (#6465)
Fixed Issue #6307  

corrected 
- border style
- font color
- font weight

added
- Empty Tag story
2024-08-01 10:29:05 +02:00
Félix Malfait
80c0fc7ff1
Activity as standard object (#6219)
In this PR I layout the first steps to migrate Activity to a traditional
Standard objects

Since this is a big transition, I'd rather split it into several
deployments / PRs

<img width="1512" alt="image"
src="https://github.com/user-attachments/assets/012e2bbf-9d1b-4723-aaf6-269ef588b050">

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
Co-authored-by: bosiraphael <71827178+bosiraphael@users.noreply.github.com>
Co-authored-by: Weiko <corentin@twenty.com>
Co-authored-by: Faisal-imtiyaz123 <142205282+Faisal-imtiyaz123@users.noreply.github.com>
Co-authored-by: Prateek Jain <prateekj1171998@gmail.com>
2024-07-31 15:36:11 +02:00
gitstart-app[bot]
fed12ddfcd
Improve performance of demo workspace - Rename getImageAbsoluteURIOrBase64 function (#6282)
### Description

1. This PR is a continuation of a previous PR:
https://github.com/twentyhq/twenty/pull/6201#pullrequestreview-2175601222

2. One test case was removed here:
`packages/twenty-front/src/utils/image/__tests__/getImageAbsoluteURI.test.ts`
because since we are not handling base64 images anymore, the result is
the same of the last test case. Would you rather we update the test
instead?


### Refs

- #3514
- https://github.com/twentyhq/twenty/pull/6201

### Demo


https://www.loom.com/share/4f32b535c77a4d418e319b095d09452c?sid=df34adf8-b013-44ef-b794-d54846f52d2d

Fixes #3514

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
2024-07-29 14:07:21 +02:00
martmull
00fea17920
Serverless function UI (#6388)
https://www.figma.com/design/xt8O9mFeLl46C5InWwoMrN/Twenty?node-id=36235-120877

Did not do the file manager part. A Function is defined using one unique
file at the moment

Feature protected by featureFlag `IS_FUNCTION_SETTINGS_ENABLED`

## Demo


https://github.com/user-attachments/assets/0acb8291-47b4-4521-a6fa-a88b9198609b
2024-07-29 13:03:09 +02:00
NitinPSingh
9d51af3b41
fix #6127 updated support button (#6422)
fix #6127 

updated the Support button toopen a menu that allows users to either
access the [user guide](https://twenty.com/user-guide) or contact
support through the chat.

![Screenshot
(675)](https://github.com/user-attachments/assets/026e48ee-c397-44ae-bee7-e76698298a52)

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-07-27 18:40:34 +02:00
bosiraphael
6728e40256
5899 display a banner to alert users which need to reconnect their account (#6301)
Closes #5899

<img width="1280" alt="Index - banner"
src="https://github.com/twentyhq/twenty/assets/71827178/313cf20d-eb34-496a-8c7c-7589fbd55954">

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-07-27 18:34:52 +02:00
brendanlaschke
4545ba2737
Update blocknote (#6349)
Updating blocknote providing bugfixes & new block types

---------

Co-authored-by: Marie Stoppa <marie.stoppa@essec.edu>
2024-07-22 16:00:14 +02:00
Priyank Sevak
33fc4ff907
New "inverted" Background Colors (#6354)
- Added 2 new Inverted background colors as requested under issue#4726

Co-authored-by: Marie Stoppa <marie.stoppa@essec.edu>
2024-07-22 12:03:23 +02:00
Marie
1bfc6aeba0
Bump version to v0.22.0 (#6292) 2024-07-16 17:14:35 +02:00
Aditya Pimpalkar
4a67cfa1c3
feat: Revamp navigation bar (#6031)
closes: #4428

Testing for fetchMoreRecords is pending, along with component tests

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-07-16 14:38:17 +02:00
Charles Bochet
2cd624a5ab
Add no value column on Kanban (#6252)
<img width="1512" alt="image"
src="https://github.com/user-attachments/assets/9fcdd5ca-4329-467c-ada8-4dd5d45be259">

Open questions:
- the Tag component does not match Figma in term of style and API for
"transparent" | "outline". We need to discuss with @Bonapara what is the
desired behavior here
- right now opportunity.stage is not nullable. We need to discuss with
@FelixMalfait and @Bonapara what we want here. I would advocate to make
a it nullable for now until we introduce settings on select fields.
custom select are nullable and it could be confusing for the user

Follow up:
- enhance tests on Tags
- add story to cover the No Value column on record board
2024-07-15 17:48:17 +02:00
Charles Bochet
1c3ea9b106
Bump version to 0.21 (#6161) 2024-07-08 16:57:35 +02:00
ad-elias
4c642a0bb8
Text-to-SQL proof of concept (#5788)
Added:
- An "Ask AI" command to the command menu.
- A simple GraphQL resolver that converts the user's question into a
relevant SQL query using an LLM, runs the query, and returns the result.

<img width="428" alt="Screenshot 2024-06-09 at 20 53 09"
src="https://github.com/twentyhq/twenty/assets/171685816/57127f37-d4a6-498d-b253-733ffa0d209f">

No security concerns have been addressed, this is only a
proof-of-concept and not intended to be enabled in production.

All changes are behind a feature flag called `IS_ASK_AI_ENABLED`.

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-07-04 08:57:26 +02:00
Sudarsh
ea7d52fba8
feature to reset value in select field (#6067)
Fixes #6064 



https://github.com/twentyhq/twenty/assets/55168611/8c553422-6ad2-4e6b-bd00-962dd81c0a93

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-07-02 13:16:17 +02:00
Lucas Bordeau
be1503c719
Remove CSS modules (#6017)
CSS modules were used as a first test for performance optimization.

We later found out that Linaria was a better tradeoff.

This PR removes what was implemented in CSS modules and also the CSS
theme file that was created that was overlapping with the TS theme
files.
2024-06-30 21:54:11 +02:00
Charles Bochet
6683ffb890
Clarify storybook tests (#6073)
In this PR, I'm simplifying storybook setup:
1) Remove build --test configuration that prevent autodocs. We are not
using autodocs at all (the dev experience is not good enough), so I have
completely disabled it.
2) Clarify `serve` vs `test` vs `serve-and-test` configurations


After this PR:
- you can serve storybook in two modes: `npx nx run
twenty-front:storybook:serve:dev` and `npx nx run
twenty-front:storybook:serve:static`
- you can run tests agains an already served storybook (this is useful
in dev so you don't have to rebuild everytime to run tests): `npx nx run
twenty-front:storybook:test`
- you can conbine both: `npx nx run
twenty-front:storybook:serve-and-test:static`
2024-06-30 20:02:13 +02:00
Vitor Hugo Rodrigues
91b0c2bb8e
feat: add brazilian real currency (#5989)
Added support to Brazilian Real currency code, added the new code on
`CurrencyCode.ts` and on `SETTINGS_FIELD_CURRENCY_CODES`
2024-06-22 08:38:52 +02:00
Aakarshan Thapa
35b9b29f20
Fix: Selected Line Not Fully Highlighted in Blue (#5966)
Fixes: #5942

<img width="1517" alt="Screenshot 2024-06-19 at 5 07 35 PM"
src="https://github.com/twentyhq/twenty/assets/63531478/c88a98e9-7ce3-43fe-a496-1a5dfe796b81">

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-06-21 15:49:47 +02:00
Rushikesh Tarapure
bc8c895b0e
Feat : Introduced Delay Options for Tooltip (#5766)
Fixes https://github.com/twentyhq/twenty/issues/5727

---------

Co-authored-by: Rushikesh Tarapure <rushikeshtarapure@gofynd.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-06-19 16:37:44 +02:00
gitstart-twenty
64b456912a
Favicons are being re-rendered on hover (#5849)
### Description

Favicons are being re-rendered on hover

### Refs

#3523

### Demo


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

Fixes #3523

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-06-19 13:34:42 +02:00
Hanch Han
38537a3967
Add South Korean won to currency codes (#5914)
Greetings from Seoul! I found this amazing project a few days ago, and
trying to introduce it to my team. However there is a tiny but
significant problem, that South Korean won is not available in twenty.

So I added `KRW` to the enum `CurrencyCode` and the constant
`SETTINGS_FIELD_CURRENCY_CODES`. I tested it locally and apparently
works fine.
2024-06-18 11:14:31 +02:00
Lucas Bordeau
e1bd3a4c5a
Added and optimized missing RatingFieldDisplay component (#5904)
The display for Rating field type was missing, I just added it based on
RatingInput in readonly mode and optimized a bit for performance also.

Fixes https://github.com/twentyhq/twenty/issues/5900
2024-06-17 17:27:19 +02:00
Ymir
605945bd42
Added Thai Baht support (#5881)
Hey, saw Thai Baht support was
[requested](https://github.com/twentyhq/twenty/issues/5876) and thought
it was a cool first issue to get to know the project a little bit.
2024-06-16 09:39:16 +02:00
Marie
582653f9df
Bump to version 0.20.0 (#5857) 2024-06-13 17:39:46 +02:00
Lucas Bordeau
03b3c8a67a
Refactored all FieldDisplay types for performance optimization (#5768)
This PR is the second part of
https://github.com/twentyhq/twenty/pull/5693.

It optimizes all remaining field types.

The observed improvements are :
- x2 loading time improvement on table rows
- more consistent render time

Here's a summary of measured improvements, what's given here is the
average of hundreds of renders with a React Profiler component. (in our
Storybook performance stories)

| Component | Before (µs) | After (µs) |
| ----- | ------------- | --- |
| TextFieldDisplay | 127 | 83 |
| EmailFieldDisplay | 117 | 83 |
| NumberFieldDisplay | 97 | 56 |
| DateFieldDisplay | 240 | 52 |
| CurrencyFieldDisplay | 236 | 110 |
| FullNameFieldDisplay | 131 | 85 |
| AddressFieldDisplay | 118 | 81 |
| BooleanFieldDisplay | 130 | 100 |
| JSONFieldDisplay | 248 | 49 |
| LinksFieldDisplay | 1180 | 140 |
| LinkFieldDisplay | 140 | 78 |
| MultiSelectFieldDisplay | 770 | 130 |
| SelectFieldDisplay | 230 | 87 |
2024-06-12 18:36:25 +02:00
TheUnspokenFifth
710291238e
Inline link chips cropped (#5810)
Issue: [#5654](https://github.com/twentyhq/twenty/issues/5654)

Changed chip vertical padding from 3px to 1px. This resulted in vertical
size changing from 24px to 20px.

![image](https://github.com/twentyhq/twenty/assets/124464818/aaed1e57-91e3-4d98-91b5-5dd10b857c9f)



![image](https://github.com/twentyhq/twenty/assets/124464818/c16223b5-35f4-40b0-b0ad-828973bb47a2)

---------

Co-authored-by: ktang520 <ktang520@gmail.com>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Co-authored-by: Sage Bain <47053579+Shyesta@users.noreply.github.com>
Co-authored-by: Shyesta <mrsixpaths@aol.com>
2024-06-11 13:54:19 +02:00
brendanlaschke
908990315d
Datamodel overview improvements (#5771)
closes #5586
<img width="707" alt="Bildschirmfoto 2024-06-07 um 14 05 39"
src="https://github.com/twentyhq/twenty/assets/48770548/af5fa200-d71b-41ed-9478-35becfc306a3">
2024-06-07 14:53:12 +02:00
Hinson Chan
c76bc4729d
[4725] Inverted Variants of buttons (#5671)
Resolves #4725

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-06-06 16:41:22 +02:00
martmull
9f6a6c3282
5622 add a syncemail onboarding step (#5689)
- add sync email onboarding step
- refactor calendar and email visibility enums
- add a new table `keyValuePair` in `core` schema
- add a new resolved boolean field `skipSyncEmail` in current user




https://github.com/twentyhq/twenty/assets/29927851/de791475-5bfe-47f9-8e90-76c349fba56f
2024-06-05 18:16:53 +02:00
Weiko
126d9ef2e6
Bump versions to 0.12.2 (#5751) 2024-06-05 15:26:27 +02:00
Félix Malfait
5164c7fd3c
Update icon and fix relation creation (#5742)
A minor fix (update icon and fix relation creation when creating a
relation in right drawer)
2024-06-05 11:07:48 +02:00
Jeet Desai
fa70f9cfc7
Fix: Reduce spacing gap between Task title and subtitle (#5711)
Fixes: #5669

---------

Co-authored-by: Thomas Trompette <thomas.trompette@sfr.fr>
2024-06-04 15:17:46 +02:00
Indrakant D
32d4b37d37
Change Navigation Font Weight (#5704)
fixes [#5665](https://github.com/twentyhq/twenty/issues/5665).


| Before | After |
| --- | --- |
| <img width="257" alt="Screenshot 2024-06-02 at 1 22 09 AM"
src="https://github.com/twentyhq/twenty/assets/60315832/b78da8fa-cea8-45af-b32c-864d6bce050a">
| <img width="248" alt="Screenshot 2024-06-02 at 1 21 01 AM"
src="https://github.com/twentyhq/twenty/assets/60315832/793c3d16-3ed7-408f-acdd-6f7f4ec92ca2">
|
2024-06-04 10:03:07 +02:00
Marie
930237e778
Bump to version v0.12.1 (#5608) 2024-05-27 16:07:38 +02:00
Marie
857971458a
Bump version to v0.12.0 (#5604) 2024-05-27 15:16:50 +02:00
Marie
2a1ea326d2
Fix SnackBar visual (#5569)
cf https://discord.com/channels/1130383047699738754/1243478998810497054
2024-05-27 12:15:57 +02:00
Lucas Bordeau
446c5564d6
Fixed entity chip navigate (#5587)
Fixed EntityChip, navigate had been removed during performance
optimization, I put it back.
2024-05-27 11:30:01 +02:00
Abdullah
cfd83d6b8e
[UI] Remove theme constants from twenty-front and use the ones exported from twenty-ui. (#5558)
Some parts of the Frontend used theme constants exported from
`modules/ui` while other parts used theme constants exported from
`twenty-ui`.

This PR centralizes theme constants by removing them from `modules/ui`
completely.
2024-05-25 16:09:25 +02:00
Charles Bochet
9c325eb0ef
Fix opportunities board and CI (#5573)
RelationFieldDisplay was estabilishing a dependency on
RecordTableContext which is not right as FieldDisplay can be loaded
outside of RecordTable context

I'm using an util directly but understand this is a bit heavier than
before in term of performance. If we want to pre-compute this, we will
need to be a bit smarter.

Also the previous code based on fieldName was not right, we should check
relationObjectMetadataItem instead
2024-05-25 12:29:20 +02:00
Lucas Bordeau
a0178478d4
Feat/performance-refactor-styled-component (#5516)
In this PR I'm optimizing a whole RecordTableCell in real conditions
with a complex RelationFieldDisplay component :
- Broke down getObjectRecordIdentifier into multiple utils
- Precompute memoized function for getting chip data per field with
useRecordChipDataGenerator()
- Refactored RelationFieldDisplay
- Use CSS modules where performance is needed instead of styled
components
- Create a CSS theme with global CSS variables to be used by CSS modules
2024-05-24 18:53:37 +02:00
Shashank Vishwakarma
3de5ed3427
Added: The support for CZK Currency (#5561)
Added the Czech Koruna currency support.
- Added the CZK to the currency code.
- Set the desired CZK icon to `TablerIcons` to use it within the
`twenty-ui`

fixes: #5530 

![Screenshot
(335)](https://github.com/twentyhq/twenty/assets/140178357/a19a60b8-2261-44b3-9ed2-5c35424631a1)
![Screenshot
(336)](https://github.com/twentyhq/twenty/assets/140178357/20944e43-901c-4dda-b986-a47763fb5f9b)
2024-05-24 18:11:08 +02:00
Thaïs
736c79afde
fix: Links field fixes (#5565)
Related issue: #3607
2024-05-24 17:59:08 +02:00