Commit Graph

4880 Commits

Author SHA1 Message Date
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
7d3c8b440c fix : Update local setup doc (#9383)
Co-authored-by: Etienne Jouan <etiennejouan@MacBook-Pro-de-Etienne.local>
2025-01-06 14:04:48 +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
059c4ab411 Update README (#9351)
Needed a new description
2025-01-05 14:11:19 +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
b433145f80 Fix access to workflow version (#9335)
Fix access to workflow version
2025-01-03 16:22:18 +01:00
e5754d2152 Remove env-config.js (#9331)
Fixes #5340 which had been open for a long time
2025-01-03 15:18:02 +01:00
03b1da82c1 Fix select all (#9337)
There was a bug when selecting all records on the index page.
This was due to the fact that
`WorkflowRunRecordActionMenuEntrySetterEffect` was mounted when it
shouldn't have been.
2025-01-03 15:13:51 +01:00
9da0a5df6f Fixed import modal content scroll bug (#9330)
fixes #9297
2025-01-03 14:05:51 +01:00
8b7e4ddad1 Creating a new task is not very smooth (#9326)
"'TODO'" is the default value from the database and must be escaped in
the frontend. The issue was revealed by the "status" field of Tasks but
it would have been the same for the others

fix #9210
2025-01-03 11:14:36 +01:00
8333892647 Fixed context menu on index page (#9316)
Fixes https://github.com/twentyhq/twenty/issues/8970

The context menu wasn't working because of wrong architecture with the
Dropdown component, as it's a unique behavior (no clickable component
and portal) it also required refactoring a bit the Dropdown component.

- Context menu now uses a portal
- Fixed dropdown offset without clickable component (now using a
fallback anchor component)
- Fixed React array key props
2025-01-03 10:11:33 +00:00
0674388426 Do not reset number on country change (#9329)
As title
2025-01-02 18:10:22 +00:00
5b6c52c64b Create migration for aggregate operation options (#9318)
As a follow-up of https://github.com/twentyhq/twenty/pull/9304, we are
here creating a migration to run at the next release, aiming at adding
the new aggregate operation options (CountEmpty, CountNotEmpty, ...,
PercentEmpty, PercentNotEmpty) to the enums on View and ViewField's
aggregateOperations fields.

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2025-01-02 18:53:06 +01:00
759dcfa910 Workflow phone number field (#9324)
Add phone number field

<img width="517" alt="Capture d’écran 2025-01-02 à 18 10 06"
src="https://github.com/user-attachments/assets/3c3ac7e6-a7fa-487b-820f-674d42217561"
/>
2025-01-02 17:52:27 +00:00
5d857fbfb5 Aggregate count variations (#9304)
Closes https://github.com/twentyhq/private-issues/issues/222

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
Co-authored-by: Weiko <corentin@twenty.com>
2025-01-02 16:35:05 +00:00
0f1458cbe9 fix: view group followup (#9162)
This PR fixes all followup that @Bonapara add on Discord.

- [x] When no group by is set, clicking on group by should open the
"field selection" menu
- [x] When closed, chevron should be "chevron-right" instead of
"chevron-up"
- [x] Sort : Add ability to switch from alphabetical to manual when
moving a option in sort alphabetical
- [x] Add subtext for group by and sort
- [x] Group by menu display bug
- [x] Changing the sort should not close the menu
- [x] Group by Activation -> shows empty state + is slow
- [x] Switching from Kanban view Settings to Table Options menu displays
an empty menu
- [x] Unnecessary spacing under groups
- [x] When no "select" are set on an object, redirect the user directly
to the new Select field page
- [x] Sort : Default should be manual
- [x] Hidding "no value" displays all options and remove the "hide empty
group" toggle
- [x] Hide Empty group option disappeared
- [x] Group by should not be persisted on "Locked/Main view" (**For now
we just disable the group by on main view**)
- [x] Hide Empty group should not be activated by default on
Opportunities Kanban view
- [ ] Animate the group opening/closing (**We'll be done later**)

Performance improvement:

https://github.com/user-attachments/assets/fd2acf66-0e56-45d0-8b2f-99c62e57d6f7

https://github.com/user-attachments/assets/80f1a2e1-9f77-4923-b85d-acb9cad96886

Also fix #9036

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2025-01-02 16:40:28 +01:00
866c29e9ee Deprecate share email thread (#9319)
## Context

Following this https://github.com/twentyhq/twenty/issues/4199
This has not been fully implemented, after 5months of dead code I'm
removing the feature for the time being until we re-prioritise the
feature (unlikely during these next 6 months) to keep the codebase a bit
cleaner (no need to maintain dead features)

Feel free to reopen / revert this PR once feature is ready

## Test
locally after importing emails
2025-01-02 16:22:29 +01:00
0dff20775b Fix user deletion when workspace is deleted (#9321)
## Context
2 issues here:
- We use a metadata repository find method without providing a
workspaceId: In practice this is not an issue in this specific part but
let's avoid that pattern
- await this.workspaceService.deleteWorkspace(workspaceId); deletes
almost everything, emitting an event on workspaceMember could
potentially bring issues and not much values imho
2025-01-02 16:15:25 +01:00
23499735b4 fix: Resolve "Can't delete an account" issue (#9232) (#9238)
### Summary

This pull request addresses the issue described in #9232, where
attempting to delete a user account results in a `TypeError: Cannot read
properties of undefined (reading 'dataSourceService')`.

### Changes Made

- Fixed the `this` context issue in the `deleteUserFromWorkspace` method
by ensuring it is correctly bound.
- Updated the `deleteUser` method to use a bound function when calling
`deleteUserFromWorkspace`.

### Linked Issue

This pull request fixes #9232.

### Additional Notes

- Please review the changes carefully to ensure no unintended side
effects in the user or workspace deletion process.
- Suggestions for further improvement are welcome.

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
Co-authored-by: Weiko <corentin@twenty.com>
2025-01-02 14:14:28 +01:00
2290ed8f87 Fix frontend bug when filtering with special character (#9307)
Fixes #8767
2025-01-02 13:43:27 +01:00
afae244057 Add E2E tests (#9309)
Try adding E2E tests when labelling the PR or merging on main branch
2025-01-02 13:28:02 +01:00
5da744ebc5 Continue workflow folders re-ordering (#9315)
- put actions in steps
- move hooks
- move states
2025-01-02 12:23:07 +00:00
e3f7a0572e 9260 refactor multiple record actions and no selection actions (#9314)
Closes #9260

- Refactored multiple record actions and no selection record actions to
use config file
- Simplified actions registration logic
- Updated tests
2025-01-02 13:15:27 +01:00
306b45a038 fix: Make kanban view creation text dynamic based on the object type (#9310)
fixes #9298 

fix issue where Kanban view creation text shows "Companies" instead of
current object type.

Changes:
- Made text dynamic in ViewPickerContentCreateMode
- Now displays correct object name

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2025-01-01 19:40:46 +01:00
85c04c8931 Performance improvement to dev xp (#9294)
The DX is not great when you need to do a lot of database
resets/command.

Should we disable Typescript validation to speed things up? With this
and caching database:reset takes 1min instead of 2 on my machine.


See also: https://github.com/typeorm/typeorm/issues/4136

And #9291 / #9293

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2025-01-01 17:28:45 +01:00
3544a49702 Fixed Table Header click for options dropdown (#9300)
Fixes: #9286
2025-01-01 10:34:58 +01:00
7d74422c2c fix "Relations" not displayed on kanban views (#9301)
fix #7358

Problem was only for some specific relations : target tasks.
(Not related to 1o1 VS 1toMany VS MAnyto1)
2025-01-01 09:17:30 +01:00
9e74ffae52 Refacto workflow folders (#9302)
- Create separated folders for sections
- Add components
- Add utils and clean old ones
- Add constants
- Rename search variables folder and components

Next steps:
- clean hooks
- clean states
2024-12-31 16:08:14 +00:00
d4d8883794 add command to sync plan data from stripe, doing testing (#9177)
**Solves**
[ https://github.com/twentyhq/private-issues/issues/211 ]

**TLDR:**

Add a command that fetches the plans product, meters and price in stripe
and whrites it to the DataBase. For now it fetches only active products.

**In order to test**

- Set IS_BILLING_ENABLED=true
- Run `npx nx database:reset twenty-server` if you don't have the
billing tables in your data base schema
-  run `npx nx run twenty-server:command billing:sync-plans-data -v`

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-12-31 15:10:48 +00:00
6e0002b874 Add NX commands to twenty-e2e-testing package (#9222)
Related to #8469
2024-12-31 15:49:52 +01:00
2c7f40ab1d Fix NavigationDrawer story (#9235)
Closes https://github.com/twentyhq/twenty/issues/7492

## Description
This PR will fix NavigationDrawer story.

## Testing
<img width="1407" alt="スクリーンショット 2024-12-25 23 27 25"
src="https://github.com/user-attachments/assets/d9ee4363-f2b2-408f-b2b8-c4dd92cfd66b"
/>
<img width="1326" alt="スクリーンショット 2024-12-26 0 28 47"
src="https://github.com/user-attachments/assets/b21fbe02-9d56-4b9b-8631-ee4530e5a5d1"
/>

---------

Co-authored-by: Takuya Kurimoto <takuya004869@gmail.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-12-31 14:00:45 +00:00
97f5a5b8a5 Pass Billing Checkout var in url to bypass credit card (#9283) 2024-12-31 14:48:00 +01:00
45f14c8020 Refactored table unnamed cells behaviour (#9264)
Closes: #7851 

[Screencast from 2024-12-28
00-53-55.webm](https://github.com/user-attachments/assets/17b05ebf-d375-4e19-a4e8-699bce876f5d)

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-12-31 14:32:32 +01:00
09cdfaa254 Add cursor rules (#9268)
Add rules for AI code editor
2024-12-31 14:13:23 +01:00
2b82347fdc Refactor File Download Logic and Streamline Test Suite (#9281)
Closes #9277 

## Summary of Changes
- Updated the file-download functionality to use the `saveAs` method
from the `file-saver` library, ensuring a more reliable and consistent
implementation.
- Removed redundant tests to streamline the test suite and reduce
maintenance overhead.

## Testing Performed
- [x] Verified that exporting the view to a CSV file works as expected.
2024-12-31 14:08:22 +01:00
cdc2dfe709 Fix text color issue in CustomSlashMenu for dark mode (#9280)
fixes #9265 

#### Summary
The menu options appear in black color in dark mode, making text hard to
read because there is very little contrast between text and background.

#### Solution
Added `color: ${({ theme }) => theme.font.color.secondary};` to the
dropdown menu container, so the menu options inherit the correct text
color from their containers.

### Screenshots
![CleanShot 2024-12-30 at 09 37
26](https://github.com/user-attachments/assets/a709b785-75a4-408d-9517-d3cab2c1fee6)
2024-12-31 14:05:35 +01:00
03370b4a1b Change Apollo cache policy (#9296)
Set the default cache policy to 'cache-and-network' to make sure user
get more fresh data without refreshing the browser. Better for workspace
with several users working at the same time.

It will put more load on the server...

Note: I don't think the previous setting was taken into account
<img width="829" alt="Screenshot 2024-12-31 at 10 59 56"
src="https://github.com/user-attachments/assets/30ea74be-0907-422f-8e84-6c352d379337"
/>
2024-12-31 12:12:07 +01:00