Skip to content

Commit ca8d756

Browse files
Merge branch 'main' into TWNTY-3514-1
2 parents c51c3a3 + 0349d02 commit ca8d756

File tree

351 files changed

+12911
-10422
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

351 files changed

+12911
-10422
lines changed

.github/CONTRIBUTING.md

+12-8
Original file line numberDiff line numberDiff line change
@@ -42,35 +42,39 @@ Therefore, ensure you are assigned to an issue before beginning work on it.
4242
git clone https://github.com/yourusername/twenty.git
4343
cd twenty
4444
```
45+
3. **Create a New Branch:** Create a new branch for your changes instead of using the main branch.
4546

47+
```shell
48+
git checkout -b your-branch-name
49+
```
4650

47-
3. **Make Changes:** Make your desired changes and ensure that your code adheres to Twenty's coding standards.
51+
4. **Make Changes:** Make your desired changes and ensure that your code adheres to Twenty's coding standards.
4852

4953

50-
4. **Test Locally:** Test your changes locally to ensure they work as expected.
54+
5. **Test Locally:** Test your changes locally to ensure they work as expected.
5155

5256

53-
5. **Commit Changes:** Commit your changes with a clear and concise commit message.
57+
6. **Commit Changes:** Commit your changes with a clear and concise commit message.
5458

5559

5660
```shell
5761
git commit -m "Add your detailed description here"
5862
```
59-
6. **Push Changes:** Push your changes to your forked repository.
63+
7. **Push Changes:** Push your changes to your forked repository.
6064

6165

6266
```shell
63-
git push origin branch-name
67+
git push origin your-branch-name
6468
```
6569

6670

67-
7. **Create a Pull Request:** Go to the original Twenty repository and create a pull request. Please provide a detailed description of your changes. To have your pull request accepted, you must sign a CLA.
71+
8. **Create a Pull Request:** Go to the original Twenty repository and create a pull request. Please provide a detailed description of your changes. To have your pull request accepted, you must sign a CLA.
6872

6973

70-
8. **Code Review:** Your pull request will undergo a code review. Note that you might need to make any necessary adjustments based on feedback.
74+
9. **Code Review:** Your pull request will undergo a code review. Note that you might need to make any necessary adjustments based on feedback.
7175

7276

73-
9. **Merge:** Once approved, maintainers will merge your pull request into the main repository.
77+
10. **Merge:** Once approved, maintainers will merge your pull request into the main repository.
7478

7579

7680
<br>

.yarn/releases/yarn-4.0.2.cjs

-893
This file was deleted.

.yarn/releases/yarn-4.3.1.cjs

+894
Large diffs are not rendered by default.

.yarnrc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ enableInlineHunks: true
22

33
nodeLinker: node-modules
44

5-
yarnPath: .yarn/releases/yarn-4.0.2.cjs
5+
yarnPath: .yarn/releases/yarn-4.3.1.cjs

package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
"@aws-sdk/client-lambda": "^3.614.0",
77
"@aws-sdk/client-s3": "^3.363.0",
88
"@aws-sdk/credential-providers": "^3.363.0",
9-
"@blocknote/core": "^0.12.1",
10-
"@blocknote/react": "^0.12.2",
9+
"@blocknote/core": "^0.15.3",
10+
"@blocknote/mantine": "^0.15.3",
11+
"@blocknote/react": "^0.15.3",
1112
"@chakra-ui/accordion": "^2.3.0",
1213
"@chakra-ui/system": "^2.6.0",
1314
"@codesandbox/sandpack-react": "^2.13.5",
@@ -192,6 +193,7 @@
192193
"tsup": "^8.0.1",
193194
"type-fest": "4.10.1",
194195
"typeorm": "^0.3.20",
196+
"typescript": "5.3.3",
195197
"use-context-selector": "^2.0.0",
196198
"use-debounce": "^10.0.0",
197199
"uuid": "^9.0.0",
@@ -333,7 +335,6 @@
333335
"ts-node": "10.9.1",
334336
"tsconfig-paths": "^4.2.0",
335337
"tsx": "^4.7.2",
336-
"typescript": "5.3.3",
337338
"vite": "^5.0.0",
338339
"vite-plugin-checker": "^0.6.2",
339340
"vite-plugin-dts": "3.8.1",
@@ -347,7 +348,7 @@
347348
},
348349
"license": "AGPL-3.0",
349350
"name": "twenty",
350-
"packageManager": "yarn@4.0.2",
351+
"packageManager": "yarn@4.3.1",
351352
"resolutions": {
352353
"graphql": "16.8.0",
353354
"type-fest": "4.10.1",

packages/twenty-chrome-extension/src/generated/graphql.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -3077,8 +3077,8 @@ export type MessageChannelSyncStageEnumFilter = {
30773077

30783078
/** Sync status */
30793079
export enum MessageChannelSyncStatusEnum {
3080-
/** Completed */
3081-
Completed = 'COMPLETED',
3080+
/** Active */
3081+
Active = 'ACTIVE',
30823082
/** Failed */
30833083
Failed = 'FAILED',
30843084
/** Failed Insufficient Permissions */

packages/twenty-docker/twenty/entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ if [ "${ENABLE_DB_MIGRATIONS}" = "true" ] && [ ! -f /app/docker-data/db_status ]
55
echo "Running database setup and migrations..."
66

77
# Run setup and migration scripts
8-
npx ts-node ./scripts/setup-db.ts
8+
NODE_OPTIONS="--max-old-space-size=1500" npx ts-node ./scripts/setup-db.ts
99
yarn database:migrate:prod
1010

1111
# Mark initialization as done

packages/twenty-front/project.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"test": {},
6262
"storybook:build": {
6363
"options": {
64-
"env": { "NODE_OPTIONS": "--max_old_space_size=5000" }
64+
"env": { "NODE_OPTIONS": "--max_old_space_size=6000" }
6565
}
6666
},
6767
"storybook:serve:dev": {

packages/twenty-front/src/App.tsx

+18-2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ import { SettingsAccounts } from '~/pages/settings/accounts/SettingsAccounts';
5555
import { SettingsAccountsCalendars } from '~/pages/settings/accounts/SettingsAccountsCalendars';
5656
import { SettingsAccountsEmails } from '~/pages/settings/accounts/SettingsAccountsEmails';
5757
import { SettingsNewAccount } from '~/pages/settings/accounts/SettingsNewAccount';
58+
import { SettingsCRMMigration } from '~/pages/settings/crm-migration/SettingsCRMMigration';
5859
import { SettingsNewObject } from '~/pages/settings/data-model/SettingsNewObject';
5960
import { SettingsObjectDetail } from '~/pages/settings/data-model/SettingsObjectDetail';
6061
import { SettingsObjectEdit } from '~/pages/settings/data-model/SettingsObjectEdit';
@@ -81,6 +82,7 @@ import { SettingsWorkspace } from '~/pages/settings/SettingsWorkspace';
8182
import { SettingsWorkspaceMembers } from '~/pages/settings/SettingsWorkspaceMembers';
8283
import { Tasks } from '~/pages/tasks/Tasks';
8384
import { getPageTitleFromPath } from '~/utils/title-utils';
85+
import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
8486

8587
const ProvidersThatNeedRouterContext = () => {
8688
const { pathname } = useLocation();
@@ -125,7 +127,10 @@ const ProvidersThatNeedRouterContext = () => {
125127
);
126128
};
127129

128-
const createRouter = (isBillingEnabled?: boolean) =>
130+
const createRouter = (
131+
isBillingEnabled?: boolean,
132+
isCRMMigrationEnabled?: boolean,
133+
) =>
129134
createBrowserRouter(
130135
createRoutesFromElements(
131136
<Route
@@ -222,6 +227,12 @@ const createRouter = (isBillingEnabled?: boolean) =>
222227
path={SettingsPath.Developers}
223228
element={<SettingsDevelopers />}
224229
/>
230+
{isCRMMigrationEnabled && (
231+
<Route
232+
path={SettingsPath.CRMMigration}
233+
element={<SettingsCRMMigration />}
234+
/>
235+
)}
225236
<Route
226237
path={AppPath.DevelopersCatchAll}
227238
element={
@@ -292,6 +303,11 @@ const createRouter = (isBillingEnabled?: boolean) =>
292303

293304
export const App = () => {
294305
const billing = useRecoilValue(billingState);
306+
const isCRMMigrationEnabled = useIsFeatureEnabled('IS_CRM_MIGRATION_ENABLED');
295307

296-
return <RouterProvider router={createRouter(billing?.isBillingEnabled)} />;
308+
return (
309+
<RouterProvider
310+
router={createRouter(billing?.isBillingEnabled, isCRMMigrationEnabled)}
311+
/>
312+
);
297313
};

packages/twenty-front/src/effect-components/PageChangeEffect.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,9 @@ export const PageChangeEffect = () => {
165165
useEffect(() => {
166166
if (
167167
isCaptchaScriptLoaded &&
168-
isMatchingLocation(AppPath.SignInUp || AppPath.Invite)
168+
(isMatchingLocation(AppPath.SignInUp) ||
169+
isMatchingLocation(AppPath.Invite) ||
170+
isMatchingLocation(AppPath.ResetPassword))
169171
) {
170172
requestFreshCaptchaToken();
171173
}

packages/twenty-front/src/hooks/useScrollRestoration.ts

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { scrollPositionState } from '@/ui/utilities/scroll/states/scrollPosition
77
import { isDefined } from '~/utils/isDefined';
88

99
/**
10+
* @deprecated We should now use useScrollToPosition instead
1011
* Note that `location.key` is used in the cache key, not `location.pathname`,
1112
* so the same path navigated to at different points in the history stack will
1213
* not share the same scroll position.

packages/twenty-front/src/loading/components/LeftPanelSkeletonLoader.tsx

+24-16
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,25 @@ import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';
88
import { MainNavigationDrawerItemsSkeletonLoader } from '~/loading/components/MainNavigationDrawerItemsSkeletonLoader';
99

1010
const StyledAnimatedContainer = styled(motion.div)`
11+
align-items: center;
1112
display: flex;
1213
justify-content: end;
1314
`;
1415

1516
const StyledItemsContainer = styled.div`
17+
align-items: center;
1618
display: flex;
1719
flex-direction: column;
18-
gap: 32px;
20+
gap: 12px;
21+
height: calc(100dvh - 32px);
1922
margin-bottom: auto;
23+
max-width: 204px;
24+
min-width: 204px;
2025
overflow-y: auto;
21-
height: calc(100dvh - 32px);
22-
min-width: 216px;
23-
max-width: 216px;
2426
`;
2527

2628
const StyledSkeletonContainer = styled.div`
29+
align-items: center;
2730
display: flex;
2831
flex-direction: column;
2932
gap: 32px;
@@ -32,9 +35,13 @@ const StyledSkeletonContainer = styled.div`
3235
const StyledSkeletonTitleContainer = styled.div`
3336
display: flex;
3437
flex-direction: column;
35-
gap: 6px;
36-
margin-left: 12px;
37-
margin-top: 8px;
38+
justify-content: center;
39+
align-items: flex-start;
40+
gap: 10px;
41+
height: 32px;
42+
43+
max-width: 196px;
44+
min-width: 196px;
3845
`;
3946

4047
export const LeftPanelSkeletonLoader = () => {
@@ -54,17 +61,18 @@ export const LeftPanelSkeletonLoader = () => {
5461
}}
5562
>
5663
<StyledItemsContainer>
64+
<StyledSkeletonTitleContainer>
65+
<SkeletonTheme
66+
baseColor={GRAY_SCALE.gray15}
67+
highlightColor={BACKGROUND_LIGHT.transparent.lighter}
68+
borderRadius={4}
69+
>
70+
<Skeleton width={96} height={16} />
71+
</SkeletonTheme>
72+
</StyledSkeletonTitleContainer>
5773
<StyledSkeletonContainer>
58-
<StyledSkeletonTitleContainer>
59-
<SkeletonTheme
60-
baseColor={GRAY_SCALE.gray15}
61-
highlightColor={BACKGROUND_LIGHT.transparent.lighter}
62-
borderRadius={4}
63-
>
64-
<Skeleton width={96} height={16} />
65-
</SkeletonTheme>
66-
</StyledSkeletonTitleContainer>
6774
<MainNavigationDrawerItemsSkeletonLoader length={3} />
75+
<MainNavigationDrawerItemsSkeletonLoader title length={2} />
6876
<MainNavigationDrawerItemsSkeletonLoader title length={3} />
6977
</StyledSkeletonContainer>
7078
</StyledItemsContainer>

packages/twenty-front/src/loading/components/MainNavigationDrawerItemsSkeletonLoader.tsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';
21
import styled from '@emotion/styled';
2+
import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';
33
import { BACKGROUND_LIGHT, GRAY_SCALE } from 'twenty-ui';
44

55
const StyledSkeletonContainer = styled.div`
6+
align-items: flex-start;
7+
68
display: flex;
79
flex-direction: column;
810
gap: 6px;
9-
margin-left: 12px;
10-
margin-top: 8px;
11+
min-width: 196px;
12+
max-width: 196px;
1113
`;
1214

1315
export const MainNavigationDrawerItemsSkeletonLoader = ({

packages/twenty-front/src/loading/components/RightPanelSkeletonLoader.tsx

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';
21
import styled from '@emotion/styled';
2+
import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';
33
import {
44
BACKGROUND_LIGHT,
55
BORDER_COMMON,
@@ -45,8 +45,11 @@ const StyledRightPanelContainer = styled.div`
4545

4646
const StyledRightPanelFlexContainer = styled.div`
4747
display: flex;
48-
margin-top: 12px;
49-
margin-bottom: 14px;
48+
flex-direction: row;
49+
justify-content: flex-end;
50+
align-items: center;
51+
height: 32px;
52+
margin-bottom: 12px;
5053
`;
5154

5255
const StyledSkeletonHeaderLoader = () => {

packages/twenty-front/src/loading/components/UserOrMetadataLoader.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const StyledContainer = styled.div`
1414
height: 100dvh;
1515
min-width: ${DESKTOP_NAV_DRAWER_WIDTHS.menu}px;
1616
width: 100%;
17-
padding: 12px 8px 12px;
17+
padding: 12px 8px 12px 8px;
1818
overflow: hidden;
1919
2020
@media (max-width: ${MOBILE_VIEWPORT}px) {

packages/twenty-front/src/modules/activities/blocks/FileBlock.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { ChangeEvent, useRef } from 'react';
21
import { createReactBlockSpec } from '@blocknote/react';
32
import styled from '@emotion/styled';
43
import { isNonEmptyString } from '@sniptt/guards';
4+
import { ChangeEvent, useRef } from 'react';
55

66
import { Button } from '@/ui/input/button/components/Button';
77
import { AppThemeProvider } from '@/ui/theme/components/AppThemeProvider';
@@ -65,6 +65,10 @@ export const FileBlock = createReactBlockSpec(
6565
}
6666
const fileUrl = await editor.uploadFile?.(file);
6767

68+
if (!isNonEmptyString(fileUrl)) {
69+
return '';
70+
}
71+
6872
editor.updateBlock(block.id, {
6973
props: {
7074
...block.props,

packages/twenty-front/src/modules/activities/blocks/slashMenu.tsx

+8
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@ import {
55
IconH1,
66
IconH2,
77
IconH3,
8+
IconHeadphones,
89
IconList,
10+
IconListCheck,
911
IconListNumbers,
12+
IconMoodSmile,
1013
IconPhoto,
1114
IconPilcrow,
1215
IconTable,
16+
IconVideo,
1317
} from 'twenty-ui';
1418

1519
import { SuggestionItem } from '@/ui/input/editor/components/CustomSlashMenu';
@@ -22,9 +26,13 @@ const Icons: Record<string, IconComponent> = {
2226
'Heading 3': IconH3,
2327
'Numbered List': IconListNumbers,
2428
'Bullet List': IconList,
29+
'Check List': IconListCheck,
2530
Paragraph: IconPilcrow,
2631
Table: IconTable,
2732
Image: IconPhoto,
33+
Video: IconVideo,
34+
Audio: IconHeadphones,
35+
Emoji: IconMoodSmile,
2836
};
2937

3038
export const getSlashMenu = (editor: typeof blockSchema.BlockNoteEditor) => {

packages/twenty-front/src/modules/activities/components/ActivityBodyEditor.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { ClipboardEvent, useCallback, useMemo } from 'react';
21
import { useApolloClient } from '@apollo/client';
32
import { useCreateBlockNote } from '@blocknote/react';
43
import { isArray, isNonEmptyString } from '@sniptt/guards';
4+
import { ClipboardEvent, useCallback, useMemo } from 'react';
55
import { useRecoilCallback, useRecoilState } from 'recoil';
66
import { Key } from 'ts-key-enum';
77
import { useDebouncedCallback } from 'use-debounce';
@@ -30,7 +30,8 @@ import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';
3030

3131
import { getFileType } from '../files/utils/getFileType';
3232

33-
import '@blocknote/react/style.css';
33+
import '@blocknote/core/fonts/inter.css';
34+
import '@blocknote/mantine/style.css';
3435

3536
type ActivityBodyEditorProps = {
3637
activityId: string;

0 commit comments

Comments
 (0)