Commit Graph

1933 Commits

Author SHA1 Message Date
ddcb3dfd28 Feature flags env variable gating (#9481)
closes #9032

---------

Co-authored-by: Antoine Moreaux <moreaux.antoine@gmail.com>
2025-01-10 14:04:00 +01:00
c716a30d92 Refactored empty filter (#9532)
Refactored empty filter function and removed it from useFilterDropdown
hook
2025-01-10 12:30:01 +01:00
0a798a6671 Feat/view groups fast follow (#9513)
Fix #9512 

- 🟠 [Icon should be
lighter](https://discord.com/channels/1130383047699738754/1326487470895923222)
The current weight is the same as in Figma, waiting for confirmation
- 🟠 [None has an unwanted margin
left](https://discord.com/channels/1130383047699738754/1326493647796961323)
This component is used in lot of places, removing the padding left can
brake other places
- 🟢 [All cells should have a the same right
design](https://discord.com/channels/1130383047699738754/1326489001926066176)
- 🔴 [Group Sorting should not "freeze" when mouse is
release](https://discord.com/channels/1130383047699738754/1326494381795966996)
Can't find a good way to fix it, seems more related to the fact it's
running in debug mode.
- 🟢 [Alignment
issue](https://discord.com/channels/1130383047699738754/1326486523822084140)
- 🟢 [View record count
error](https://discord.com/channels/1130383047699738754/1326491489466978365)
- 🟢 [Vertically align tags and
numbers/count](https://discord.com/channels/1130383047699738754/1326490661800902728)
- 🟢 [Display "Calculate" only on hover in view
groups](https://discord.com/channels/1130383047699738754/1326490411929436191)
- 🟢 [Aggregates height in view groups is 28px instead of
32px](https://discord.com/channels/1130383047699738754/1326489587127943188)
- 🟠 [Picker under the
aggregate](https://discord.com/channels/1130383047699738754/1326487940557439039)
Can't reproduce the issue
- 🟢 [Icon should not be
hoverable](https://discord.com/channels/1130383047699738754/1326477402360123425)
- 🟢 [Crop long view
titles](https://discord.com/channels/1130383047699738754/1326477009576136755)
- 🟢 [Removing the group by on opportunities (group by none) give an
white
screen](https://discord.com/channels/1130383047699738754/1324651927962910750)
2025-01-09 19:12:57 +01:00
1f1cac3b00 chore: update returned attachement fullPath (#9516)
### Solution

fullPath prop on attachement (when returned by backend) is updated to
'domain + path' (formerly 'path').

Consequently, getFileAbsoluteURI util in front is removed.

closes #8763

---------

Co-authored-by: etiennejouan <jouan.etienne@gmail.com>
2025-01-09 19:12:36 +01:00
21774c60c7 Refactored reset filter dropdown (#9523)
This PR extracts reset filter logic from useFilterDropdown hook.

The goal is to remove useFilterDropdown hook by incrementally removing
each sub hook one by one.

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2025-01-09 18:56:21 +01:00
17e2e38812 Refactored select filter and select filter definition logic (#9519)
This PR extracts the logic to manage filter and filter definition
setting.

Previously it was ambiguous, we had the same "selectFilter" naming used
for setting filter definition in filter dropdown and for setting the
actual filter value and saving to view filter states.

This is another incremental refactor, which will allow to remove
useFilterDropdown hook.
2025-01-09 18:54:34 +01:00
f44d99d2ff Refactored object filter dropdown states (#9507)
Refactored object filter dropdown states while keeping the existing
structure to avoid creating a big PR.

The goal is to extract each sub hook returned by the useFilterDropdown
hook and create a PR for each function and the associated refactor for
the dependent zones in the code, so that we proceed by small increments.
2025-01-09 18:18:27 +01:00
7126ec5ae7 accessibility: make dropdowns accessible (#9475)
#### Motivation

Improve accessibility of dropdowns.

#### Before

Dropdowns are not accessible.

<img width="1219" alt="Screenshot 2025-01-09 at 10 00 36"
src="https://github.com/user-attachments/assets/060198f8-a42f-408c-a39a-b83da55e23c4"
/>

#### Ater

Dropdowns are accessible


![image](https://github.com/user-attachments/assets/e46d6292-913c-458b-acd4-37ed4e1a1e9b)
2025-01-09 14:19:58 +01:00
e62079ab6d Open emails and calendar events inside command menu (#9477)
https://github.com/user-attachments/assets/cfc8f85e-d49d-4aa1-a8c2-2410aca19444
2025-01-09 14:09:30 +01:00
8c1b9bf540 Revert "Change Apollo cache policy" (#9480)
Reverts twentyhq/twenty#9296
until we implement a fix for
https://github.com/twentyhq/twenty/issues/9299#issuecomment-2576868142
2025-01-09 14:04:59 +01:00
c535d21587 Include Date fields in aggregate operations on dates (#9479)
Follow-up on https://github.com/twentyhq/twenty/pull/9444/files - I had
forgotten to include Date field types (in addition to DateTime)
2025-01-09 12:13:21 +00:00
efb2a59e06 Force workflow step detail re-create (#9476)
When switching between the same step detail component, even if the props
is updated, component is not re-created.
This is an issue since form fields often keep an internal state. Which
means that even if form data are updated, the displayed value may still
be the value of the previous step detail.
Adding a key to for re-creation.
2025-01-09 10:16:12 +00:00
ae68a4b8d9 Navigation drawer sibling gap fix (#9472)
fixes
https://discord.com/channels/1130383047699738754/1326560179113955328/1326560179113955328
2025-01-09 10:49:43 +01:00
a2f2f4148a Migrate right drawer record page to the command menu (#9459)
Closes #9423



https://github.com/user-attachments/assets/0d93f170-8c4f-43ff-a0ca-3d2874d44820
2025-01-09 09:58:14 +01:00
27b58e9f43 fix(sso): adjust callback URL generation for SAML and OIDC (#9460)
Updated SAML-specific callback URL handling to include the ID, while
OIDC URLs now use the server base URL from config. Also added a debug
log in SSO authentication and cleaned up redirection URL logic in the
frontend.
2025-01-08 16:03:30 +00:00
8475b55172 Implement aggregate operations on dates (#9444)
Adding aggregate operations for dates: min ("Earliest date") and max
("Latest date")
2025-01-08 15:45:56 +00:00
7036a8ccc3 Fix dropdown input design (#9439)
### Context
Update to match Figma design for dropdown input - [standard
input](https://www.figma.com/design/xt8O9mFeLl46C5InWwoMrN/Twenty?node-id=28562-75034&t=4FdGFZfPLtvNq8La-4)
/ [custom phone
input](https://www.figma.com/design/xt8O9mFeLl46C5InWwoMrN/Twenty?node-id=28562-74922&t=YIxM3jgx8kC9qiyQ-4)

### Preview
<img width="200" alt="Screenshot 2025-01-07 at 16 07 31"
src="https://github.com/user-attachments/assets/d61eb446-aa62-43e5-b3a4-95efc8e3997e"
/>

<img width="200" alt="Screenshot 2025-01-07 at 16 06 12"
src="https://github.com/user-attachments/assets/8e80658c-8e33-408c-96b7-733ca72de8cb"
/>

<img width="200" alt="Screenshot 2025-01-07 at 16 06 22"
src="https://github.com/user-attachments/assets/9c2b204d-aa97-4fb1-a884-54d64864c900"
/>

<img width="200" alt="Screenshot 2025-01-07 at 16 06 36"
src="https://github.com/user-attachments/assets/a47b0e49-3c25-4738-b6a6-c3f0af067bc7"
/>


closes #8904

---------

Co-authored-by: etiennejouan <jouan.etienne@gmail.com>
2025-01-08 16:16:46 +01:00
a1664fbc7b Remove identifierFieldMetadataId from createObjectInput (#9450)
Removing labelIdentifierFieldMetadataId and
imageIdentifierFieldMetadataId that should not be part of
createObjectInput as they don't make sense for an object yet to create
and will break
2025-01-08 16:08:14 +01:00
973ec83e71 Animated the Sidebar Objects Tree view opening/closing (#9287)
closes #6485 


https://github.com/user-attachments/assets/79efca87-1d9b-4fa2-a457-3117be679c6e

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2025-01-08 19:36:49 +05:30
bec7911d59 Navigation drawer scroll padding fix (#9141)
closes https://github.com/twentyhq/twenty/issues/9026
fixes #9312



https://github.com/user-attachments/assets/3d7df3ec-8a5e-4308-8993-82c715edc683

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2025-01-08 14:03:47 +00:00
428572ae99 Multi item input hotkeys fixes (#9453)
- Follow-up on #9442
- Fixed multi item input field on escape
2025-01-08 15:03:27 +01:00
aa0d8546a8 [REFACTOR][FRONT]: Remove objectMetadata and fieldMetadata sluggification (#9441)
# Introduction
For motivations and context please have a look to
https://github.com/twentyhq/twenty/pull/9394 whom this PR results from.
In this pull-request we remove any `metadataField` and `objectMetadata`
sluggification. We directly consume `objectMetadata.namePlural` and
`metadataField.name`, ***it seems like that historically the consumed
`metadataField.name`*** are we sure that we wanna change this behavior ?

## Notes
Unless I'm mistaken by reverting the `kebabcase` url formatting we might
be creating deadlinks that user could have save beforehand => Discussed
with Charles said it's controlled risk.

---------

Co-authored-by: Paul Rastoin <paulrastoin@Pauls-MacBook-Pro.local>
2025-01-08 11:31:53 +01:00
00a9646d68 Fixed date input fields (#9442)
- Fixed date input fields : proper hotkey management, like other fields
- Removed DropdownUnmountEffect which was causing many bugs.
2025-01-08 10:43:49 +01:00
3198748401 fix: avoid clipping by aggregate footer (#9403)
fixes #9352 

![image](https://github.com/user-attachments/assets/f62b2324-d95c-4d7e-9c21-69d36427c7b1)
2025-01-08 10:06:27 +01:00
4f7fa7adcd Minor active navigation drawer item label font color fix (#9356)
fixes
https://discord.com/channels/1130383047699738754/1324667162379685972/1324667162379685972
2025-01-08 02:33:20 +05:30
b006459e73 Sort create record action fields by view field position (#9443)
<img width="555" alt="Capture d’écran 2025-01-07 à 17 40 29"
src="https://github.com/user-attachments/assets/ac85a2d4-7867-4ae3-a639-16969a439d78"
/>

<img width="1274" alt="Capture d’écran 2025-01-07 à 17 40 43"
src="https://github.com/user-attachments/assets/adfb793a-759c-4d4b-8672-79be1b4ad3fa"
/>
2025-01-07 16:58:58 +00:00
6e04a3b19f refactor(auth): integrate react-hook-form context (#9417)
Remove redundant validation logic and streamline form handling by
leveraging react-hook-form's context. Simplify component props and
enhance consistency across the sign-in/up flow.

Fix https://github.com/twentyhq/twenty/issues/9380
2025-01-07 17:09:45 +01:00
6129052850 Fixed single record select hotkeys (#9433)
There is a problem of hotkey scope not being passed to the relation
picker used for single record select fields.

Fixed it where we open a single record select.
2025-01-07 16:06:06 +00:00
46f51577a3 fix frontend build 2025-01-07 16:09:48 +01:00
78849fc513 fix inject-runtime-env command 2025-01-07 15:53:16 +01:00
7d7955fc65 Move capitalize into twenty-shared (#9414)
capitalize had been moved into twenty-shared. Let's remove the
duplicates in server and front !
2025-01-07 14:25:29 +00:00
7b70f7d93b [9382][FRONT]: Compute highlighted object view using raw name plural (#9394)
# Introduction
Please find related ticket here #9382
To fix the issue the solution seems to be to stop searching for last
viewed `objectMetadata` using their slugged version `namePlural`

## Upcoming cleanup
After discussing with @charlesBochet it seems like a bad practice to
slug the `objectMetadata`, in this way in a following PR we will suggest
a cleanup of the remaining method that does within the
`useFilteredObjectMetadataItems.ts`

## Conclusion
As always any suggestions are welcomed !
Please let me know

closes #9382

---------

Co-authored-by: Paul Rastoin <paulrastoin@Pauls-MacBook-Pro.local>
2025-01-07 15:20:54 +01:00
04f648f7f3 Refactor activate workflow actions (#9434)
Closes #9407
2025-01-07 14:17:16 +01:00
b71246bc5d feat: put back group by feature flag (#9428)
Rollback and put back view group feature flag to push to prod.
2025-01-07 13:52:42 +01:00
edf0a1818c Fix inject runtime env (#9421)
Script is using here-string <<< which is not supported by sh, using bash
instead
Also removing "sh" from the command to actually use the bash from the
shebang
2025-01-07 11:02:27 +01:00
1691fa5065 Remove buggy refetch query (#9420)
- Fixes flash when writing code in workflow code steps
- Fixes tab selection collusion when switching code steps 


https://github.com/user-attachments/assets/45e884a7-6765-4596-b37f-3a22dd78664f
2025-01-07 10:59:19 +01:00
00e71477d3 feat(sso): add support for identityProviderId in SAML flow (#9411)
Updated SAML callback URLs and relevant logic to include
identityProviderId, ensuring better handling of multiple identity
providers. Refactored client and server-side code to streamline form
interactions and validation within the SSO module.

Fix https://github.com/twentyhq/twenty/issues/9323
https://github.com/twentyhq/twenty/issues/9325
2025-01-07 10:30:13 +01:00
9392acbee5 Fix use as draft (#9413)
Closes #9408
2025-01-07 10:21:00 +01:00
c61831c78a Workflow dark mode improvements (#9412)
## Dark mode

Old vs New

![CleanShot 2025-01-06 at 17 49
19@2x](https://github.com/user-attachments/assets/4fda3da0-3a84-43b5-a60b-ee2f3356e540)

![CleanShot 2025-01-06 at 17 49
32@2x](https://github.com/user-attachments/assets/e2aa498a-fa4d-41d3-af20-fa3ab605bbab)

## Light mode

Old vs New

![CleanShot 2025-01-06 at 17 49
11@2x](https://github.com/user-attachments/assets/0587d18f-4f1d-42bd-94a5-9e06be685bb3)

![CleanShot 2025-01-06 at 17 49
01@2x](https://github.com/user-attachments/assets/aacbc40c-c477-4ece-bed2-12cdf18ab705)
2025-01-06 18:07:23 +01:00
a9b95bcf03 Add count and percent aggregations to kanban headers (#9348)
Closes https://github.com/twentyhq/private-issues/issues/226


https://github.com/user-attachments/assets/cee78080-6dda-4102-9595-d32971cf9104
2025-01-06 17:57:32 +01:00
b22a598d7d Add Currency form field (#9389) 2025-01-06 15:39:48 +00:00
17bf2b6173 Move the workflow draft version overriding to the backend (#9328)
- In the `formatFieldMetadataValue` function, allow people to call
TypeORM's `save()` method with unserialized JSON data.
- Create an `overrideWorkflowDraftVersion` mutation that takes a
workflow id and the id of the workflow version to use as the new draft
  - If no draft exists yet, create one
  - If a draft already exists, deactivate its serverless functions
- Duplicate every step. For serverless function steps, it includes
duplicating the functions
  - Save the data of the step in DB
- Call the `overrideWorkflowDraftVersion` mutation in the old workflow
header and in the new Cmd+K actions
- I chose to not update the Apollo cache manually as the information of
the new draft are going to be automatically fetched once the user lands
on the workflow's show page. Note that we redirect the user to this page
after overriding the draft version.
2025-01-06 14:56:09 +01:00
3eb7ec909e refactor(workspace, users, billing): remove default workspace + rename (#9360)
Replaced user-based parameterization with workspace-focused logic across
seed scripts, mocks, and billing services. Removed redundant `user`
references and standardized to `workspace` to align with updated
business rules. Adjusted mock data and tests to reflect these changes.

Fix https://github.com/twentyhq/twenty/issues/9295
2025-01-06 12:33:57 +01:00
25083e5405 fix: Group by not visible for table (#9365)
Group by option was not visible on table, this is fixing the issue.
2025-01-06 10:51:26 +00:00
bf00c971ee Typo in Settings - Emails (#9355) 2025-01-06 11:06:51 +01:00
a0fe94d15b adding some delay for tooltip (#9339)
tooltips are currently instantaneous. let's add some delay for better
user experience

After investigation, it looks like the open property prevents delays
from happening. Swithcing to hidden property

See https://discord.com/channels/1130383047699738754/1324678408684306486
2025-01-03 18:29:08 +01:00
5bd2154110 Add createdBy source for workflows (#9342)
Fix createdBy that is not displayed for workflows

<img width="1510" alt="Capture d’écran 2025-01-03 à 17 58 05"
src="https://github.com/user-attachments/assets/f2d4d7a9-466b-46e7-9d43-d55de88fb803"
/>
2025-01-03 17:26:15 +00:00
694c8aae40 tiny margin error (#9343)
fixing the issue reported by Thomas here
https://discord.com/channels/1130383047699738754/1324664239012446208
2025-01-03 18:00:58 +01:00
ae4615d140 Minor fixes on context menu (#9340)
- Fixed click outside for kanban not working (changed strategy)
- Tried a different approach for setting the context menu position
- Fixes https://github.com/twentyhq/twenty/issues/9336
2025-01-03 17:46:42 +01:00
e87b2c9e33 Fix creation from empty state (#9341)
Invert logic of pending record creation

Fix https://github.com/twentyhq/twenty/issues/9338
2025-01-03 17:42:13 +01:00