Commit Graph

4771 Commits

Author SHA1 Message Date
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
52362812a5 Catch workspace issues in backfill upgrade commands 2024-12-20 12:11:05 +01:00
2e216e7a73 Icon alignment in NavigationDrawerItems (#9164)
Icons are not aligned to the labels
before:
<img width="387" alt="Screenshot 2024-12-20 at 4 09 01 PM"
src="https://github.com/user-attachments/assets/c115abcd-9779-4597-b40e-6ceceeaa13b9"
/>

after: 

<img width="387" alt="Screenshot 2024-12-20 at 4 08 36 PM"
src="https://github.com/user-attachments/assets/a0535030-a810-4023-b677-8380b833f712"
/>
2024-12-20 11:53:21 +01:00
f499c728fd Fix activity editor (#9165) 2024-12-20 11:52:00 +01:00
0d2bfad3c9 Separate date and datetime components (#9161)
Add a 2 components solution for FormDate and FormDateTime
2024-12-20 10:50:30 +00:00
779c503381 Fix sync metadata default value not being synced (#9163)
## Context
We used to not sync defaultValue and recently introduced a change in
3340f01c31/packages/twenty-server/src/engine/workspace-manager/workspace-sync-metadata/comparators/workspace-field.comparator.ts
with shouldNotOverrideDefaultValue to sync it for specific field
metadata type that can't be overwritten by the user.
This means we should have removed 'defaultValue' from
commonFieldPropertiesToIgnore list since it was handled differently.
This PR fixes that

Before
<img width="792" alt="Screenshot 2024-12-20 at 11 04 09"
src="https://github.com/user-attachments/assets/1771c5a3-2162-4013-8a08-c54d2619fda3"
/>

After
<img width="798" alt="Screenshot 2024-12-20 at 11 04 55"
src="https://github.com/user-attachments/assets/33e09f16-c615-4a43-950d-d2df955fb196"
/>
2024-12-20 11:42:42 +01:00
1acf845101 9018 fix batch delete follow ups (#9166)
Follow ups on #9018
2024-12-20 11:41:09 +01:00
2437572a5c Fix discard draft optimistic rendering (#9153)
Remove draft workflow version from cached workflow
2024-12-20 11:36:47 +01:00
925294675c 9018 fix batch delete (#9149)
Closes #9018
2024-12-20 10:46:24 +01:00
a0b5720831 Fix modals being unregistered inside command menu (#9155)
Fix modals being unregistered inside command menu
2024-12-20 10:45:22 +01:00
54c4d64ae8 Scrollable fixed dropdowns container minor refactor (#9159)
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-12-20 10:43:48 +01:00
94136d953e 8749 invalid openapi schema (#9156) 2024-12-20 09:56:22 +01:00
ded0a68b89 Fix tests 2024-12-19 17:49:29 +01:00
811002d8b9 Github CI workflow fix (#9137) 2024-12-19 17:01:58 +01:00
1d627039c0 Add possibility to destroy a record (#9144)
There are two follow ups to this PR:
- Bug: sometimes when opening Cmd+K from a deleted record, we are facing
a global error
- On Index page, actions in top right are displaying label and not short
name
- Implement multiple actions once refactoring on delete is complete

---------

Co-authored-by: bosiraphael <raphael.bosi@gmail.com>
2024-12-19 17:00:30 +01:00
360c34fd18 Phone country code unique (#9035)
fix #8775
2024-12-19 16:42:18 +01:00
3f58a41d2f Fix sort with pagination and composite fields (#9150)
Fixes https://github.com/twentyhq/twenty/issues/8863

## Description
This PR fixes an issue with cursor-based pagination when dealing with
composite fields (like `fullName`). Previously, the pagination direction
was incorrectly determined for composite fields because the code wasn't
properly handling nested object structures in the `orderBy` parameter.
Refactored the code accordingly.
2024-12-19 16:41:04 +01:00
ed56a68b7c Improve aggregate footer cell display (#9124)
Co-authored-by: Jérémy Magrin <jeremy.magrin@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-12-19 14:36:14 +00:00
7d8f895ae9 fix test (#9147) 2024-12-19 15:24:49 +01:00
53576245aa Fix version creation / update when opening an action (#9145)
Actions using tiptap trigger updates when called.

Flow is following:
- component using tiptap receive default value
- we separate the default value because we need to add specific
attributes to the editor when inserting breaks or variables
- editor performs an update for each value

It means that initialize our editor performs several updates. We need to
avoid persisting until the init finished.
2024-12-19 13:19:25 +00:00
784bc78ed0 add: objectName in fav folder (#8785)
Closes: #8549 

It was quite complex to get this right. So, I went through Notion's
website to see how they implemented it.
Instead of using `display: none` or having a space reserved for the
Icon, I used clip-path & opacity trick to achieve the desired behaviour.
This maintains accessibility and helps in label or ObjectName to take
the full space.

Also, truncation now works for label & objectName as a whole instead of
separately, as seen in my previous PR.

**Caveats**

The only problem that now remains is not having
`NavigationDrawerAnimatedCollapseWrapper`. Having it on top of any text
or div won't let the flex or truncation property work.

[Screencast from 2024-11-28
13-37-31.webm](https://github.com/user-attachments/assets/29255cd2-3f15-4b1d-b1e1-c041c70052e5)

---------

Co-authored-by: ehconitin <nitinkoche03@gmail.com>
Co-authored-by: martmull <martmull@hotmail.fr>
2024-12-19 11:51:03 +01:00
65586a00cc Add date time form field (#9133)
- Create a really simple abstraction to unify the date and date time
fields. We might dissociate them sooner than expected.
- The _relative_ setting is ignored
2024-12-19 10:46:21 +00:00
028e5cd940 add sync customer command and drop subscription customer constraint (#9131)
**TLDR:**
Solves (https://github.com/twentyhq/private-issues/issues/212)
Add command to sync customer data from stripe to BillingCustomerTable
for all active workspaces. Drop foreign key contraint on billingCustomer
in BillingSubscription (in order to not break the DB).

**In order to test:**

- Billing should be enabled
- Have some workspaces that are active and whose id's are not mentioned
in BillingCustomer (but the customer are present in stripe).

Run the command: 
`npx nx run twenty-server:command billing:sync-customer-data`

Take into consideration
Due that all the previous subscriptions in Stripe have the workspaceId
in their metadata, we use that information as source of true for the
data sync

**Things to do:**

- Add tests for Billing utils
- Separate StripeService into multipleServices
(stripeSubscriptionService, stripePriceService etc) perhaps add them in
(https://github.com/twentyhq/private-issues/issues/201)?
2024-12-19 11:30:05 +01:00
e84176dc0d Reactive form preview (#8663)
## Description

This PR fixes issues with field previews not updating immediately when
settings are changed in the Data Model Editor. The changes affect number
field types, ensuring that the preview updates in real-time as settings
are modified.

### Fixed Issues
- Number field preview not updating when changing decimals or number
type (e.g., percentage)

Recording

https://www.loom.com/share/14a30f67266d4a08a694c759ae06b0f3?sid=c0de35ef-9982-438b-b822-94ed106f6891

~~Fixes #8663~~
Fixes #8556

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-12-19 11:22:13 +01:00
32fef06734 Remove react hook form in send email action (#9130)
- remove react hook form
- put back multiline for body
2024-12-19 09:48:46 +00:00
7375ab8d71 Fix/refresh token (#9135) 2024-12-18 19:10:16 +01:00
5e03f4dfb1 fix icon shrink and use avatar for logo and icons (#9117)
- Fixed icon shrinking on tabs. The introduction of EllipsisDisplay
takes 100% of the width, thus shrinking the icons.
- Removed scroll wrapper tablist. This was removed in #9016 but
reintroduced in #9089. This reintroduction made the dark border below
the active tab disappear.
- Used Avatar for icon and logo rendering following the changes made in
#9093
2024-12-18 19:06:08 +01:00
a2423fad5e feat(auth): add workspaceId validation and token expiration (#9134)
Added validation to ensure refresh tokens include a workspaceId,
throwing an exception for malformed tokens. Included workspaceId in
payloads and introduced expiration handling for access tokens. This
enhances token security and prevents potential misuse.

Close #9126
2024-12-18 18:56:49 +01:00
f620fd3c18 Fixes person navigation after image upload (#9076)
Fixes #8949
2024-12-18 18:44:00 +01:00
71254bfca0 Fix workspace logo (#9129)
Follow up on:
https://github.com/twentyhq/twenty/issues/9042#issuecomment-2550886611
2024-12-18 18:09:52 +01:00
5586270df4 Remove buggy dependencies (#9115)
Fixes double download
2024-12-18 17:05:33 +00:00
f482b459a9 Remove workspace gates for aggregate fields metadata (#9125)
As part of our rollout strategy, let's remove the workspaces gates,
which will trigger the creation of the field metadatas needed for the
aggregate queries features.
In a later release we will remove the feature flag completely, after all
fields have been created for all workspaces
2024-12-18 17:45:10 +01:00
baf339567c Fix broken import on graphql api exception helper 2024-12-18 16:57:39 +01:00
2bcce44e08 feat(workspace): expand forbidden subdomain validation (#9082)
Added new forbidden words and regex patterns to subdomain validation in
`update-workspace-input`. Enhanced the `ForbiddenWords` validator to
support both strings and regex matching. Updated tests to verify
regex-based forbidden subdomain validation.

Fix #9064

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-12-18 16:46:59 +01:00
550756c2bf feat(auth): enhance workspace handling and error feedback (#9118)
Add support for setting a user's default workspace during sign-in if a
target workspace subdomain exists. Enhance error feedback by displaying
authentication error messages using a Snackbar in the front-end and
improving redirect logic for workspace-specific errors.
2024-12-18 16:46:25 +01:00
01fc70da0f fix: 3 first columns should be sticky view group (#9123)
Fix #9113 

<img width="591" alt="Screenshot 2024-12-18 at 3 33 05 PM"
src="https://github.com/user-attachments/assets/df55eff3-7b0d-4cf0-881b-167e1bf2f97b"
/>

<img width="543" alt="Screenshot 2024-12-18 at 3 34 37 PM"
src="https://github.com/user-attachments/assets/76fe06e1-0a46-4130-921d-1d480306bda2"
/>
2024-12-18 16:35:08 +01:00
94676215ad Add fields to update in update record action (#9108)
- update backend action so it handles composite fields
- add fields to update multiselect
- generate form based on that field
- add icons
2024-12-18 13:32:21 +00:00
b6508cc615 Add UUID form field input (#9121) 2024-12-18 14:26:35 +01:00
ae044c2fc8 fix: view group wrong cursor (#9119)
Wrong cursor was shown on `Load more` and `Add new` row in view group
mode
2024-12-18 12:54:09 +01:00
3b48920314 feat: NoValue is bot properly created the backend (#9110)
`No Value` view groups wasn't properly created when we select a group by
field metadata, this PR fix the issue.
Also a script is added to backfill the current view groups.

---------

Co-authored-by: Marie <51697796+ijreilly@users.noreply.github.com>
2024-12-18 12:26:38 +01:00
d895468ebe Removed unecessary dropdown container on MultiSelectFieldInput (#9116)
There was an unecessary dropdown menu container div that was conflicting
with the recent refactor of dropdowns. The OverlayContainer component is
now at the root of the tree of a cell.
2024-12-18 12:22:02 +01:00
45214fe548 Add no-seed configuration to database:reset (#9112)
Based on feedback here:
https://github.com/twentyhq/twenty/issues/9109#issuecomment-2550198035
2024-12-18 11:44:06 +01:00