Commit Graph

4812 Commits

Author SHA1 Message Date
a8bb3e6bdf Added all field types on pet custom object (#9248)
- Added all usable composite field types on pet custom object
- Fixed missing createdBy on people and company seeds
- DEFAULT_SUBDOMAIN is now used for login (could be improved for multi
workspace)
- Refactored ObjectMetadataStandardIdToIdMap to disambiguate from
ObjectMetadataMap
- Refactored seedCustomObjects
2024-12-27 15:01:09 +01:00
58c92e036b Add post hooks for workflow deletion (#9258)
Delete all workflow sub objects when workflow is deleted. Other sub
objects cannot be deleted otherwise.

We do not listen to deletion events so I am not adding them. Those post
hooks should be deleted Q1 once we properly handle cascade for soft
deletion
2024-12-27 13:40:19 +00:00
2bb71bb79a Fix glitch at aggregate operation update (#9253)
Before:

https://github.com/user-attachments/assets/6e76b19c-b99c-4870-9c93-b75e7cf86103

After:

https://github.com/user-attachments/assets/b5827d3e-5891-4204-bf91-6fa4504f30d3

Isolated the value change in a separate component to avoid re-renders of
the parent component that has the down chevron.
Also added a context at foot cell-level to centralize viewFieldId and
fieldMetadataId that were queried in children components calling heavy
hooks.
2024-12-27 14:36:24 +01:00
546a793aed fix: last field overflow (#8510)
Fixes: #7216 

The issue was caused by the ```min-width``` property of
```StyledEditableCellEditModeContainer```. So, I removed it.

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-12-27 12:30:35 +00:00
e1f8ac4a4c Allow multiple folder to be open at once (#9242) 2024-12-27 11:30:30 +01:00
8668fd2b94 Fix click outside on board (#9252)
Fixes #9246 
Exclude `page-action-container` from click outside listener
2024-12-27 10:04:32 +01:00
a653488b17 Fix filter by url (#9247)
Filters coming from url should be parsed properly when using the new
relation schema format
2024-12-27 09:02:12 +00:00
b91656eb5d Aggregate fast follows (1) (#9233)
Some fixes required: 

- [Aggregate value should not disappear when dropdown is
open](https://discord.com/channels/1130383047699738754/1319328950475817001/1319328950475817001)
- [Delay the apparition of the tooltip on
kanban](https://discord.com/channels/1130383047699738754/1319327824632352860/1319327824632352860)
- [Group options in
sub-menus](https://discord.com/channels/1130383047699738754/1319326443951362059/1319326443951362059)

![image](https://github.com/user-attachments/assets/b2b58cec-a042-4253-a185-01d273320960)
- Display the currently selected option with a checkmark

![image](https://github.com/user-attachments/assets/95270f9c-773e-4af7-aaf5-249469ae7d2d)
- [Loading -> Aggregates should appear at the same time that records,
not
before](https://discord.com/channels/1130383047699738754/1319329819749646456/1319329899630301318)
2024-12-26 16:00:56 +00:00
68d47e9543 Fix workflow activate last version (#9243)
Fix workflow activate last version being displayed when it shouldn't be.
2024-12-26 16:14:04 +01:00
a3788dc777 Scroll vertical-horizontal visibility seperation (#9221)
fixes #9208
2024-12-26 16:03:22 +01:00
fdfa0935a1 Fix see versions and runs hooks (#9244)
<img width="871" alt="Capture d’écran 2024-12-26 à 15 04 27"
src="https://github.com/user-attachments/assets/40a37230-59be-4d9b-ae43-cebbf94e1b47"
/>

Filters had been broken by this PR
86d74724fb (diff-eb3ca3591567c47e75165b8279bd2a51f8dd77810a643cba0d9c317d2f77107eR19)
2024-12-26 15:40:31 +01:00
522c6c2a8c Fix right drawer actions (#9241)
https://github.com/user-attachments/assets/107e6058-633f-4caa-967c-7017bef75d52
2024-12-26 14:16:36 +01:00
2da3d83a41 Fix creation of a new view duplicating existing filters (#9240)
Fixes #9239
2024-12-26 11:43:05 +01:00
f63b0a235a Make record name editable on show page (#9172)
When fields are not displayed in show page, title should be editable



https://github.com/user-attachments/assets/049c2998-6944-46c7-9e9e-f6d29da06c6c
2024-12-26 10:59:17 +01:00
29d364fa7b Floating inputs border radius fix (#9237)
closes #9230
2024-12-26 14:18:23 +05:30
1f789a8b95 search in settings phones (#9228)
tiny PR to add the search feature in the  phones settings dropdown

was a request from @Bonapara a month ago :)
2024-12-24 15:36:18 +00:00
cba38ab496 Fixed relations (#9227)
Follow-up : Fixed relations eager load on refactored hooks from PR
https://github.com/twentyhq/twenty/pull/8695
2024-12-24 15:59:25 +01:00
2dcfaeac73 Restore "Fix "Create profile" page not supporting dark mode (#8110)" & Fix string defaultValues during sync-metadata (#9220)
Restoring https://github.com/twentyhq/twenty/pull/9185
Also fixing sync-metadata with test values in jsonb

## Test
sync-metadata on existing workspaces should replace colorSchema in both
metadata and workspaceMember tables
2024-12-24 15:09:04 +01:00
e9717603f2 Refactored and improved seeds (#8695)
- Added a new Seeder service to help with custom object seeds
- Added RichTextFieldInput to edit a rich text field directly on the
table, but deactivated it for now.
2024-12-24 14:44:52 +01:00
4f329d6005 Ensure step is selected after creation when a new version has to be created (#9218)
Fixes
https://discord.com/channels/1130383047699738754/1318606664202715156/1318606664202715156
2024-12-24 14:43:10 +01:00
d2abd59a51 Make the workflow's visualizer layout more stable (#9203)
We no longer reset the state of Reactflow when the selected workflow
version changes. The viewport is not reset when discarding a draft
version but it looks better that way.


https://github.com/user-attachments/assets/0df9fa52-c44a-4aea-a504-4765542101fa

Fixes
https://discord.com/channels/1130383047699738754/1319626151768883300/1319626151768883300
2024-12-24 14:42:35 +01:00
53f0cd7205 refactor(workspace): clean up resolver and improve error handling (#9225)
Removed unused `LoginTokenService` imports and dependencies for better
code clarity. Enhanced error handling in
`getPublicWorkspaceDataBySubdomain` with a try-catch block, ensuring
consistent exception handling. This improves maintainability and
robustness of the resolver.
2024-12-24 14:41:20 +01:00
612f20e925 Add backup commands to documentation (#9224)
In documentation, there's mention to make a backup of database before
upgrading Twenty but there are no commands how to do it, so this PR
solves this problem by providing commands
2024-12-24 13:57:39 +01:00
cd2946b670 refacto(*): remove everything about default workspace (#9157)
## Summary
- [x] Remove defaultWorkspace in user
- [x] Remove all occurrence of defaultWorkspace and defaultWorkspaceId
- [x] Improve activate workspace flow
- [x] Improve security on social login
- [x] Add `ImpersonateGuard`
- [x] Allow to use impersonation with couple `User/Workspace`
- [x] Prevent unexpected reload on activate workspace
- [x] Scope login token with workspaceId 

Fix https://github.com/twentyhq/twenty/issues/9033#event-15714863042
2024-12-24 11:47:41 +00:00
fe6948ba0b fix: settings form select menu (#9179)
Closes: #8647 
Closes: #8649 

**Changes & Why**

1. Added a Search Input to `SettingsDataModelFieldAddressForm` &
`SettingsDataModelFieldCurrencyForm` as `Select` component already
accepts it as a prop.
2. Gave a fixed width to the dropdown of both the above components to
ensure it doesn't shrink on search for the menu items with low word
count.
3. Added countries Flag to `SettingsDataModelFieldAddressForm`. 
4. Replaced `MenuItem` with `MenuItemSelect` to get the desired
highlighted background for the selected item with `IconCheck` to
differentiate the current selected item. This is useful across all the
select components throughout the app.
5. I realized that in some components we might not need IconCheck and
only need a highlighted background for the selected item. For ex:
`SettingsDataModelFieldBooleanForm` . Therefore, I created a prop
`needIconCheck` with default as true so it doesn't break the existing
`MenuItemSelect` and we can pass that prop as false wherever needed.

[Screencast from 2024-12-21
12-08-08.webm](https://github.com/user-attachments/assets/4f8070a8-f339-4556-a137-bbbad58b171c)
2024-12-24 12:24:40 +01:00
801bf7c016 quick fix for positionInViewFilterGroup (#9223)
fix 9206

In the future, we should have a look at the column naming
"positionInViewFilterGroup"
because it breaks the SQL queries in `record-position-query.factory.ts`
for viewFilter tablenames
2024-12-24 10:49:50 +00:00
b52c23bb66 feat(database): Add trigger to set impersonation on first user (#9195)
Introduced a trigger to automatically set `canImpersonate` to true for
the first user inserted into the `core.user` table. The trigger is
removed after the first user is added to ensure this behavior only
applies to the initial user. Includes both the creation and rollback
logic for the migration.

Close https://github.com/twentyhq/twenty/issues/9173
2024-12-24 09:52:57 +01:00
86d74724fb Current workspace member filter (#8016) (#9182)
New branch based on feedback in PR #8950 and issue #8016

---------

Co-authored-by: ad-elias <elias@autodiligence.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-12-23 18:55:13 +01:00
49da7d2ca0 Tablist fix (#9216) 2024-12-23 17:31:04 +01:00
b3c1f62a5f collapsed navigationDrawerItem width fix (#9211)
Before: 

<img width="81" alt="Screenshot 2024-12-23 at 9 25 25 PM"
src="https://github.com/user-attachments/assets/d4c07ed5-0953-422f-aabf-fa2ca10ba7e5"
/>

After: 

<img width="76" alt="Screenshot 2024-12-23 at 9 25 11 PM"
src="https://github.com/user-attachments/assets/1ea6d64e-8c1f-4d0c-9b34-f8dceae9538d"
/>
2024-12-23 17:04:29 +01:00
74cf00a36d Fixed dragging with empty orphan favorites (#9205)
Created a resizable container tied to dragging state to create suitable
droppable zone when there's no orphan favorites.

Co-authored-by: Weiko <corentin@twenty.com>
2024-12-23 15:57:09 +01:00
3eff317b59 Remove favorite folder related feature flags (#9178)
Co-authored-by: Weiko <corentin@twenty.com>
2024-12-23 15:56:56 +01:00
061c92069f Fix position calculations -- favorites (#9202)
Co-authored-by: Weiko <corentin@twenty.com>
2024-12-23 14:45:01 +00:00
691fbbe576 Fix show page navigation bugs (#9199)
Fixes total count bug that was -1 the total count
Fixes a bug when trying to go from first to last or the other way around
Fixes a React array key bug

Follow-up issue (non critical) :
https://github.com/twentyhq/twenty/issues/9197
2024-12-23 14:24:15 +01:00
6abe735cad Fix optimistic rendering when deleting multiple records (#9198)
Fixes
https://discord.com/channels/1130383047699738754/1319676302944370730/1319676302944370730
2024-12-23 14:19:25 +01:00
c947040137 Revert "Fix "Create profile" page not supporting dark mode (#8110)" (#9201)
Reverts twentyhq/twenty#9185
This PR breaks sync-metadata, will merge back after 0.35
2024-12-23 14:11:41 +01:00
ee0282bcc8 refacto(auth): Simplify workspace lookup and cleanup UI logic (#9160)
Streamlined workspace selection by defaulting to the first available
workspace. Adjusted conditional rendering for a separator between
authentication providers, improving clarity and reducing redundancy.
Minor formatting changes were also applied for consistency.

Close #9094
2024-12-23 13:17:00 +01:00
164f010501 Use uuid package instead of crypto package (#9191)
Fixes #9186
2024-12-23 12:04:15 +01:00
80bc38fc96 update upgrade guide for 0.35 (#9190) 2024-12-23 11:39:19 +01:00
093f627e1d fix(auth): adjust button variant based on sign-in-up step (#9188)
Update the button variant to dynamically switch between 'secondary' and
'primary' based on the current step in the sign-in-up flow. Ensures the
UI reflects the correct state, improving user experience and
consistency.
2024-12-23 11:30:36 +01:00
7d57d61f47 Fix "Create profile" page not supporting dark mode (#8110) (#9185)
Fixes issue #8110

Co-authored-by: ad-elias <elias@autodiligence.com>
2024-12-23 11:06:10 +01:00
f71527bf6d Fixes before 0-35 release (#9176)
Co-authored-by: Weiko <corentin@twenty.com>
2024-12-23 10:56:25 +01:00
2651379ccc Add automatic company logo fetching during workspace creation (#9158)
Closes #9151 

## Description
This PR automatically sets a workspace's logo based on the user's work
email domain during signup. When a user creates a new workspace using
their work email (e.g., @airbnb.com), the system will fetch and set
their company logo from twenty-icons.com as the default workspace logo.

## Implementation Details
- Added a new `CompanyEnrichmentService` to handle company-related data
enrichment
- Created a modular architecture that supports future enrichment
features (e.g., company name, details)
- Integrated with existing work email detection
- Maintains user ability to override the logo later

## Testing

https://github.com/user-attachments/assets/f7855c99-462a-4053-9e52-29649e954275


I tested the following scenarios:
- Signing up with a work email (e.g., @company.com) → Logo is
automatically set
- Signing up with a personal email (e.g., @gmail.com) → No logo is set
- User can still upload a custom logo after automatic setting

## Technical Notes
- Uses existing `isWorkEmail` utility
- Structured for future extensibility (additional company data
enrichment)
- No breaking changes to existing functionality

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2024-12-22 09:24:27 +01:00
03f89791b6 Add upgrade 0.35 command module (#9175)
Moving commands from 0.40 to 0.35 since they should be ready for 0.35.
2024-12-20 18:18:56 +01:00
c992be1694 Workspace logo is not visible (#9174)
Fixing "Workspace logo is not visible in the navbar" report issue from
@Weiko
2024-12-20 18:15:02 +01:00
8f3fbeccb1 wrote 0.35 changelog (#9171)
Favorites
2024-12-20 16:48:18 +01:00
1eee99cfd6 Don't register delete multiple records action when deleted filter is active (#9170)
Don't register delete multiple records action when deleted filter is
active
2024-12-20 15:49:55 +01:00
928c99a725 Phone country fix (#9167) 2024-12-20 15:28:17 +01:00
d08075f610 Command menu actions fixes (#9169)
- Fix command menu not closing after executing an action
- Add delete and favorite actions to workflow and workflow versions
2024-12-20 13:42:01 +00:00
f65a90d137 minor fix -- datamodel multiselect edit form dropdowns (#9168)
made sure dropdown gets unique ids.
2024-12-20 14:17:13 +01:00