Commit Graph

3661 Commits

Author SHA1 Message Date
Raunak Singh Jolly
ecdbe26b09
Fixed: Drag and Drop Causes Flashing and Disappearing Cards (#6065)
Issue was "inView" was setting false due to root being scrollWrapper,
instead changed it to viewport.
Fixes: #6001 
[Screencast from 2024-06-27
22-50-59.webm](https://github.com/twentyhq/twenty/assets/59247136/408d5fb5-91ab-4d3a-881d-bbcaf4817a79)

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-08-12 19:17:32 +02:00
Hansol Yang
b6202fe98c
Issue6335: RecordInlineCell tree refactor with RecordInlineCellContext (#6537)
Fixes [#6335](https://github.com/twentyhq/twenty/issues/6335)

This pull request is for issue
[#6335](https://github.com/twentyhq/twenty/issues/6335): Refactor
RecordInlineCell tree with a Context to avoid props drilling. For the
refactoring, this PR made changes as below:

- Created new script RecordInlineCellContext.tsx: Defining a context to
pass in useContext()
- Updated RecordInlineCell.tsx: Passing the necessary props as context
values, wrapping with RecordInlineCellContext.Provider
- Updated RecordInlineCellContainer.tsx: Passing the props to
RecordInlineContainer as RecordInlineCellContext
- Updated RecordInlineCellDisplayMode.tsx: retrieves values from
useRecordInlineCellContext instead of directly assigning them
- RecordInlineCellValue.tsx: Removed values passed through
<RecordInlineCellDisplayMode> as they are now retrieved through
useRecordInlineCellContext + Removed the null check for
RecordInlineCellContextProps.

Using RecordInlineCellContext, I believe the context goes to the top of
the hierarchy and passed to the required layers without going through
several layers. However, please let me know if I understood the issue
incorrectly or it is not solved properly.

Thank you in advance for your review!

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-08-12 12:18:05 +02:00
Nabhag Motivaras
b16437e6c8
fix: column overlay issue in record table header cells (#6609)
### Issue (BUG)

- Fixes #6604 

### Description

- Now Columns doesn't overlay on header cells, issue was independant of
field type.

#### Before 


https://github.com/user-attachments/assets/0872f07a-83b2-44d8-8f8e-c61c5fac5278

#### After



https://github.com/user-attachments/assets/e2e623f6-6635-4ab6-8ca2-cbd3a296c27d
2024-08-11 20:48:31 +02:00
Félix Malfait
d5350e11a3
Remove some dead code (#6611)
We could remove a lot more than this, this is just a start.

There are various tools to help with this, knip is a good one
2024-08-11 20:43:18 +02:00
Thomas Trompette
39512a779e
Fix storybook tests (#6594)
As title
2024-08-09 19:39:16 +02:00
Anantesh G
13d05d8c74
Fixed restrictive URL sanity check #6570 (#6575)
Fixes #6570 

## Changes
- Replaced the old regex with a new, more inclusive regex pattern.
- Updated the isURL function to use the new pattern.

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-08-09 16:40:43 +02:00
Weiko
bdac4c81f7
Improve QueryFailedError message in sync-metadata (#6591)
Adding more logs with Typeorm QueryFailedError in sync-metadata command

Example with a unicity constraint violation, to identify which column is
affected
<img width="841" alt="Screenshot 2024-08-09 at 14 56 05"
src="https://github.com/user-attachments/assets/c47fbb1d-77ee-4d7a-87e7-dbe54a6aa941">

In this case, this should help self-hosting users to know which key is a
duplicate during syncs after a version upgrade for example
2024-08-09 16:23:14 +02:00
Weiko
6792056b73
Fix query runner exceptions not being handled properly (#6593)
## Context

We recently introduced a try catch in the different resolvers of the
query runner to handle exceptions via
workspaceQueryRunnerGraphqlApiExceptionHandler and convert them to
proper errors. However this was never called as expected because query
runner methods were async.
This is a regression from https://github.com/twentyhq/twenty/pull/6324

## Before

<img width="938" alt="Screenshot 2024-08-09 at 15 34 02"
src="https://github.com/user-attachments/assets/3607c7ed-ea91-4729-a4e4-ede7761347e2">


## After

<img width="905" alt="Screenshot 2024-08-09 at 15 33 46"
src="https://github.com/user-attachments/assets/51bcbfa1-9b0b-4c7c-84a2-7c8effeadddd">
2024-08-09 16:07:58 +02:00
Weiko
b1aa115d28
Fix auth exceptions (#6590)
A regression has been introduced in
https://github.com/twentyhq/twenty/pull/6459/files#diff-0a06bf2b624f77f1b7ded0fcc4ce266d1a56f4329222b46d1cf4d76a18000c97L505
where 401 have been changed to 403. However the renew token logic on the
FE expects a 401, see here
https://github.com/twentyhq/twenty/blob/main/packages/twenty-front/src/modules/apollo/services/apollo.factory.ts#L100

I've also introduced a fix with a proxy class in
GraphQLHydrateRequestFromTokenMiddleware since this middleware calls
validateToken from tokenService which are never converted back to
graphqlErrors so handleExceptionAndConvertToGraphQLError below will
receive an AuthException and will send capture it and return it as a 500

both issues have been fixed and should resolve the renewToken logic 

## Test
tested locally by playing with token expiration dates in the env

<img width="635" alt="Screenshot 2024-08-09 at 12 47 05"
src="https://github.com/user-attachments/assets/e93d5741-29b7-4699-b882-ee8f4fee6e6e">
2024-08-09 14:09:26 +02:00
Félix Malfait
7e01843aaf
Remove dead code linked to quick actions (#6587)
Removing dead code, we'll take another approach to build this
2024-08-09 11:09:26 +02:00
gitstart-app[bot]
a2a5ab488c
When exporting a kanban we should export the kanban's main field (#6444)
This PR was created by [GitStart](https://gitstart.com/) to address the
requirements from this ticket:
[TWNTY-6046](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-6046).
This ticket was imported from:
[TWNTY-6046](https://github.com/twentyhq/twenty/issues/6046)

 --- 

### Description

- We are getting the `kanbanFieldMetadataNameState` , get the column
data, and if there is data and the use is on the Kanban view we add the
data to the result

### Refs

#6046

### Demo

<https://jam.dev/c/96f16211-40e4-4b49-a6f5-88f0692fb47a>

Fixes #6046

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: gitstart-twenty <140154534+gitstart-twenty@users.noreply.github.com>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-09 10:23:06 +02:00
Félix Malfait
f2cc385710
Fix frontend tests (#6585)
Fix a few broken tests
2024-08-09 08:38:01 +02:00
Thomas Trompette
ab12d9e8da
Fix perf tests storybook (#6584)
As title
2024-08-08 21:43:02 +02:00
Faisal-imtiyaz123
b4e2ada3b0
Fixes Empty Label Identifer Preview in Settings/DataModel/Object/Edit (#6370)
fixes #6143

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-08 18:30:02 +02:00
Nabhag Motivaras
320742cdea
[Fix] URL inputs to not submit numeric hostnames and url without domain (#6482)
## ISSUE (BUG)

- Fixes #5396

## Description 

- When given a string like **https://300**, it interprets 300 as the
hostname, which it then converts to an IP address, what i did was to
check if the entire string (ignoring the protocol ) is number then don't
submit it all within zod and it makes sense to do that cause.

- The range for valid 32-bit unsigned integers is 0 to 4294967295 (which
corresponds to 0.0.0.0 to 255.255.255.255) so other than this numbers by
default URL objects throws invalid.




https://github.com/user-attachments/assets/1da92aeb-d50c-43a3-87ea-78a059d3fa84
2024-08-08 17:42:36 +02:00
Weiko
02a1da1330
Fix prettier (#6583)
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-08 17:40:35 +02:00
Thomas Trompette
a0e5ca44ba
Fix last batch of jest tests (#6582)
As title
2024-08-08 15:53:17 +02:00
nitin
774cb554f4
removed @blocknote/core from dependencies (#6580)
Fixes #6564  & #6561 

@FelixMalfait 

Removed @blocknote/core from dependencies



https://github.com/user-attachments/assets/ef6acfff-2945-4062-a35c-21dd108a4345

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-08 15:44:09 +02:00
Ciara Hatcher
c3bf94e4cc
Lumosviridi v20 kubernetes updates (#6356)
Updates for v20+ and misc terraform bug fixes. Also refactored to use
terraform variables instead of locals which helps with readability and
ease of use for new users.

Terraform validation is currently passing:
![Screenshot 2024-07-21 at 13 18
37](https://github.com/user-attachments/assets/02aadc2d-d3f6-4e8b-9315-64e25191d9e6)

Additionally added [terraform-docs](https://terraform-docs.io/) to
generate a more helpful README for terraform specific configuration.

Raw K8s manifests were updated with changes for v20+ as well.

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-08 13:55:45 +02:00
Thomas Trompette
74229a80c8
Fix broken tests batch 2 (#6573)
As title
2024-08-08 11:16:59 +02:00
Weiko
1b9f63b3ad
fix attachment upload (#6574)
## Context
UploadFile now returns the file token which we don't want when we save
the attachment in the DB due to its non-persistence so now the FE
removes the token query param before saving the attachment. This is most
likely not the right way to do it, we will need to refactor this part
before.

Also made sure we don't save the token in the DB for rich_text as well
and remove it before saving.
2024-08-07 19:34:57 +02:00
Nabhag Motivaras
e265efcf90
fix(wip): tasks navigate to /objects/tasks with viewId (#6528)
ISSUE (BUG)

Fixes: #6523 

Description:
- [ ] Should work on Command Menu
- [ ] Should also work on Global Goto Hotkeys
- [ ] Should navigate with viewId, as when we click on Navigationbar it
is navigating with viewId.
2024-08-07 18:00:41 +02:00
Thomas Trompette
12e55fd5b7
Bump version to 0.23.1 (#6567)
As title

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-08-07 17:09:30 +02:00
martmull
10817c5388
Fix onboarding status refacto (#6533)
see comments in
https://github.com/twentyhq/twenty/pull/6531#pullrequestreview-2217807413
- rename method
- add check before setting create profile pending user var
2024-08-07 17:09:11 +02:00
nitin
8408cf6d19
Added Side Panel compact header (#6560)
Fixes issue #6487 
Added a new prop, `isInRightDrawer` to both the `ShowPageSummaryCard`
and `ShowPageRightContainer` components. This prop allows for different
styles to be applied based on the specific needs of the drawer..

Rather than creating a new component, I opted to add this prop to avoid
code duplication. However, if you would prefer a separate component for
this functionality, I'm happy to make that adjustment—please just let me
know!

Also added `box-sizing: border-box` to `ShowPageSummaryCard` to make
sure it aligns with figma designs.



https://github.com/user-attachments/assets/38e8d85e-55d5-471e-884a-11c67467f56f
2024-08-07 16:56:55 +02:00
Us3r-gitHub
f2aa67b7e5
feat: Set preselect field type on new field of object page (#6314)
#5661

---------

Co-authored-by: Achsan <achsanh@gmail.com>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-07 16:32:37 +02:00
Thomas Trompette
9a0c9672a0
Fix createdBy and activity tests (#6569)
As title
2024-08-07 16:21:06 +02:00
nitin
c836bbbfc2
Fixed SignInUp Modal misalignment for devices smaller than 400px width (#6386)
Hi @Bonapara,
Issue #6385 

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

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

Thank you!




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

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-07 15:37:32 +02:00
Weiko
5b7933a6ab
bump lock file (#6568)
ran `yarn` to bump lock file
2024-08-07 15:06:34 +02:00
Jérémy M
11a41b3d97
feat: created by email calendar (#6536)
This PR is a followup of #6324 to add support of EMAIL and CALENDAR
source for the created by composite field.
2024-08-07 15:03:06 +02:00
Weiko
dce5a64ec5
Fix images in note rich text (#6550)
## Before
<img width="439" alt="Screenshot 2024-08-06 at 11 20 06"
src="https://github.com/user-attachments/assets/d2aa9411-cdf4-4457-8997-7cbecb8fe7e3">

## After
<img width="501" alt="Screenshot 2024-08-06 at 11 20 09"
src="https://github.com/user-attachments/assets/a5a68fff-1542-4b62-939c-50070f15b692">
2024-08-07 11:45:17 +02:00
bosiraphael
5a72b949d7
6382 create a command to add a uservar in the key value pair table for every account which needs to reconnect (#6553)
Closes #6382

Create SetUserVarsAccountsToReconnectCommand.
This command loops on all workspaces and:
- deletes all user vars with deprecated key `ACCOUNTS_TO_RECONNECT`
- creates a key value pair of type `USER_VAR` with a key of
`ACCOUNTS_TO_RECONNECT_INSUFFICIENT_PERMISSIONS` for all connect
accounts with a message channel or calendar channel with status
`FAILED_INSUFFICIENT_PERMISSIONS`
2024-08-07 11:43:18 +02:00
Thomas Trompette
2abb6adb61
Build exceptions and handler (#6459)
Adding exceptions and handler for auth services.

Tested with:
- Workspace creation
- Workspace signup
- Workspace invitation
- Reset password
- Adding email account
- Impersonation

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-08-07 11:42:49 +02:00
Nabhag Motivaras
f09e61bb9f
fix: vite to allow serve fonts from blocknote and any files from root of workspace (#6552)
## ISSUE

- Fixes #6546 

## Description

- Now we don't get error logs and we are allowing vite to serve from
blocknote and root workspace.
2024-08-07 11:12:33 +02:00
nitin
43700ad186
some ts-error-fixes (#6563)
@FelixMalfait 

Let me know what do you think.

Thanks
2024-08-07 10:12:27 +02:00
nitin
a7941315e7
Replace entityId by recordId in the front end. (#6355)
Hey @lucasbordeau, I replaced every `entityId` with `recordId` in the
frontend.

### Some clarifications:

1. At [this
line](0b207d26b6 (diff-b4f415dd1f060307ad61f64394ee96b2912f6015e26c7fd2eab4b8c6a84d2d07L14)),
I changed `recordId` to `selectedRecordId` because that component has
`entityId` defined in code at [this
line](0b207d26b6 (diff-b4f415dd1f060307ad61f64394ee96b2912f6015e26c7fd2eab4b8c6a84d2d07L55))
which was to be changed to `recordId`. To avoid repeated constants, I
changed the arguments to `selectedRecordIds`.

2. At the following links:
- [File
1](0b207d26b6 (diff-52b780bdd4cfc582ca7e1b457dbbd63733bfbb7790fc421054bbd2dbf0389e16))
- [File
2](0b207d26b6 (diff-6d47cb9a59dfcf6b1495937084ae799a61da6afccb21208f04ce8e1f5afca0e4))
- [File
3](0b207d26b6 (diff-821815783f9968f1da3cd437fc9d1d1666d12dc331d279cc5fbd9817bc2df2bf))

It seems to be the tests. As I can see, it is checking for both
`objectFilterDropdownSelectedEntityIdState` and
`objectFilterDropdownSelectedRecordIdsState`. Since `entityIds` are
supposed to be removed and `recordedId` state is already being checked,
I commented out all the `entityidState` code. If they are to be removed
or uncommented, please let me know, and I will do as expected.

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-07 08:52:57 +02:00
nitin
0c99bfbc31
New sidemenu for notes editor (#6527)
@Bonapara @lucasbordeau

This PR addresses issue #6489:

- Created an entire sidemenu for the block editor.

## Review Request

Please review the implementation of the custom sidemenu. 

## Outstanding Issues

1. Sidemenu Positioning:
   - The current placement is determined by the BlockNote package.
   - I need assistance in positioning it according to the Figma designs.
- Attempted adding margin to the sidemenu, but this solution doesn't
scale well across different screen sizes.

2. Props Spreading in `CustomSidemenu.tsx`:
- Unable to avoid props spreading due to the third-party BlockNote
components.
   - Added eslint-disable comments as a temporary solution.

Your insights on these challenges would be greatly appreciated,
especially regarding the sidemenu positioning and any potential
alternatives to props spreading.




https://github.com/user-attachments/assets/4914a037-a115-4189-88bc-a41d121d309d

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-07 08:23:05 +02:00
Thomas Trompette
1ed31d9d68
Force order in navigation panel for notes and tasks (#6557)
As title. Tasks and Notes order sometimes change
2024-08-06 18:24:33 +02:00
bosiraphael
018b8220dc
Remove message thread id from mcma and update scripts (#6500)
- Remove `messageThreadId` from `messageChannelMessageAssociation`
- Update thread merging
- Update all queries which were dependent on this field
- Update some raw queries by using `twentyORM` instead

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-08-06 18:19:59 +02:00
Weiko
48d0a3649d
Remove fileService getFileStream fallback after completed migration (#6558)
To merge once the command has been executed.
2024-08-06 18:19:50 +02:00
Félix Malfait
4157a67bf8
Fix permissions for serverless functions (#6555)
Fixes #6525

(@martmull fyi it was not related to AWS but linked to the fact that we
recently enforced passing a token to access files)
2024-08-06 15:31:22 +02:00
Thomas Trompette
67c41251fb
Make bool fields editable again (#6551)
As title
2024-08-06 13:50:55 +02:00
Ali Elamir
cd33471159
Animate the Sidebar Objects Tree view opening (#6521)
@Bonapara 

Issue https://github.com/twentyhq/twenty/issues/6485

Introduced the animation when opening the menu.

Please let me know if this is fine or I need to make further changes.
Thank you.

---------

Co-authored-by: bosiraphael <raphael.bosi@gmail.com>
2024-08-06 11:28:06 +02:00
Félix Malfait
23a2821a28
Update upgrade-guide.mdx (#6549)
Fix command
2024-08-06 09:44:05 +02:00
Charles Bochet
1b9d2c8151
Release 0.23 (#6547)
Here we go!
https://twenty.com/releases
2024-08-05 23:18:44 +02:00
Charles Bochet
8373dfdc26
Webhook wip (#6371)
This PR introduces the following changes:
- Add the ability to filter webhooks by objectSingularName and Actions
- Refactor SettingsWebhookDetails edition to not use react-hook-form
(which will be deprecated on the whole project)
- Updating the tests with a complex set of mock (we just need to fix ~30
of them now :D)

<img width="1053" alt="image"
src="https://github.com/user-attachments/assets/4e56d972-f129-4789-8d1c-4b5797a8ffd7">
2024-08-05 23:14:29 +02:00
Prateek Jain
48f4e41148
Add custom field types on seed (#6505)
Fixes #6364

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-08-05 18:19:19 +02:00
nitin
ed0102ec58
Allow renaming names from uploaded files (#6358)
Hello @Bonapara,

Done with issue #6317. I had to create a new component, EditableField
([Component](56bf16b82b (diff-3a2362dbe6e21e46c55a673c80460bc201c62b36790b5df28b4c1f9f27377f59))),
because the existing InputText component has a fixed height
([link](https://github.com/twentyhq/twenty/blob/main/packages/twenty-front/src/modules/ui/input/components/TextInputV2.tsx#L55)),
which causes the attachment row to increase in size everytime clicked on
rename.

I’ve also updated the colors for the box border and box shadow as
specified in Figma.

Please let me know your thoughts.
Thanks



https://github.com/user-attachments/assets/d667269d-070e-4968-b63c-2ba9605de055

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-05 17:21:27 +02:00
nitin
c7ba6d4e9f
Existing filter value isn't passed to the component to edit it - Issue #6278 (#6449)
Hi @FelixMalfait,
Regarding Issue #6278 
I’ve resolved the issue with fields involving numbers and text.

However, I’ve encountered a problem with how dates are parsed, selected,
and displayed. When a date is selected for the first time, it is
correctly parsed and adjusted to the local timezone (e.g., 05:30:00 AM
for my timezone). However, when trying to change the date, the day prior
to the selected date is shown instead of the intended date. Please refer
to the attached video for a demonstration of this bug.

I suspect this issue is related to how the date is parsed and selected
in relation to timezones, and I am currently investigating it further.

Could you please review the changes made so far?

Thanks!




https://github.com/user-attachments/assets/4f0e5694-530b-489c-807e-3b7d52da0742

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-08-05 17:19:15 +02:00
nitin
eba79d2ea5
Preserve navigation state when adding custom fields (#6399)
@lucasbordeau
Issue #6374 
Fixed the navigation state issue! I also found and resolved a similar
bug with the "Edit Fields" functionality. The
`setNavigationMemorizedUrl` state now correctly updates on navigation to
settings, ensuring users return to the correct page.

Please review.
2024-08-05 16:50:08 +02:00