Commit Graph

3213 Commits

Author SHA1 Message Date
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