Commit Graph

3568 Commits

Author SHA1 Message Date
Charles Bochet
6752d43d36 Fix 2024-08-05 23:11:57 +02:00
Charles Bochet
cbb1454ef8 Fix 2024-08-05 23:05:12 +02:00
Charles Bochet
72a69d5bd7 Release 0.23 2024-08-05 19:59:59 +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
bosiraphael
2073d8e6e1
6446 improve information banner component to make it scale better (#6545)
Closes #6446
2024-08-05 16:00:52 +02:00
NitinPSingh
fa738ec373
fix #5660 standardized relation icon (#6504)
fix #5660 

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


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

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-05 15:47:25 +02:00
Faisal-imtiyaz123
fe9144a4a7
Updates CheckBox Component in Table and Kanban View ( #4850 ) (#6519)
fixes #4850

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-05 15:26:09 +02:00
nitin
d23e5f18c3
Added max-height to innerlist to get scrolling behaviour (#6541)
Fixes #6538 



https://github.com/user-attachments/assets/c9ecf96d-9d37-4a91-a08e-e0f882ecea62

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-05 15:09:19 +02:00
Melanie Eureka Ngome
dcf938f2c9
Update views-sort-filter.mdx (#6544)
Edited a paragraph to remove sentence error and improve comprehension.
2024-08-05 14:42:59 +02:00
Nabhag Motivaras
b841187319
fix: releases list to have styles according to theme (#6534)
### ISSUE (BUG)

- Fixes: #6524

### DESCRIPTION

- List styles wasn't applying based on the theme, reason for applying
css to directly to **li** and **li strong** instead of applying to
unorderlist-element is that later on we might have **orderlist** in that
case if we had apply to **ul** here, this will issue will be raised
again, thus in **list element**


https://github.com/user-attachments/assets/64f0870e-4f82-4afd-8452-778aa54023fc
2024-08-05 14:42:20 +02:00
Weiko
542419bc1b
Timeline log displays empty when field value deleted (#6542)
Fixes https://github.com/twentyhq/twenty/issues/6288

## Before
<img width="1282" alt="Screenshot 2024-08-05 at 13 22 13"
src="https://github.com/user-attachments/assets/27bf3343-7d6a-440f-905b-e55fdde918d7">

## After
<img width="1251" alt="Screenshot 2024-08-05 at 13 22 05"
src="https://github.com/user-attachments/assets/25404bff-9d90-4631-af09-fe18b6df43f5">
2024-08-05 14:36:57 +02:00
Charles Bochet
2b311b5f7b
Update standard fields (#6532)
In this PR:
- adding Favorites to Tasks and Notes
- fixing inconsistencies between custom object creation and sync of
standard fields of custom objects
- fixing workspaceCacheVersion not used to invalidate existing
datasource
2024-08-04 23:22:41 +02:00
Charles Bochet
03204021cb
Refactor onboarding user vars to be absent when user is fully onboarded (#6531)
In this PR:
- take feedbacks from: https://github.com/twentyhq/twenty/pull/6530 /
https://github.com/twentyhq/twenty/pull/6529 /
https://github.com/twentyhq/twenty/pull/6526 /
https://github.com/twentyhq/twenty/pull/6512
- refactor onboarding uservars to be absent when the user is fully
onboarded: isStepComplete ==> isStepIncomplete
- introduce a new workspace.activationStatus: CREATION_ONGOING

I'm retesting the whole flow:
- with/without BILLING
- sign in with/without SSO
- sign up with/without SSO
- another workspaceMembers join the team
- subscriptionCanceled
- access to billingPortal
2024-08-04 20:37:36 +02:00
Charles Bochet
c543716381
Various fixes: profilePicture / logo upload, imageIdentifiers (#6530)
In this PR:
- refactoring auth module to extract a jwt module that can be re-used
from other part of the app (avoiding circular dependencies file module
=> auth => file (file and auth both need jwt actually)
- activating imageIdentfier on person on workspace creation (this will
put back the images on people)
- fixing picture upload (we were missing some fileToken)
2024-08-04 15:08:25 +02:00
Charles Bochet
e787215e15
Add createdBy field on custom object creation (#6529)
In this PR, I'm:
- adding createdBy field (type ACTOR) on custom objects when created
- moving `name` and `position` default column to the set of columns
automatically creation on object creation
- fixing a bug on mutations (update / create), if the targetted object
has a 'data' custom field, it was conflicting with the payload ==> I
feel we need to refactor this part of the code but we can keep this for
a bit later as we plan to move out of pg_graphql

<img width="1198" alt="image"
src="https://github.com/user-attachments/assets/891c4a97-bab1-415c-8551-dabd5996a794">
2024-08-04 13:12:24 +02:00
Charles Bochet
e2b42ee6c9 Allow free access for configuration using billing 2024-08-04 01:37:53 +02:00
Charles Bochet
76185c2f68
Add command to backfill new onboarding user vars (#6526)
As per our guideline to maintain a smooth migration to the new minor
versions, this command is backfilling existing workspaces with the 3
userVars used to keep track of user onboarding:
```
  ONBOARDING_CONNECT_ACCOUNT_COMPLETE = 'ONBOARDING_CONNECT_ACCOUNT_COMPLETE',
  ONBOARDING_INVITE_TEAM_COMPLETE = 'ONBOARDING_INVITE_TEAM_COMPLETE',
  ONBOARDING_CREATE_PROFILE_COMPLETE = 'ONBOARDING_CREATE_PROFILE_COMPLETE',
```
2024-08-04 01:04:13 +02:00
martmull
7cd5427589
Fix onboarding status performance issues (#6512)
Updated the onboardingStatus computation to improve performances

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-08-04 00:33:33 +02:00
Marie
e01d3fd0be
Do not override value for composite types address and links when entering input (#6502)
Closes #6434.

We don't want to override the values of the records' address or links as
they are composite field and it is costly to loose the data.
We will need a more unified behaviour here - maybe introduce a Ctrl+Z
option.

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-08-03 20:12:31 +02:00
Marie
6e0c1b4c73
Fallback to default value when migrating value from enum (#6517)
When migrating the option values of a select type, if the field is non
nullable (for now, only available for opportunity's "stage" standard
field), we fallback to the (potentially updated) default value instead
of nullifying the value to avoid getting a database error.

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-08-03 17:53:01 +02:00
Félix Malfait
5f88caf409
Refacto default value (#6507)
A quick followup of #6506 to add clarity and differentiate emptyValue
from defaultValue
2024-08-03 16:43:53 +02:00
Jérémy M
6432ad39b9
feat: add new ACTOR field type and createdBy standard fields (#6324)
This pull request introduces a new `FieldMetadataType` called `ACTOR`.
The primary objective of this new type is to add an extra column to the
following objects: `person`, `company`, `opportunity`, `note`, `task`,
and all custom objects.

This composite type contains three properties:

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

### Functionality

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

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

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

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

### Front-End Handling

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

### Missing Components

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

### Related Issues

Fixes issue #5155.

### Additional Notes

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

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

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-08-03 15:43:31 +02:00
Weiko
9cf08d912a
Fix migration search path (#6520) 2024-08-02 21:34:20 +02:00
Aditya Pimpalkar
1f5c25ac0a
fix: navigate with arrow keys in select/multi-select (#5983)
closes: #4977



https://github.com/twentyhq/twenty/assets/13139771/8121814c-9a8a-4a8d-9290-1aebe145220f

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-08-02 20:12:46 +02:00
Weiko
c5d95dc4c8
Add logs to migration runner (#6518) 2024-08-02 19:13:39 +02:00
Thomas Trompette
277c51d58e
Add note and task target relation creation for customs (#6515)
As title

Urgent bug to fix, I will take the time to refacto this code next week

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-08-02 18:04:32 +02:00
Marie
268a0b09e0
Revert "Add skip option at sign-up (#6495)" (#6516)
This reverts commit eba6806594.
2024-08-02 16:27:08 +02:00
Marie
eba6806594
Add skip option at sign-up (#6495)
Closes #5925.

<img width="440" alt="Capture d’écran 2024-08-01 à 15 35 08"
src="https://github.com/user-attachments/assets/9a190b38-8e6a-46e6-8bf8-80a60cd52016">
2024-08-02 15:20:41 +02:00
Weiko
5870979bfa
Fix missing encoding in workspace-logo, members, person (#6510) 2024-08-02 15:18:48 +02:00
Thomas Trompette
0c036efcc4
Remove duplicated index from view picker (#6514)
<img width="815" alt="Capture d’écran 2024-08-02 à 15 15 51"
src="https://github.com/user-attachments/assets/0b192091-39f9-46c4-80b8-3c1a97f00480">
2024-08-02 15:18:29 +02:00
Thomas Trompette
950882d9fa
Fix title padding and style on task and attachment (#6509)
Fix https://github.com/twentyhq/twenty/issues/5923

<img width="593" alt="Capture d’écran 2024-08-02 à 12 09 24"
src="https://github.com/user-attachments/assets/a1c84060-9b32-4780-beb7-f44b85e49d07">
<img width="593" alt="Capture d’écran 2024-08-02 à 12 09 29"
src="https://github.com/user-attachments/assets/641cab31-723c-4253-9c3c-00fef70f2d06">
<img width="593" alt="Capture d’écran 2024-08-02 à 12 09 33"
src="https://github.com/user-attachments/assets/ba2adcb6-7651-4288-91f3-304d13c3e7bd">
2024-08-02 15:01:54 +02:00
Thomas Trompette
931a19260f
Fix label fonts in timeline events (#6511)
As title
2024-08-02 14:53:59 +02:00
Marie
489e8def9c
Fix icons not showing in sign-in background (#6513) 2024-08-02 14:34:33 +02:00
Prateek Jain
281bf689fa
Make api name editable and add expiry (#6473)
Fixes #6302

---------

Co-authored-by: martmull <martmull@hotmail.fr>
2024-08-02 13:31:06 +02:00
Lucas Bordeau
68120d529c
Add sort feature for Links type (#6503)
Closes https://github.com/twentyhq/twenty/issues/5741

Filtering was already working.

I just added the required logic in the frontend to allow sorting by
primary link url (because label can be empty)
2024-08-02 11:10:54 +02:00
Lucas Bordeau
f0ca3439a8
Fixed sort bug when two select values were null (#6493)
Fixes https://github.com/twentyhq/twenty/issues/5762

The problem was only happening with a sort on a select type field, also
appears with currency type and maybe other types.

This was because NULL values were sorted in a random order because the
sort function was comparing two NULL values as not equal, so I just
added a case for when A === B === NULL.
2024-08-02 10:48:36 +02:00
Félix Malfait
0dcdda3928
Add updated at column (#6506)
Introduced `updatedAt` column. and fix an existing bug where the field
edition page was crashing because we were trying to compute Date('now')
(param coming from the default value)
2024-08-02 10:03:36 +02:00
Weiko
676c902731
Fix timelineActivity updated fields (#6494)
## Context
We recently introduced the new twenty ORM and used it in the update
methods in the query runner.
Initially we were using pg_graphql to fetch the record before updating
it allowing us to compare the before and the after and create a diff.
This diff is then used for the timeline activity creation. Now,
twentyORM is doing the fetch and pg_graphql is still doing the update
and their responses are not exactly the same, which means the diff is
not working as intended (e.g date types were always in the diff due to
one being in Date format and the other as a string)

This PR introduces a updatedFields property to the update event which
comes from the input. This is not ideal as this won't work for API users
that send the whole payload but will be sufficient enough for our FE
that only sends modified fields. We then compare only those fields in
the diff.
2024-08-01 18:41:28 +02:00
rostaklein
a424c63476
file storage workspace id prefix (#6230)
closes https://github.com/twentyhq/twenty/issues/6155

just an idea, i guess this could work well, but im open for discussion

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-08-01 18:07:22 +02:00
Charles Bochet
5c92ab937e
Leverage workspace activationStatus to decide if a workspace is activated or not (#6497)
An ACTIVE workspace is a workspace that has a complete workspaceSchema
and is authorized to be browsed by users.

In this PR, I'm:
- introducing a new activationStatus: PENDING_CREATION (existing ACTIVE
/ INACTIVE)
- removing workspaceService.isWorkspaceActivated (based on
workspaceSchema existence which is not robust and checking
activationStatus.ACTIVE instead)
- removing dynamic activationStatus field on worksapce resolver (we can
use the postgres column directly now that data has been migrated)
- on user sign up creating the workspace in PENDING_CREATION, and on
workspace activation setting it to ACTIVE
- only re-activating a workspace if the current activationStatus is
INACTIVE through billing webhooks (a PENDING_CREATION should stay
PENDING and ACTIVE should stay ACTIVE)
2024-08-01 17:05:15 +02:00
Marie
1a90df8961
Create a new entry directly from a many picker (#6478)
Closes #6091
2024-08-01 15:08:07 +02:00
Thomas Trompette
8c8f192765
Trigger workflow on database event (#6480)
- Add global listener on database event
- Fetch event listener associated
- Trigger associated workflow

Also updated the runner so it expects the input to be in the payload
rather than the trigger
2024-08-01 11:57:44 +02:00
martmull
ae423f5e75
Improve typing definition (#6481)
- added typing for workflow-runner results
- fix workflow typing
- add a `workflow-action-runner` submodule that contains factories for
action runners
- added code-action-runner
- simplified code
2024-08-01 11:38:31 +02:00
SIDDAM VINAY
0f69106558
Fix row background not changing to blue on selection (#6479)
[Screencast from 2024-07-31
21-57-49.webm](https://github.com/user-attachments/assets/d2d80b10-def9-4d0e-8bcc-53555742db19)
@Bonapara Please review
Closes #6461 - fixed , on selection the background is now changing to
blue
2024-08-01 11:29:06 +02:00
Félix Malfait
3a1576bc22
Fix 2 small bugs following tasks migration (#6483)
This PR fixes two bugs:
- A broken link to the task page that had been left on the mobile
version
- On Kanban cards, the badge for notes/tasks wasn't properly displayed
because the title wasn't loaded from the backend
2024-08-01 11:28:09 +02:00
nitin
8c7ae9e07f
Adjusted empty tag style (#6465)
Fixed Issue #6307  

corrected 
- border style
- font color
- font weight

added
- Empty Tag story
2024-08-01 10:29:05 +02:00
gitstart-app[bot]
d9dcd63a1c
Expose duplicate check on REST API and enable batch duplicate checks (#6328)
This PR was created by [GitStart](https://gitstart.com/) to address the
requirements from this ticket:
[TWNTY-5472](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-5472).
This ticket was imported from:
[TWNTY-5472](https://github.com/twentyhq/twenty/issues/5472)

 --- 

### Description:
- Following what is already done in the code, we create a REST endpoint
that generates the Graphql query and returns its result.

### Refs: #5472


### Demo:

<https://www.loom.com/share/e0b1030f056945a0bf93bdd88ea01d8f?sid=6f128e8c-370b-4079-958e-0ea2d073a241>

FIxes #5472

---------

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: martmull <martmull@hotmail.fr>
2024-08-01 10:08:22 +02:00