Commit Graph

1527 Commits

Author SHA1 Message Date
rostaklein
dcd769f20f
spreadsheet import utf8 emoji support (#5720)
fixes https://github.com/twentyhq/twenty/issues/5476

took some time to find the right spot, but ChatGPT was helpful enough in
this case 😄

<img width="311" alt="Screenshot 2024-06-03 at 20 24 26"
src="https://github.com/twentyhq/twenty/assets/19856731/4ea0188b-bee5-4a4f-a8af-2630e3b1c373">
2024-06-03 21:26:08 +02:00
Ady Beraud
671de4170f
Migrated Developer Docs (#5683)
- Migrated developer docs to Twenty website

- Modified User Guide and Docs layout to include sections and
subsections

**Section Example:**
<img width="549" alt="Screenshot 2024-05-30 at 15 44 42"
src="https://github.com/twentyhq/twenty/assets/102751374/41bd4037-4b76-48e6-bc79-48d3d6be9ab8">

**Subsection Example:**
<img width="557" alt="Screenshot 2024-05-30 at 15 44 55"
src="https://github.com/twentyhq/twenty/assets/102751374/f14c65a9-ab0c-4530-b624-5b20fc00511a">


- Created different components (Tabs, Tables, Editors etc.) for the mdx
files

**Tabs & Editor**

<img width="665" alt="Screenshot 2024-05-30 at 15 47 39"
src="https://github.com/twentyhq/twenty/assets/102751374/5166b5c7-b6cf-417d-9f29-b1f674c1c531">

**Tables**

<img width="698" alt="Screenshot 2024-05-30 at 15 57 39"
src="https://github.com/twentyhq/twenty/assets/102751374/2bbfe937-ec19-4004-ab00-f7a56e96db4a">

<img width="661" alt="Screenshot 2024-05-30 at 16 03 32"
src="https://github.com/twentyhq/twenty/assets/102751374/ae95b47c-dd92-44f9-b535-ccdc953f71ff">

- Created a crawler for Twenty Developers (now that it will be on the
twenty website). Once this PR is merged and the website is re-deployed,
we need to start crawling and make sure the index name is
‘twenty-developer’
- Added a dropdown menu in the header to access User Guide and
Developers + added Developers to footer


https://github.com/twentyhq/twenty/assets/102751374/1bd1fbbd-1e65-4461-b18b-84d4ddbb8ea1

- Made new layout responsive

Please fill in the information for each mdx file so that it can appear
on its card, as well as in the ‘In this article’ section. Example with
‘Getting Started’ in the User Guide:

<img width="786" alt="Screenshot 2024-05-30 at 16 29 39"
src="https://github.com/twentyhq/twenty/assets/102751374/2714b01d-a664-4ddc-9291-528632ee12ea">

Example with info and sectionInfo filled in for 'Getting Started':

<img width="620" alt="Screenshot 2024-05-30 at 16 33 57"
src="https://github.com/twentyhq/twenty/assets/102751374/bc69e880-da6a-4b7e-bace-1effea866c11">


Please keep in mind that the images that are being used for Developers
are the same as those found in User Guide and may not match the article.

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-06-03 18:52:43 +02:00
Marie
f7cdd14c75
Use same overlay background for field inputs (#5719)
Fixes #5593
2024-06-03 17:17:25 +02:00
Félix Malfait
09bfb617b2
Right drawer to edit records (#5551)
This PR introduces a new side panel to edit records and the ability to
minimize the side panel.

The goal is leverage this sidepanel to be able to create records while
being in another show page.

I'm opening the PR for feedback since it involved refactoring and
therefore already touches a lot of files, even though it was quick to
implement.

<img width="1503" alt="Screenshot 2024-05-23 at 17 41 37"
src="https://github.com/twentyhq/twenty/assets/6399865/6f17e7a8-f4e9-4eb4-b392-c756db7198ac">
2024-06-03 17:15:05 +02:00
JustGJ
8e8078d596
fix remove favorite on opportunity delete (#5686)
- fix : #5521

When we deleted an opportunity that had been added to the favorites
list, the opportunity was removed correctly, but it still remained in
the favorites list. The issue was due to not accounting for the removal
of the opportunity from the favorites during the deletion process.

This problem has now been fixed : 



https://github.com/twentyhq/twenty/assets/78202522/3d3cb689-3228-43fc-bf50-e824370582a7

Co-authored-by: Jeff Gasparini <jeff@Jeff.local>
2024-06-03 16:09:27 +02:00
Shashank Vishwakarma
04dcbffe75
Fixed: Inconsistent Field Label Display on Task Side Panel (#5687)
Now all the required fields are displayed with the respective labels.

- Added a `FieldContextProvider` for the field `Reminder` in the
`ActivityEditorFields`.
- Fixed the missing label values, by adding a missed optional
`showLabel` within the `fieldDefinition` in the `useFieldContext`.

fixes: #5667 

![Screenshot
(342)](https://github.com/twentyhq/twenty/assets/140178357/adf9563a-6cab-4809-8616-1c256abab717)
2024-06-03 15:58:58 +02:00
Thomas Trompette
2886664b62
Backfill position when not input (#5696)
- refactor record position factory and record position query factory
- override position if not present during createMany

To avoid overriding the same positions for all data in createMany, the
logic is:
- if inserted last, use last position + arg index + 1
- if inserted first, use first position - arg index - 1
2024-06-03 15:18:01 +02:00
Shashank Vishwakarma
a6b8beed68
Fixed: Fields Disappear on Drag and Drop (#5703)
Now the fields don't disappear on drag and drop.

- After reviewing the codebase, I checked that when `inView` is true the
`RecordInlineCell` is rendered otherwise the
`StyledRecordInlineCellPlaceholder` will render which causes the fields
get disappear.
- So, I added the condition to check if `isDragSelectionStartEnabled` is
false then `StyledRecordInlineCellPlaceholder` will be rendered
otherwise `RecordInlineCell`.

fixes: #5651 



https://github.com/twentyhq/twenty/assets/140178357/022195ca-fec2-43a7-8808-f4974dbe66cf

---------

Co-authored-by: martmull <martmull@hotmail.fr>
2024-06-03 15:15:32 +02:00
rostaklein
e49db63f30
accounts page loader as skeleton (#5702)
fixes https://github.com/twentyhq/twenty/issues/5659



https://github.com/twentyhq/twenty/assets/19856731/aeae6f08-bc6e-4d71-9067-39b6382ebf15
2024-06-03 15:14:08 +02:00
spiderman3000
24941c66b7
[Improvement] LeftPanel skeleton loader (#5705)
This change solves #5664 
This modifies the left-side panel skeleton loader in accordance with the
default view.

![old-loading-ui](https://github.com/twentyhq/twenty/assets/171416711/83fe8a06-6f49-4581-bb84-00d2a0291f37)

![new-loading-ui](https://github.com/twentyhq/twenty/assets/171416711/4ba45fc0-8932-4ee9-b558-9f810d7891bd)

![default-loaded-view](https://github.com/twentyhq/twenty/assets/171416711/40c301d2-1015-4a2c-9458-0d2fb9d7de75)
2024-06-03 14:49:57 +02:00
Weiko
e2dc660d18
Fix exception handler capturing graphql errors (#5714)
Our exception handler has to filter out some errors/exceptions so they
are not caught by the ExceptionHandlerDriver (Logged or Sentry for
example). This is done for Http errors in the range of 4xx and also
makes sure they are converted back to Graphql validation errors.
However, graphql validation errors that are already managed by Yoga
(with Schema validation) should also be filtered out, this PR should fix
that behaviour
2024-06-03 14:36:03 +02:00
bosiraphael
2d12984db4
5613 add throttlepauseuntil and throttlefailurecount fields to messagechannel and calendarchannel (#5713)
Closes #5613
2024-06-03 13:22:49 +02:00
Pacifique LINJANJA
7fa05bf539
feat (improvement): update the createOneObjectMetaItem (#5673)
# This PR

- Fix #5278 
- Updates the implementation of the `createOneObjectMataItem` hook to
reduce the number of api calls
- Users can now navigate to the newly created object first and the
graphql api calls to cache data are happening in the background - this
will improve the user experience and reduce the create object api call
time by >2
<img width="1508" alt="Screenshot 2024-05-30 at 12 00 15"
src="https://github.com/twentyhq/twenty/assets/61581306/46513fd1-d46e-40bc-a036-07e3acdf2870">

In the issue description, it also suggested to have a loading indicator
while creating the object, it seems like on #5352 we adopted to disable
it while creating the object - which looks good to me and it works, let
me know if we still need the loading indicator instead @Bonapara

Looking forward to getting your feedback
cc: @charlesBochet

---------

Co-authored-by: Thomas Trompette <thomas.trompette@sfr.fr>
2024-06-03 12:12:04 +02:00
Sagar Hedaoo
52864889da
Updated Snackbar as shown in Figma Fixes #5666 (#5700)
<img width="282" alt="Screenshot 2024-06-01 at 1 07 16 AM"
src="https://github.com/twentyhq/twenty/assets/10000167/0b1cd2f5-9036-4a31-8dfa-b90972ebe1aa">


Updated the font weight and added Cancel label on the left of the icon
as shown in figma design.
Also, didn't increased the gap because it's already like the figma
design!
Let me know if you want more gap between title and description.

Closes https://github.com/twentyhq/twenty/issues/5666

---------

Co-authored-by: Thomas Trompette <thomas.trompette@sfr.fr>
2024-06-03 12:05:04 +02:00
Charles Bochet
eab8deb211
Rework messaging modules (#5710)
In this PR, I'm refactoring the messaging module into smaller pieces
that have **ONE** responsibility: import messages, clean messages,
handle message participant creation, instead of having ~30 modules (1
per service, jobs, cron, ...). This is mandatory to start introducing
drivers (gmails, office365, ...) IMO. It is too difficult to enforce
common interfaces as we have too many interfaces (30 modules...). All
modules should not be exposed

Right now, we have services that are almost functions:
do-that-and-this.service.ts / do-that-and-this.module.ts
I believe we should have something more organized at a high level and it
does not matter that much if we have a bit of code duplicates.

Note that the proposal is not fully implemented in the current PR that
has only focused on messaging folder (biggest part)

Here is the high level proposal:
- connected-account: token-refresher
- blocklist
- messaging: message-importer, message-cleaner, message-participants,
... (right now I'm keeping a big messaging-common but this will
disappear see below)
- calendar: calendar-importer, calendar-cleaner, ...

Consequences:
1) It's OK to re-implement several times some things. Example:
- error handling in connected-account, messaging, and calendar instead
of trying to unify. They are actually different error handling. The only
things that might be in common is the GmailError => CommonError parsing
and I'm not even sure it makes a lot of sense as these 3 apis might have
different format actually
- auto-creation. Calendar and Messaging could actually have different
rules

2) **We should not have circular dependencies:** 
- I believe this was the reason why we had so many modules, to be able
to cherry pick the one we wanted to avoid circular deps. This is not the
right approach IMO, we need architect the whole messaging by defining
high level blocks that won't have circular dependencies by design. If we
encounter one, we should rethink and break the block in a way that makes
sense.
- ex: connected-account.resolver is not in the same module as
token-refresher. ==> connected-account.resolver => message-importer (as
we trigger full sync job when we connect an account) => token-refresher
(as we refresh token on message import).

connected-account.resolver and token-refresher both in connected-account
folder but should be in different modules. Otherwise it's a circular
dependency. It does not mean that we should create 1 module per service
as it was done before

In a nutshell: The code needs to be thought in term of reponsibilities
and in a way that enforce high level interfaces (and avoid circular
dependencies)

Bonus: As you can see, this code is also removing a lot of code because
of the removal of many .module.ts (also because I'm removing the sync
scripts v2 feature flag end removing old code)
Bonus: I have prefixed services name with Messaging to improve dev xp.
GmailErrorHandler could be different between MessagingGmailErrorHandler
and CalendarGmailErrorHandler for instance
2024-06-03 11:16:05 +02:00
Charles Bochet
c4b6b1e076 Fix thread cleaner forgetting to clean some thread and messages 2024-06-01 16:51:20 +02:00
Charles Bochet
182ab66eef Fix messaging import issue when all batch messages are excluded 2024-05-31 23:58:33 +02:00
bosiraphael
e0103bbcdc
5015 make gmail filters work for partial sync (#5695)
Closes #5015

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-05-31 23:20:57 +02:00
Sudarsh
c960d2e8ef
Incorrect Icon Width on Menu Items #5678 (#5688)
Fixes https://github.com/twentyhq/twenty/issues/5678
2024-05-31 18:40:23 +02:00
Thomas des Francs
22a0e400f4
updated user-guide images (#5682)
Added a box-shadow on each to unify with the homepage design
2024-05-31 18:12:04 +02:00
Charles Bochet
99dff43579
Add new enum options to messageChannel syncStatus (#5694)
As per title!
This command will enable smooth migrations between 0.12 and 0.20
2024-05-31 18:02:52 +02:00
Thomas Trompette
9fd761dd10
Remove else if on position calculation (#5691)
As title
2024-05-31 14:31:37 +02:00
Thomas Trompette
fbd8714c76
Make positions possibly negatives (#5690)
Closes https://github.com/twentyhq/twenty/issues/5427
2024-05-31 14:17:49 +02:00
bosiraphael
f166171a1c
5531 update gmail full sync to v2 (#5674)
Closes #5531

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-05-31 13:29:58 +02:00
Thomas Trompette
fe941c64be
Build empty state for remote tables (#5652)
Remote tables could be in an empty state because:
- either we do not have data, which is normal
- either the connexion is broken (issue with the server, table requires
updates...)

Apollo throws errors but these will quickly disappear and do not provide
any tips to the user on how handle those.

This PR adds a new empty state placeholder for remote objects, that will
be display when the record list is empty. It will provide a link to the
settings page.

<img width="1512" alt="Capture d’écran 2024-05-30 à 11 49 33"
src="https://github.com/twentyhq/twenty/assets/22936103/fc2dd3cc-e90b-4033-b023-83ac9ff2a70b">
2024-05-31 11:24:42 +02:00
Thomas Trompette
c60a3e49cd
Catch query timeout exceptions (#5680)
Query read timeouts happen when a remote server is not available. It
breaks:
- the remote server show page
- the record table page of imported remote tables

This PR will catch the exception so it does not go to Sentry in both
cases.

Also did 2 renaming.
2024-05-31 10:39:35 +02:00
Marie
5e1dfde3e4
After createOneDbConnection mutation, update cache manually instead of using refetchQuery (#5684)
Closes #5057.

RefetchQuery is unreliable - [it won't be executed if the component is
unmounted](https://github.com/apollographql/apollo-client/issues/5419),
which is the case here because of the redirection that occurs after the
mutation.
We want to avoid using refetchQuery as much as possible, and write
directly in the cache instead.
2024-05-31 10:28:44 +02:00
Shashank Vishwakarma
c7f2150ac7
Fixed: In CSV import now users are able to come back to the previous step. (#5625)
Users now can make a back transition from the current step state.

- Added a `BackButton` component to `spreadsheet-import` in order to use
it within the step state components.
- Used the prebuilt `prevStep` from `useStepBar` and passed it as a prop
to the `Uploadflow` to get the previous state as activestep.
- Added a `previousState` to set the previous state with the required
key data.
- Added a `handleOnBack` function in `Uploadflow` to set the correct
state and call the `prevStep` function to make the transition.
- Added a callback function `onBack` and passed it as props to each step
state component.

fixes: #5564 



https://github.com/twentyhq/twenty/assets/140178357/be7e1a0a-0fb8-41f2-a207-dfc3208ca6f0

---------

Co-authored-by: Thomas Trompette <thomas.trompette@sfr.fr>
2024-05-30 18:43:56 +02:00
Aditya Pimpalkar
a12c1aad5e
fix: user has to login every time chrome sidepanel is opened (#5544)
We can pass the auth tokens to our front app via post message, which
will also allow us to pass route names to navigate on it
2024-05-30 12:58:45 +02:00
Indrakant D
d770e56e31
fix: Poor contrast on SlashMenu (#5342)
fixes
[#5304](https://github.com/twentyhq/twenty/issues/5304#issue-2280984063)

dark mode
<img width="1425" alt="Screenshot 2024-05-09 at 1 59 56 AM"
src="https://github.com/twentyhq/twenty/assets/60315832/70230f9e-607a-462a-8823-db8350d86bc4">


<br>
<br>
Light mode
<img width="1448" alt="Screenshot 2024-05-09 at 2 01 06 AM"
src="https://github.com/twentyhq/twenty/assets/60315832/523488a5-21de-4911-b11b-e28fba9adae6">

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-05-30 11:00:23 +02:00
Marie
339aee6dbb
Run queries within queryRunner transaction sequentially (#5668)
Within a queryRunner transaction, it is important that migrations are
run subsequently and not concurrently: otherwise if an error is thrown
by one of the query, it will abort the transaction; any subsequent query
running on the same queryRunner will cause the error _current
transaction is aborted, commands ignored until end of transaction
block_.

Using an async function in a map as below does not guarantee that each
query terminates before iterating over the next one, which can be an
issue as described above, and which seems to cause [this
sentry](https://twenty-v7.sentry.io/issues/5258406553/?environment=prod&project=4507072499810304&query=is%3Aunresolved+issue.priority%3A%5Bhigh%2C+medium%5D&referrer=issue-stream&statsPeriod=7d&stream_index=4).
2024-05-30 10:45:46 +02:00
martmull
9a23f9b322
4699 update the onboarding app placeholder (#5616)
## Before

![image](https://github.com/twentyhq/twenty/assets/29927851/e9055c16-eed3-48f1-a4e2-df115a6c2247)

## After

![image](https://github.com/twentyhq/twenty/assets/29927851/254c7573-81c7-487e-b653-5b0ba311cf9e)
2024-05-29 23:35:32 +02:00
Lucas Bordeau
bcb582ffa0
Fixed button icon bug (#5670)
There was a bug with the isEmpty variable actually being a function from
lodash instead of the result of `isFieldEmpty()`.
2024-05-29 21:29:33 +02:00
Aditya Pimpalkar
008813f194
fix: twenty-chrome-extension:"graphql:generate" (#5649)
fixes: #5645
2024-05-29 14:45:32 +02:00
R894
df2b76ff6c
4848 - Update Checkbox component (#4883)
# Summary
* Add hover state which defaults to **false**
* Add disable state


![chrome_KV2AltSmBK](https://github.com/twentyhq/twenty/assets/54629307/976fba28-b975-4acc-9d06-c14c4fe339d8)


closes #4848

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-05-29 13:34:29 +02:00
Lucas Bordeau
ecff27f90c
Improved hotkey scopes docs (#5647)
We have a lot of contributors that are not aware of our method for
implementing hotkey listeners.

I updated the documentation to provide clear examples so that users can
refer to it and maintainers and reviewers can point to it when they see
onKeyDown implementations.
2024-05-29 12:45:29 +02:00
Marie
5bb205bd6a
Fix update remote field metadata (#5638)
Closes #5610.

& update fetch-policy when fetching database on the remote databases
show page to get freshest status.
2024-05-28 18:01:05 +02:00
Thomas Trompette
ebb1aa0377
Add label to remote server (#5637)
Added label on remote server entity. 

Also added the possibility to update schema. 

<img width="688" alt="Capture d’écran 2024-05-28 à 15 36 31"
src="https://github.com/twentyhq/twenty/assets/22936103/c9786122-8459-4876-833e-c9a1d7d27829">
2024-05-28 15:54:57 +02:00
Thomas Trompette
ae6d5afdfc
Add missing stripe tables (#5621)
As title

Still adding not working tables / columns commented so we know why these
are not available.
2024-05-28 11:32:57 +02:00
Sage Bain
443fb53158
Updated Past Events Font-Color to Primary for Visibility (#5572)
Issue: [#5164](https://github.com/twentyhq/twenty/issues/5164)

Updated font-color of the title of past calendar events to be primary to
improve visibility. Calendar event time font-color remains unchanged.

Before:

![image](https://github.com/twentyhq/twenty/assets/47053579/8556eefb-d79e-4924-a15b-1609c0720aa3)

After:

![image](https://github.com/twentyhq/twenty/assets/47053579/a2d3639c-0a04-4db6-998e-f76b01e1e392)

The year in month-year at the top of these screenshots also appears to
be in tertiary font-color which can be adjusted too if that feels not
visible enough.

---------

Co-authored-by: ktang520 <ktang520@gmail.com>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-05-27 22:18:12 +02:00
Piyush Yadav
ef64911e45
fix: Requests for new captcha token after a wrong password is entered. (#5614)
Fix issue where captcha did not reset after an incorrect password was
entered and invalid token error was thrown, ensuring users receive a new
captcha token on each attempt.

before:
![Screenshot 2024-05-27
191707](https://github.com/twentyhq/twenty/assets/72244570/7530c569-a3b5-46b9-96aa-b03c21f1e99a)

after: user can try again with a new captcha token and login smoothly
without encountering the invalid token error.
2024-05-27 18:06:34 +02:00
Félix Malfait
9df3b406fb
Fix search public api key (#5609)
It was the wrong API key since we changed the index
2024-05-27 16:08:00 +02:00
Marie
930237e778
Bump to version v0.12.1 (#5608) 2024-05-27 16:07:38 +02:00
Marie
f58c961d98
Remove feature flag for Links field (#5606) 2024-05-27 16:05:22 +02:00
Marie
857971458a
Bump version to v0.12.0 (#5604) 2024-05-27 15:16:50 +02:00
bosiraphael
1715aa8465
Remove hasCalendarEventStarted flaky test (#5603)
Remove hasCalendarEventStarted flaky test
2024-05-27 15:16:21 +02:00
martmull
2f52e0fdb6
5505 forgot password feature broken (#5602)
- add missing `excludedOperations` in
`packages/twenty-server/src/engine/middlewares/graphql-hydrate-request-from-token.middleware.ts`
- update generated graphql file
- Add missing redirection to index after password update
2024-05-27 15:13:11 +02:00
Lucas Bordeau
113dfba994
Disable perf stories in chromatic (#5597)
Disabled chromatic for performance stories.
2024-05-27 14:43:39 +02:00
Charles Bochet
56ef8fcff3
Fix missing avatar on People table (#5601)
As per title!
2024-05-27 14:42:45 +02:00
Lucas Bordeau
2c009afd36
Added RecordFieldValueSelectorContext (#5596)
Added RecordFieldValueSelectorContext on mock container so that new
record value using use-context-selector can work properly in fields
module.
2024-05-27 14:02:38 +02:00
Lucas Bordeau
3051f3a790
Fixed new record value context selector sync in activity drawer (#5594)
Forgot to add `<RecordValueSetterEffect recordId={...} />` effect
component for activity drawer during refactor.
2024-05-27 13:58:31 +02:00
Lucas Bordeau
8ee98e0fda
Fixed pending row edit mode (#5592)
This PR fixes creation on table.

With the recent optimization refactor, we now use a custom event to
trigger edit and soft focus mode on a table cell.

There's a specific case when we create a pending row to allow creating a
new record, where the custom event gets triggered before the cell
exists, so it cannot listen and put itself in edit mode.

The fix is passing down a new isPendingRow in the context, so the
identifier cell on a pending row can put itself in edit mode during its
first render.
2024-05-27 13:40:53 +02:00
Marie
2a1ea326d2
Fix SnackBar visual (#5569)
cf https://discord.com/channels/1130383047699738754/1243478998810497054
2024-05-27 12:15:57 +02:00
martmull
bcb5cf7ad7
Remove flash after create workspace (#5589)
## Before


https://github.com/twentyhq/twenty/assets/29927851/a6b4f580-4f01-4f5b-a023-f9fa0d9f9c28


## After


https://github.com/twentyhq/twenty/assets/29927851/2a1feb44-27ce-457d-86a2-eea46a313f98
2024-05-27 12:14:50 +02:00
Charles Bochet
1f9c340bc6
Fix record board broken position (#5588)
Position were not queries anymore while populating kanban board,
breaking the drag and drop feature
2024-05-27 11:50:19 +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
gitstart-twenty
10abd7f0ad
User & Metadata Loading (#5347)
### Description
User & Metadata Loading

### Refs
#4456

### Demo


https://github.com/twentyhq/twenty/assets/140154534/4c20fca6-feaf-45f6-ac50-6532d2ebf050


Fixes #4456

---------

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: Charles Bochet <charles@twenty.com>
2024-05-27 10:38:37 +02:00
Thomas des Francs
74d7479c8c
Added Data Model Diagram to 0.12 changelog (#5585)
# Data Model Diagram

Introduced an "Data Model Diagram" feature that allows users to
visualize the relationships between different objects within the CRM.


![image](https://github.com/twentyhq/twenty/assets/19412894/70f81a93-9166-4036-bb21-f332a42bd850)

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-05-27 09:56:33 +02:00
gitstart-twenty
9c046dcfdb
Prefetch Skeleton Loading on Indexes and Shows (#5545)
### Description
Prefetch Skeleton Loading on Indexes and Shows

### Refs
#4458

### Demo

https://jam.dev/c/a1ad04e1-80b6-4b2a-b7df-373f52f4b169

https://jam.dev/c/c5038b97-2f18-4c29-8dee-18c09376e5ee

Fixes: #4458

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Matheus <matheus_benini@hotmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-05-27 09:56:08 +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
brendanlaschke
1c867d49a1
Add Object Alternative view (#5356)
Current state:

<img width="704" alt="Bildschirmfoto 2024-05-11 um 17 57 33"
src="https://github.com/twentyhq/twenty/assets/48770548/c979f6fd-083e-40d3-8dbb-c572229e0da3">



I have some things im not really happy with right now:

* If I have different connections it would be weird to display a one_one
or many_one connection differently
* The edges overlay always at one hand at the source/target (also being
a problem with the 3 dots vs 1 dot)
* I would have to do 4 versions of the 3 dot marker variant as an svg
with exactly the same width as the edges wich is not as easy as it seems
:)
* The initial layout is not really great - I know dagre or elkjs could
solve this but maybe there is a better solution ...


If someone has a good idea for one or more of the problems im happy to
integrate them ;)

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-05-25 10:38:27 +02:00
martmull
9080981990
5509 remove flash on intermediate verify step when sign in with sso (#5526)
- remove flash on /verify
- remove flash on signInUp
- remove useless redirections and hooks
- Remove DefaultHomePage component
- Move redirections to /objects/companies in PageChangeEffect
- add useShowAuthModal hooks and tests
- add usePageChangeEffectNaviteLocation hooks and tests
- fix refresh token expired produces blank screen
2024-05-25 10:36:59 +02:00
Thomas des Francs
f455ad4001
0.12 changelog (#5560)
Added the changelog items for:
- Skeleton loading
- Blocklist
- Notification new design
2024-05-25 10:29:30 +02:00
Marie
def1774bf0
[Fix] Object names should be camel cased (#5571)
as per title
2024-05-25 10:29:00 +02:00
bosiraphael
936ac4027a
Introduce a new feature flag for contact creation (#5570)
Introduce new feature flag
`IS_CONTACT_CREATION_FOR_SENT_AND_RECEIVED_EMAILS_ENABLED` to allow
contacts to be created for sent and received emails.
2024-05-24 18:55:21 +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
bosiraphael
3680647c9a
Fix sync token is no longer valid in calendar sync (#5563)
Fix sync token is no longer valid in calendar sync.


https://developers.google.com/apps-script/add-ons/calendar/conferencing/sync-calendar-changes#implement_a_sync_trigger_function
_Caution: Occasionally sync tokens are invalidated by the server,
resulting in a Sync token is no longer valid error. When this happens,
your code should conduct a full sync and replace any stored sync tokens
you have._
2024-05-24 18:33:44 +02:00
bosiraphael
87465b13ee
5507 modify the partial sync cron to work with the new statuses (#5512)
Closes #5507
2024-05-24 18:27:54 +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
c7d61e183a
feat: simplify field preview logic in Settings (#5541)
Closes #5382

TODO:

- [x] Test all field previews in app
- [x] Fix tests
- [x] Fix JSON preview
2024-05-24 18:06:57 +02:00
Thaïs
736c79afde
fix: Links field fixes (#5565)
Related issue: #3607
2024-05-24 17:59:08 +02:00
Félix Malfait
fa3443c05b
Improve autoload (#5566)
Set a 1000px margin to start fetching more records before we hit the
bottom of the page, makes the scrolling experience a lot smoother :)
2024-05-24 17:58:37 +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
Lucas Bordeau
de9321dcd9
Fixed sync between record value context selector and record store (#5517)
This PR introduces many improvements over the new profiling story
feature, with new tests and some refactor with main :
- Added use-context-selector for getting value faster in display fields
and created useRecordFieldValue() hook and RecordValueSetterEffect to
synchronize states
- Added performance test command in CI
- Refactored ExpandableList drill-downs with FieldFocusContext
- Refactored field button icon logic into getFieldButtonIcon util
- Added RelationFieldDisplay perf story
- Added RecordTableCell perf story
- First split test of useField.. hook with useRelationFieldDisplay()
- Fixed problem with set cell soft focus
- Isolated logic between display / soft focus and edit mode in the
related components to optimize performances for display mode.
- Added warmupRound config for performance story decorator
- Added variance in test reporting
2024-05-24 16:52:05 +02:00
Charles Bochet
82ec30c957
Expandable list remove anchor (#5559)
Deprecate anchorElement on ExpandableList to avoid props drilling. The
anchorElement should be the ExpandableList container itself
2024-05-24 12:26:42 +02:00
Thaïs
7f7ea59b51
refactor: reset field default value on type change in Settings (#5534)
Related issue: #5412

See https://github.com/twentyhq/twenty/pull/5436#discussion_r1609470484
for context.
2024-05-24 12:15:17 +02:00
Thomas Trompette
18fafbdeb5
Rename findAvailableTables endpoint (#5557)
As title
2024-05-24 10:57:46 +02:00
Marie
4bd0aafb8e
[fix] Update remote table sync status in cache after schema update (#5553)
Upon schema update, sync status can change from synced to non_synced in
case the update regards a table that was deleted. Let's update the sync
status too to avoid displaying the table as still synchronized.


https://github.com/twentyhq/twenty/assets/51697796/7ff2342b-ce9f-4179-9b76-940617cf1292
2024-05-24 10:20:08 +02:00
Aditya Pimpalkar
f9a3d5fd15
chore: remove OAuth from chrome extension (#5528)
Since we can access the tokens directly from cookies of our front app,
we don't require the OAuth process to fetch tokens anymore
2024-05-24 00:01:47 +02:00
Thomas Trompette
fede721ba8
Add sorter for distant tables (#5546)
As title
2024-05-23 22:36:50 +02:00
Jeet Desai
e00b19e4cc
Change email tab placeholder illustration (#5550)
Fixes #5502 


![image](https://github.com/twentyhq/twenty/assets/52026385/ca73add9-101a-4517-96d7-c8fde883c066)

![image](https://github.com/twentyhq/twenty/assets/52026385/120f495b-db07-49c8-a058-5b77b2e06c1c)
2024-05-23 18:26:08 +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
Thomas Trompette
0d6fe7b2b4
Handle relations separately for remotes (#5538)
Remote object id columns are not removed anymore when a remote object is
unsynced.
This is because we do not use relations anymore. We only created the id
field. So the current behavior that was implemented for custom objects,
to retrieve the fields to deleted, does not work.

Since remote object relations are really different, I extracted the
logic from `objectMetadataService`. It now handles only the relations
for custom objects creation and deletion (this part should be extracted
as well).

I create a new remote table relation service that will:
- fetch objects metadata linked to remotes (favorites,
activityTargets...)
- look for columns based on remote object name
- delete the fields and columns
2024-05-23 14:59:34 +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
Jérémy M
453525ca25
fix: workspace health showing error for multi select (#5547)
Fix `workspace:health` command not working properly with `MULTI_SELECT`
field metadata type.
2024-05-23 12:02:40 +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
Marie
6b1d4e0744
[Fix] Do not allow names with whitespaces (#5542)
As per title
2024-05-23 07:43:09 +02:00
Thaïs
04bf697b25
feat: add feature flag to activate Links field creation (#5535)
Related issue: #3607
2024-05-22 18:06:32 +02:00
Weiko
4e533bf2ef
fix pgGraphqlQuery with concurent search path (#5537) 2024-05-22 17:14:33 +02:00
Thomas Trompette
5448512bdc
Add quotes for table name (#5533)
As title
2024-05-22 14:21:32 +02:00
Ady Beraud
4b251812bd
Fixed congratulations bot (#5532)
- Fixed bot
- Added list of team members
2024-05-22 14:02:54 +02:00
Ady Beraud
40bd42efc4
Added Algolia Search (#5524)
-Added Algolia Search Box :

<img width="707" alt="Screenshot 2024-05-22 at 10 05 13"
src="https://github.com/twentyhq/twenty/assets/102751374/d26f9748-2a80-4690-88ca-16b078c52915">

-Added Algolia Search Bar:

<img width="294" alt="Screenshot 2024-05-22 at 10 05 56"
src="https://github.com/twentyhq/twenty/assets/102751374/ad503894-4ae1-41e4-bd4b-6241f7679142">

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-05-22 12:06:00 +02:00
Thomas Trompette
2e79bcc70b
Sync stripe tables (#5475)
Stripe tables do not support `hasNextPage` and `totalCount`. This may be
because of stripe wrapper do not properly support `COUNT` request.
Waiting on pg_graphql answer
[here](https://github.com/supabase/pg_graphql/issues/519).

This PR:
- removes `totalCount` and `hasNextPage` form queries for remote
objects. Even if it works for postgres, this may really be inefficient
- adapt the `fetchMore` functions so it works despite `hasNextPage`
missing
- remove `totalCount` display for remotes
- fix `orderBy`

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-05-22 11:20:44 +02:00
Thaïs
35c1f97511
perf: use Nx cache for Chromatic script (#5457)
Makes sure the `twenty-front:chromatic:ci` task in the CI job
`front-chromatic-deployment` reuses the cache of the Storybook built in
the CI job `front-sb-build` instead of re-building Storybook so
Chromatic is deployed faster in the CI.
2024-05-22 11:18:16 +02:00
Jérémy M
bb6df43d17
fix: twentyORM datasource configuration for ssl (#5529)
We need to specify ssl configuration for TwentyORM datasources when
needed, otherwise connection will be broken.
2024-05-22 11:11:05 +02:00
Thaïs
474dfd7bd8
fix: fix Apollo client cache update error for Links field (#5473)
Fixes #5437
2024-05-22 10:55:24 +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
e2b48e2c4e
feat: edit link in Links field (#5447)
Closes #5376
2024-05-22 10:42:08 +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
martmull
2386191d8e
Fix missing logo at sign-in-up (#5525)
### Before

![image](https://github.com/twentyhq/twenty/assets/29927851/91f94c5f-e337-4163-b858-3358032a12bd)

### After

![image](https://github.com/twentyhq/twenty/assets/29927851/77b88ea1-514a-4471-a28d-4c989cc5d9c4)
2024-05-22 09:55:29 +02:00
Thaïs
944b2b0254
fix: reset default value on field type switch in Settings/Data Model … (#5436)
…field form

Closes #5412
2024-05-22 09:53:15 +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
bosiraphael
beaaf33544
5498 create a feature flag is gmail sync v2 enabled (#5501)
Closes #5498
2024-05-22 09:25:06 +02:00
Ady Beraud
5ad59b5845
Create congratulations bot (#5404)
- Created congratulations bot :
<img width="939" alt="Screenshot 2024-05-14 at 12 47 13"
src="https://github.com/twentyhq/twenty/assets/102751374/5138515f-fe4d-4c6d-9c7a-0240accbfca9">

- Modified OG image

- Added png extension to OG image route

To be noted: The bot will not work until the new API route is not
deployed. Please check OG image with Cloudflare cache.

---------

Co-authored-by: Ady Beraud <a.beraud96@gmail.com>
2024-05-21 22:56:25 +02:00
Marie
3deda2f29a
Update foreign table to distant table schema (#5508)
Closes #5069 back-end part

And:
- do not display schemaPendingUpdates status on remote server lists as
this call will become too costly if there are dozens of servers
- (refacto) create foreignTableService

After this is merged we will be able to delete remoteTable's
availableTables column
2024-05-21 21:25:38 +02:00
Charles Bochet
29c27800fb Fix vite.config duplicate cache configuration 2024-05-21 20:36:25 +02:00
gitstart-twenty
36b467d301
Fix storybook tests (#5487)
Fixes #5486

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-05-21 20:24:08 +02:00
bosiraphael
e47101e08b
5483 modify messagechannel syncstatus (#5484)
- Closes #5483
- Fix seeds
- Add default value to syncSubStatus
2024-05-21 13:31:39 +02:00
Jérémy M
66a23a852f
fix: unwanted change moving back datetime to date (#5499)
Moving back datetime to date, due to an unwanted change.
2024-05-21 13:29:59 +02:00
martmull
ec248f8605
Remove dumb code placement (#5494)
Fix a bug introduced in [this
PR](https://github.com/twentyhq/twenty/pull/5254/files)

When a subscription is created, we need to create the subscription,
#5254 return if no subscription is created so the sub can never be
created at all

This PR fixes that
2024-05-21 12:08:51 +02:00
martmull
4fcdfbff7d
Fix unhandled exception (#5474)
Solves exception.getStatus is not a function error logs in twenty-server

Catch all errors in order to have no error log at all
2024-05-21 11:31:03 +02:00
Marie
0d16051ded
[fix] Re-introduce beforeUpdateOneObject hook (#5495)
... and disable name edition in object edition form. This feature will
be introduced by #5491
2024-05-21 10:46:49 +02:00
Aditya Pimpalkar
eb78be6c61
feat: replace iframe with chrome sidepanel (#5197)
fixes - #5201


https://github.com/twentyhq/twenty/assets/13139771/871019c6-6456-46b4-95dd-07ffb33eb4fd

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-05-21 10:39:43 +02:00
Félix Malfait
4907ae5a74
Improve docs (#5492)
Fix #4382 and remove useless pages to make docs more readable
2024-05-21 09:09:19 +02:00
rostaklein
a9813447f3
feat: fetch and parse full gmail message (#5160)
first part of https://github.com/twentyhq/twenty/issues/4108
related PR https://github.com/twentyhq/twenty/pull/5081

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-05-20 17:29:35 +02:00
bosiraphael
b5d3396ea9
5477 - Introduce syncsubstatus in db to refactor gmail sync behavior (#5479)
Closes #5477
2024-05-20 17:19:21 +02:00
Indrakant D
737fffefbd
Fix: danger font color values & acc. to design specs (#5344)
fixes: #5325

changes done (commits in order):

1. **Fixed fontLight & fontDark 'danger' color as per design spec**:
changed theme.font.color.danger to match the disabled color theme (for
light and dark) as followed by the BorderDark and BorderLight. Use the
updated colors for Buttons

2. **Replace theme.font.color.danger with theme.color.red (5 changed
files)**: Since `theme.font.color.danger` has now been updated to
contain the disabled button color values, we use the `theme.color.red`
color in all the places using `theme.font.color.danger` as it contains
same value that was used to be of `theme.font.color.danger` before.

3. **fixed hover color of StyledConfirmationButton in
ConfirmationModal**: issue can be seen when going to /settings/workspace
and trying to hover on delete the workspace button in dark mode. fixed
with this commit.

**Important Note**: The files
`/twenty-front/src/modules/ui/theme/constants/FontLight.ts` and
`/twenty-front/src/modules/ui/theme/constants/FontDark.ts` **are of no
use** as theme for the entire 'twenty-front' and
'twenty-chrome-extension' packages use the same files from '@/ui/theme'
(twenty-ui package)

dark mode :
<img width="987" alt="Screenshot 2024-05-09 at 9 14 35 PM"
src="https://github.com/twentyhq/twenty/assets/60315832/75fe3972-0e8a-41f6-90a1-09bfcd013e72">

when disabled:
<img width="1098" alt="Screenshot 2024-05-09 at 9 13 46 PM"
src="https://github.com/twentyhq/twenty/assets/60315832/5caab8b5-47ba-43e5-90cd-a41a1f690ca0">

on hover:
<img width="1052" alt="Screenshot 2024-05-09 at 9 14 05 PM"
src="https://github.com/twentyhq/twenty/assets/60315832/58de3df6-ed77-4aad-84fc-67b01154b493">

<br>

<br>

light mode (when disabled):
<img width="918" alt="Screenshot 2024-05-09 at 9 13 14 PM"
src="https://github.com/twentyhq/twenty/assets/60315832/18228783-d6c7-44a6-9fce-00053bb35ef2">

on hover:
<img width="983" alt="Screenshot 2024-05-09 at 9 14 18 PM"
src="https://github.com/twentyhq/twenty/assets/60315832/6df99f12-5767-4136-80c9-5d8883ac8e00">

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-05-20 16:59:01 +02:00
Thomas Trompette
4d479ee8ea
Remove relations for remotes (#5455)
For remotes, we will only create the foreign key, without the relation
metadata. Expected behavior will be:
- possible to create an activity. But the remote object will not be
displayed in the relations of the activity
- the remote objects should not be available in the search for relations

Also switched the number settings to an enum, since we now have to
handle `BigInt` case.

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-05-20 16:37:35 +02:00
Weiko
b098027174
Fix graphql prep query (#5478) 2024-05-20 15:53:13 +02:00
martmull
88f5eb669e
4689 multi workspace i should be able to accept an invite if im already logged in (#5454)
- split signInUp to separate Invitation from signInUp
- update redirection logic
- add a resolver for userWorkspace
- add a mutation to add a user to a workspace
- authorize /invite/hash while loggedIn
- add a button to join a workspace

### Base functionnality

https://github.com/twentyhq/twenty/assets/29927851/a1075a4e-a2af-4184-aa3e-e163711277a1

### Error handling

https://github.com/twentyhq/twenty/assets/29927851/1bdd78ce-933a-4860-a87a-3f1f7bda389e
2024-05-20 12:11:38 +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
Jérémy M
8b5f79ddbf
fix: multiple twenty orm issues & show an example of use (#5439)
This PR is fixing some issues and adding enhancement in TwentyORM:

- [x] Composite fields in nested relations are not formatted properly
- [x] Passing operators like `Any` in `where` condition is breaking the
query
- [x] Ability to auto load workspace-entities based on a regex path

I've also introduced an example of use for `CalendarEventService`:


https://github.com/twentyhq/twenty/pull/5439/files#diff-3a7dffc0dea57345d10e70c648e911f98fe237248bcea124dafa9c8deb1db748R15
2024-05-20 11:01:47 +02:00
H0onnn
81e8f49033
Feat : Change title color of release page in dark mode (#5467)
## Issue

- close #5459 

## Work Detail

Change title color of release page in dark mode.

I worked using the useColorScheme and useSystemColorSheme hooks, but if
there is a better way, please recommend it.

## Before
<img width="606" alt="image"
src="https://github.com/twentyhq/twenty/assets/116232939/f5c05360-f1d5-4701-b17d-e3e8a1db65fa">


## After
<img width="565" alt="image"
src="https://github.com/twentyhq/twenty/assets/116232939/5f9460d3-db62-461f-b7c2-659a4b687ba9">

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-05-19 17:26:29 +02:00
Weiko
66637a3770
Add more details to mutation limit exception message and fix update many query (#5460)
## Context
Since we rely on PgGraphql to query the DB, we have to map its errors to
more comprehensible errors before sending them back to the FE. This has
already been done for unicity constraint and mutation maximum records
but for the last one the message wasn't clear enough. This PR introduces
a new pgGraphqlConfig param to the util to pass down the 'atMost' config
that we are actually overwriting with an
'MUTATION_MAXIMUM_RECORD_AFFECTED' env variable. See how atMost works in
this doc (https://supabase.github.io/pg_graphql/api/#delete)

Also adding the same message for the update since this mutation is also
affected. Create is not though.

Lastly, this PR introduces a fix on the updateMany. Since the current FE
is not using updateMany, this was missed for a few weeks but a
regression has been introduced when we started checking if the id is a
valid UUID however for updateMany this was checking the data object
instead of the filter object. Actually, the data object should never
contain id because it wouldn't make sense to allow the update of the id
and even more for multiple records since the id should be unique.

## Test
locally with MUTATION_MAXIMUM_RECORD_AFFECTED=5

<img width="1408" alt="Screenshot 2024-05-18 at 02 11 59"
src="https://github.com/twentyhq/twenty/assets/1834158/06bf25ce-4a44-4851-8456-aed7689bb33e">
<img width="1250" alt="Screenshot 2024-05-18 at 02 12 10"
src="https://github.com/twentyhq/twenty/assets/1834158/06fc4329-147b-4bb4-9223-c3bce340a8d2">
<img width="1222" alt="Screenshot 2024-05-18 at 02 12 36"
src="https://github.com/twentyhq/twenty/assets/1834158/0674546e-73e2-4e5c-918f-9825f2ee5967">
<img width="1228" alt="Screenshot 2024-05-18 at 02 13 01"
src="https://github.com/twentyhq/twenty/assets/1834158/f50df435-1fd4-45df-a953-8fefa8f36e75">
<img width="1174" alt="Screenshot 2024-05-18 at 02 13 09"
src="https://github.com/twentyhq/twenty/assets/1834158/707b9300-2779-43df-8177-9658b8965b49">


<img width="1393" alt="Screenshot 2024-05-18 at 02 19 11"
src="https://github.com/twentyhq/twenty/assets/1834158/2cd167b6-1261-4914-a4db-36f792d810c0">
2024-05-18 08:00:00 +02:00
gitstart-app[bot]
0e525caf01
Implement <ScrollRestoration /> (#5086)
### Description

Implement &lt;ScrollRestoration /&gt;

### Refs


[https://github.com/twentyhq/twenty/issues/4357](https://github.com/twentyhq/twenty/issues/4183)

### Demo


https://github.com/twentyhq/twenty/assets/140154534/321242e1-4751-4204-8c86-e9b921c1733e

Fixes #4357

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>
2024-05-17 16:36:28 +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
Thomas Trompette
36e54119a3
Enable remotes with existing name (#5433)
- Check if a table with the same name already exists
- If yes, add a number suffix, and check again

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-05-17 10:38:17 +02:00
Félix Malfait
58f8c31669
Fixes typo in docs #5076 (#5450)
Micro fix

Fixes #5076
2024-05-17 09:10:59 +02:00
Marie
1694e0cccd
Fix missing name validation on object names at update (#5434)
## Context
as per title

## How was it tested? 
local (/metadata + in product)
2024-05-16 18:15:56 +02:00
Marie
d741f4a5bd
Minor refacto and fixes on Remotes updates (#5438)
In this PR

- Code refactoring
- v0 of adding "updates available" info in Connection sync status
<img width="835" alt="Capture d’écran 2024-05-16 à 17 02 07"
src="https://github.com/twentyhq/twenty/assets/51697796/9674d3ca-bed2-4520-a5a6-ba37bc242d06">

- fix distant table columns with not-camel case names are always
considered as new
2024-05-16 17:31:34 +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
Fabio Nettis
a75eb0a569
feat: add creation date to notes panel (#5432)
## Description

Adds a view for creation date and author to notes and tasks panel. Here
is a preview of the new `ActivityCreationDate` component:


![image](https://github.com/twentyhq/twenty/assets/36916632/8adfa584-5f0c-464a-9d69-753f89c19c28)

Closes #5424

### Type of change

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

- [x] New feature (non-breaking change which adds functionality)

## Checklist

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream
modules

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-05-16 17:09:46 +02:00
Charles Bochet
f31b2c2963
Fix turnstile captcha invalid (#5442)
Signing in is a two steps process:
- Checking if the user email is already used
- Checking if the email + password is correct

Those two steps need a captchaToken to be valid. Unfortunately, from
Cloudflare Turnstile doc:
`A token can only be validated once and cannot be consumed twice. Once a
token has been issued, it can be validated within the next 300 seconds.
After 300 seconds, the token is no longer valid and another challenge
needs to be solved`

So we need to generate a new token at each step instead of re-using the
same
2024-05-16 16:30:10 +02:00
Ady Beraud
9125e958dc
Modified HTML for Algolia Crawler (#5441)
* Modified HTML for Algolia Crawler
* Added anchor tags within user-guide headers

To implement Algolia correctly, my changes would need to be deployed
first, as it cannot run on localhost. In the meantime, I simulated
Algolia crawling locally using Cheerio, and it worked successfully on my
end.
2024-05-16 16:24:48 +02:00
martmull
afad993bb3
Fix main (#5435)
- fix lint issue
- fix Apply Cors exception handler (do not work when logged out)
2024-05-16 15:29:27 +02:00
martmull
fdf10f17e2
4655 batch endpoints on the rest api (#5411)
- add POST rest/batch/<OBJECT> endpoint
- rearrange rest api code with Twenty quality standard
- unify REST API error format
- Added PATCH verb to update objects
- In openapi schema, we replaced PUT with PATCH verb to comply with REST
standard
- fix openApi schema to match the REST api

### Batch Create

![image](https://github.com/twentyhq/twenty/assets/29927851/fe8cd91d-7b35-477f-9077-3477b57b054c)

### Replace PUT by PATCH in open Api

![image](https://github.com/twentyhq/twenty/assets/29927851/9a95060d-0b21-4a04-a3fa-c53390897b5b)

### Error format unification

![image](https://github.com/twentyhq/twenty/assets/29927851/f47dfcef-a4f8-4f93-8504-22f82a8d8057)

![image](https://github.com/twentyhq/twenty/assets/29927851/d76a87e2-2bf6-4ed9-a142-71ad7c123beb)

![image](https://github.com/twentyhq/twenty/assets/29927851/6db59ad3-0ba7-4390-a02d-be15884e2516)
2024-05-16 14:15:49 +02:00
Aditya Pimpalkar
ea5a7ba70e
feat: add renew token query for apollo client (chrome-extension) (#5200)
fixes - #5203
2024-05-16 10:21:16 +02:00
Charles Bochet
6bde0ae258 Disable chromatic for performance stories 2024-05-15 23:09:17 +02:00
Charles Bochet
040ec9165d
Try fix tests (#5431)
As per title!
2024-05-15 22:54:51 +02:00
Marie
63387424c3
Fix transliteration for metadata + transliterate select options (#5430)
## Context 
Fixes #5403

Transliteration is now integrated to form validation through the schema.
While it does not impede inputting an invalid value, it impedes
submitting a form that will fail as the transliteration is not possible.
Until then we were only performing the transliteration at save time in
the front-end, but it's best to provide the information as soon as
possible. Later we will add helpers to guide the user (eg "This name is
not valid": https://github.com/twentyhq/twenty/issues/5428).

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-05-15 21:43:58 +02:00
mritosa
e9a7a8a4a3
Fix missing team member images in calendar event (#5414)
### Work
Fixed issue: #5308 
### Before
Team member images are absent from Calendar events participant chips.

![Before](https://github.com/twentyhq/twenty/assets/100703401/bd3408ad-4a07-430e-ba23-83cd0775492a)
### After
<img width="383" alt="Screenshot 2024-05-14 at 10 53 24"
src="https://github.com/twentyhq/twenty/assets/100703401/b65efe8a-64de-4214-a60a-ee87d235953a">

### Fix explained
Redefined recordGqlField to fech Person and WorkspaceMember

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-05-15 19:14:57 +02:00
gitstart-twenty
de228be5ca
AAU I want to re-order my views with drag & drop (#5002)
### Description
I want to re-order my views with drag & drop

### Refs
#4782 

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

Fixes #4782

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Matheus <matheus_benini@hotmail.com>
Co-authored-by: FellipeMTX <fellipefacdir@gmail.com>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-05-15 17:57:17 +02:00
Thomas Trompette
e1eead56c6
Alter comment on foreign key deletion (#5406)
We do not update the comment on the local table when a foreign table key
is deleted.
This was not breaking, which is why we did not see it. But comments
should be kept up to date.

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-05-15 17:05:30 +02:00
Jérémy M
f0383e3147
feat: twenty orm sync (#5266)
This PR is updating all object metadata entities with the new
decorators, and deleting the old ones.
This way we can use the new TwentyORM with all the standard objects.

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-05-15 16:58:47 +02:00
Fabio Nettis
6898c1e4d8
fix: resolve issues with edit input offset (#5426)
## Description

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


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

Fixes #5416

### Type of change

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

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

## Checklist

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

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

## How it works 

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

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

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

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

On the UI side it gives a table of results : 

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

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

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

    const profilingReport = getProfilingReportFromDocument(canvasElement);

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

    const p95result = profilingReport?.total.p95;

    expect(
      p95result,
      `Component render time is more than p95 threshold (${p95ThresholdInMs}ms)`,
    ).toBeLessThan(p95ThresholdInMs);
  },
```
2024-05-15 13:50:02 +02:00
Ady Beraud
dc32f65906
Fixed user guide layout (#5422)
- Added border-radius to image cards in User Guide:
Before: 
<img width="376" alt="Screenshot 2024-05-15 at 11 05 35"
src="https://github.com/twentyhq/twenty/assets/102751374/88e63152-2a50-49d5-89cb-522d94c26d3f">

After: 
<img width="366" alt="Screenshot 2024-05-15 at 11 08 20"
src="https://github.com/twentyhq/twenty/assets/102751374/f21b39d8-74eb-4520-8357-78409d7c8598">

- Centered and aligned index and article pages
2024-05-15 10:24:24 +02:00
Rob Luke
0af86eafff
docs: fix calendar enable environmental variable (#5417)
Hi twenty team,
Thanks for making such a great product, it's a pleasure to use and see
the rapid development.
@charlesBochet helped me find this error in my setup
2024-05-15 02:52:33 +02:00
Vinod Rathod
8842292196
Fixed left padding for switcher icon on the table checkboxes #4351 (#4963)
Closes #4351  - Fixed spacing issue in TopBar file.

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-05-14 18:28:13 +02:00
Ady Beraud
0b1f646b72
Added loader to Download Image + modified GitHub stars (#5407)
- Added loader to download image in contributor page:


https://github.com/twentyhq/twenty/assets/102751374/a6db1d80-01ed-4b07-9a57-e533012f5aa9

- Modified GitHub stars - rounded to the nearest integer
2024-05-14 17:59:48 +02:00
Thomas des Francs
1a61405491
User guide images (#5410)
Updated 2 illustrations & added colors on filter illustration

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-05-14 17:36:00 +02:00
Thomas des Francs
53b9505792
Added the illustrations for the user guide (#5409)
Added illustrations for all user-guide articles
2024-05-14 17:23:54 +02:00
Anchit Sinha
ce195826f5
4599-feat(front): Add Copy Button to Floating Inputs (#4789)
Closes #4599 

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

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
Co-authored-by: Weiko <corentin@twenty.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-05-14 17:02:53 +02:00
Félix Malfait
a53ce1c488
Track backend events (#5405)
Add tracking to backend events, we might disable frontend tracking which
doesn't bring much value to improve the product
2024-05-14 16:42:28 +02:00
martmull
ffdd3a7d4e
Return graphql errors when exists (#5389)
- throw badRequest with graphql error messages when graphql request
fails
- clean some code

Before
<img width="1470" alt="image"
src="https://github.com/twentyhq/twenty/assets/29927851/0b700d9a-2bbe-41f7-84a9-981dc7dd5344">

After

![image](https://github.com/twentyhq/twenty/assets/29927851/6bbaaf7c-1244-473d-9ae5-4fefc6a1b994)
2024-05-14 13:21:55 +02:00
gitstart-twenty
1bc9b780e5
Show Data Skeleton Loading (#5328)
### Description

Show Data Skeleton loading

### Refs

#4460

### Demo

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

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

Fixes #4460

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Matheus <matheus_benini@hotmail.com>
2024-05-14 11:58:30 +02:00
Thomas Trompette
de438b0171
Add stripe connection option (#5372)
- Refactor creation and edition form so it handles stripe integration
and not only postgres
- Add a hook `useIsSettingsIntegrationEnabled` to avoid checking feature
flags everywhere
- Add zod schema for stripe

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

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-05-13 18:00:13 +02:00
Marie
b9154f315e
Enable deletion of relation fields (#5338)
In this PR
1. Enable deletion of relation fields in the product and via the api
(migration part was missing in the api)
3. Change wording, only use "deactivate" and "delete" everywhere (and
not a mix of the two + "disable", "erase")
2024-05-13 17:43:51 +02:00
martmull
0018ec78b0
4840 multi workspace update user userworkspace inconsistent on delete set null constraint (#5373) 2024-05-13 14:50:27 +02:00
martmull
8576127b47
Add migration to restrict users without workspaces (#5369)
- update set null ON DELETE constraint to RESTRICT
- update missing updates
2024-05-13 14:18:45 +02:00
martmull
1ac8abb118
5188 bug some canceled subscriptions are billed (#5254)
When user is deleting its account on a specific workspace, we remove it
as if it was a workspaceMember, and if no workspaceMember remains, we
delete the workspace and the associated stripe subscription
2024-05-13 10:23:32 +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
Ady Beraud
4a7aabd060
Added GitHub init (#5317)
- Added github:init to allow full import, as opposed to gitHub:sync
which allows partial sync and therefore respecting Github API Limit
quota.

---------

Co-authored-by: Ady Beraud <a.beraud96@gmail.com>
2024-05-13 09:55:30 +02:00
Mohamed Muhsin
321ce72ec7
Add new Currencies with Corresponding Icons (#5353)
### **Description**
Add 3 new currencies

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

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

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


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

---------

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

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

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

light mode:

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

<br>
<br>

dark mode

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

Note: for the sake of an easier code review, I did not rename/move some
files and added "todo" comments instead so Github is able to match those
files with their previous version.
2024-05-07 21:07:56 +02:00
Thaïs
b7a2e72c32
fix: fix storybook pages tests coverage (#5319) 2024-05-07 21:05:45 +02:00
Charles Bochet
ce4e78aa85
Fix Rest API id UUID error (#5321)
A user has reported an issue with REST API.
We have recently migrated the graphql IDs from UUID to ID type. As Rest
API is leveraging the graphql API under the hood, the Rest API query
builder should be updated accordingly
2024-05-07 21:04:45 +02:00
Weiko
b691894254
Fix query runner throwing 500 when pg_graphql detects unique constraint (#5323)
## Context
Since pg_graphql does not return specific error/exception, we have to
map the error message and throw validation errors when needed
This PR adds a check on unicity constraint error returned by pg_graphql
when we are trying to insert duplicate records and returns a 400 instead
of being handled by the exceptionHandler as a 500.
2024-05-07 21:03:15 +02:00
Weiko
e802cef8f1
Fix 400 yoga errors being sent to exception handlers (#5322)
## Context
Yoga can catch its own errors and we don't want to convert them again.
Moreover those errors don't have an "originalError" property and should
be schema related only (400 validation) so we only want to send them
back to the API caller without going through the exception handler.

Also fixed an issue in the createMany which was throwing a 500 when id
was missing from the creation payload. It seems the FE is always sending
an ID but it should actually be optional since the DB can generate one.
This is a regression from the new UUID validation introduced a few weeks
ago.
2024-05-07 20:54:10 +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
Marie
7c3e82870c
[fix] Increment cache version after object/field/relation update (#5316)
Fixes #5276.

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

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

---------

Co-authored-by: Jérémy Magrin <jeremy.magrin@gmail.com>
2024-05-07 15:05:18 +02:00
Weiko
8074aae449
Split job modules (#5318)
## Context
JobsModule is hard to maintain because we provide all the jobs there,
including their dependencies. This PR aims to split jobs in dedicated
modules.
2024-05-07 14:08:20 +02:00
gitstart-twenty
d10efb15d5
Add unit tests on object record mutation and query hooks (#5014)
### Description
Add unit tests on object record mutation and query hooks

### Refs
#4884

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

Fixes #4884

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Toledodev <rafael.toledo@engenharia.ufjf.br>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-05-07 14:04:55 +02:00
Thaïs
d0759ad7cc
refactor: use react-hook-form to validate Settings/DataModel/Field (#4916)
Closes #4295
2024-05-07 11:44:46 +02:00
Thomas des Francs
9c25c1beae
Added the 0.11 release changelog (#5300)
Added illustrations & descriptions
2024-05-07 11:08:25 +02:00
Weiko
ffd804d04b
Fix convertRecordPositionsToIntegers command for camelCase tables (#5315)
## Context
Per title, postgresql will use lowercase if not surrounded by quotes
2024-05-07 11:07:20 +02:00
Ady Beraud
3052b49031
Fixed incomplete GitHub sync (#5310)
- Added await when fetching Github data to prevent the process from
exiting before saving to database

Co-authored-by: Ady Beraud <a.beraud96@gmail.com>
2024-05-07 08:59:56 +02:00
Ady Beraud
43cd8cc451
Modified URLs and added button to share on LinkedIn (#5306)
- Removed the env variable and added the current URL in contributor's
page
- Added button to share on LinkedIn on contributor's profile
- Fixed absolute image URL for release API

---------

Co-authored-by: Ady Beraud <a.beraud96@gmail.com>
2024-05-07 08:59:03 +02:00
Ady Beraud
b438fc2754
Fix github stars endpoint (#5301)
- Encapsulated GitHub star response in an object
- Fixed rounding of Github stars to align with Github convention
- Fixed CORS issue so that endpoint can be called from twenty.com and
app.twenty.com

Co-authored-by: Ady Beraud <a.beraud96@gmail.com>
2024-05-07 08:35:54 +02:00
Charles Bochet
a2017eaeb7
Improve messaging/calendar create contact performance (#5314)
In this PR, I'm refactoring the way we associate messageParticipant post
person/company creation. Instead of looking a all person without
participant, we are passing the one that were just created.

Also, I'm making sure the message and messageParticipant creation
transaction is commited before creating person/company creation (and
then messageParticipant association)
2024-05-06 23:43:18 +02:00
Sean Hellwig
5f467ab5ca
Removes erroneous debugger call in twenty-front (#5311)
Erroneous debugger call throws an error in twenty-front app console

---------

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

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

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

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

Looking forward to hearing feedback from you

cc: @charlesBochet

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-05-06 15:30:03 +02:00