Commit Graph

82 Commits

Author SHA1 Message Date
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
Thaïs
9ad3fb96b7
feat: move Snackbar to top of screen on mobile (#5567)
... and change SnackBar blur to medium.

@Bonapara Following
https://github.com/twentyhq/twenty/pull/5515#discussion_r1609618980

Related issue: https://github.com/twentyhq/twenty/issues/5383

<img width="386" alt="image"
src="https://github.com/twentyhq/twenty/assets/3098428/de2f0be4-9d9c-4013-bed2-774e0599ce49">
2024-05-24 17:58:12 +02:00
Marie
fe5b558477
[FE] Update remote table schema + refactor Tables list (#5548)
Closes #5062.

Refactoring tables list to avoid rendering all toggles on each sync or
schema update while using fresh data:
- introducing id for RemoteTables in apollo cache
- manually updating the cache for the record that was updated after a
sync or schema update instead of fetching all tables again
2024-05-23 17:00:24 +02:00
Thaïs
8019ba8782
feat: implement new SnackBar design (#5515)
Closes #5383

## Light theme

<img width="905" alt="image"
src="https://github.com/twentyhq/twenty/assets/3098428/ab0683c5-ded3-420c-ace6-684d38794a2d">

## Dark theme

<img width="903" alt="image"
src="https://github.com/twentyhq/twenty/assets/3098428/4e43ca35-438d-4ba0-8388-1f061c6ccfb0">
2024-05-23 12:19:50 +02:00
Charles Bochet
7b1bea3a8a Release patch v0.11.3 2024-05-23 08:41:37 +02:00
Abdullah
b8eef21343
[UI] Extract our ColorSample and Tag components from twenty-front to twenty-ui. (#5543)
Two more components extracted out of twenty-front: `ColorSample` and
`Tag`.
2024-05-23 07:46:31 +02:00
Abdullah
d1cbd709bd
Extract typography components from twenty-front to twenty-ui. (#5466)
Removed the following components from twenty-front and moved them to
twenty-ui.
- H1Title.
- H2Title.
- H3Title.

Moving components in smaller chunks to ease the process of resolving
conflicts.

<img width="1255" alt="image"
src="https://github.com/twentyhq/twenty/assets/125115953/a3953659-5dfd-4d03-a6de-50b064129d55">

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-05-22 10:52:35 +02:00
Thaïs
47a6146dd0
feat: set primary link in Links field (#5429)
Closes #5375

<img width="381" alt="image"
src="https://github.com/twentyhq/twenty/assets/3098428/d87773df-c685-466b-ae35-a8349f79df48">

_____

~~Note that I ugraded `@apollo/client` to v3.10.4 because current
version is causing an error when trying to write the Links field in the
cache in `updateRecordFromCache` (`TypeError: Cannot convert object to
primitive value`). After upgrade, the error is gone but console still
prints a warning (here the custom object name is `Listing` and the Links
field name is `website`):~~

<img width="964" alt="image"
src="https://github.com/twentyhq/twenty/assets/3098428/834b8909-e8dc-464a-8c5a-6b7e4c964a7f">

~~It might be because the Links field seems to somehow have a
`__typename` property in Apollo's cache, so Apollo considers it as a
record and tries to match the object's cache with an id, but the Links
field value has no id so it can't find it.
We might want to find where this `__typename` is added and remove it
from the Links object in the cache.~~

Edit: will fix this in another PR as upgrading `@apollo/client` +
`apollo-upload-client` seems to break types and/or tests. Related issue:
[#5437](https://github.com/twentyhq/twenty/issues/5437)
2024-05-22 10:32:37 +02:00
Thaïs
48003887ce
feat: remove a link from a Links field (#5313)
Closes #5117

TO FIX in another PR: right now, the "Vertical Dots" LightIconButton
inside the Dropdown menu sometimes needs to be clicked twice to open the
nested dropdown, not sure why 🤔 Maybe an `event.preventDefault()` is
needed somewhere?

<img width="369" alt="image"
src="https://github.com/twentyhq/twenty/assets/3098428/dd0c771a-c18d-4eb2-8ed6-b107f56711e9">

---------

Co-authored-by: Jérémy Magrin <jeremy.magrin@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-05-22 09:39:21 +02:00
ktang520
1ceeb68da8
Changed record chip functionality from onClick to anchor tag (#5462)
[#4422](https://github.com/twentyhq/twenty/issues/4422)

Demo:



https://github.com/twentyhq/twenty/assets/155670906/f8027ab2-c579-45f7-9f08-f4441a346ae7



Within the demo, we show the various areas in which the Command/CTRL +
Click functionality works. The table cells within the People and
Companies tab open within both the current tab and new tab due to
unchanged functionality within RecordTableCell. We did this to ensure we
could get a PR within by the end of the week.

In this commit, we ONLY edited EntityChip.tsx. We did this by:

- Removing useNavigate() and handleLinkClick/onClick functionality

- Wrapping InnerEntityChip in an anchor tag

This allowed for Command/CTRL + Click functionality to work. Clickable
left cells on tables, left side menu, and data model navigation
files/areas DID NOT get updated.

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-05-20 11:31:39 +02:00
Thaïs
992602b307
fix: fix storybook build cache not being used by tests in CI (#5451)
TL;DR:
- removed `--configuration={args.scope}` from `storybook:static:test`
for the `storybook:static` part, as it was making `front-sb-test` jobs
in CI not reuse the cache from the `front-sb-build` job and re-build
storybook every time.
- replaced it with a new `test` configuration which optimizes storybook
build for tests and builds storybook 2x faster.

## Fix storybook:build cache usage in CI

`storybook:static:test` executes two scripts in parallel:
1. `storybook:static`, which depends on `storybook:build`
1.a. it builds storybook first with `storybook:build`, the output
directory is `storybook-static`.
1.b. then it launches an `http-server`, using what has been built in
`storybook-static`
2. `storybook:test` to execute tests (needs the storybook http-server to
be running)

When passing `--configuration=pages` or `--configuration=modules` to
`storybook:static` from step 1, those configurations are passed to the
`storybook:build` script from step 1.a as well.

But for Nx `storybook:build` and `storybook:build --configuration=pages`
(or `modules`) are not the same command, therefore one does not reuse
the cache of the other because they could output completely different
things.

As `front-sb-test` jobs are passing `--configuration={args.scope}` to
`storybook:static`, the cache of the previously executed
`storybook:build` (from `front-sb-build`) is not reused and therefore
each job re-builds Storybook with its own scope, which increases CI
time.

### Solution

- Removed scope configurations from `storybook:static` and
`storybook:build` scripts to avoid confusion.
- `storybook:test` and `storybook:dev` can keep scope configurations as
they can be useful and this doesn't impact storybook build cache in CI.

### Improve Storybook build time for testing

Added the `test` configuration to `storybook:build` and
`storybook:static` which makes Storybook build time 2x faster. It
disables addons that slow down build time and are not used in tests.
2024-05-17 16:05:31 +02:00
Joe S
9bc9513845
Edit opacity from 0.8 to 0.5 and remove forBackdropFilter (#5291)
Update for #4836 

- edit primary and secondary transparency opacities from 0.8 to 0.5
- remove forBackdropFilter from themes
- update components referencing transparency/primary and
transparency/secondary to have the following backdrop-filter: blur(12px)
saturate(200%) contrast(50%) brightness(130%)

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-05-16 17:19:27 +02:00
Thaïs
602d5422a2
feat: display Links field as Expandable List (#5374)
Closes #5114
2024-05-15 15:52:23 +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
Marie
ae0e31abc7
Bump versions to 0.11.2 (#5349) 2024-05-10 13:56:41 +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
Jeet Desai
6edecf72a0
Fix: Icon position alignment right to left in chip (#5330)
Fixes #5298 


![image](https://github.com/twentyhq/twenty/assets/52026385/6cfcc380-bdd1-4d7b-a0c7-58434d610ace)
2024-05-07 20:52:25 +02:00
Thaïs
fc87a51acf
fix: fix storybook:build memory allocation error in CI (#5284) 2024-05-03 19:19:21 +02:00