Fix Dockerfile twenty to take twenty-shared into account

This commit is contained in:
Charles Bochet
2024-12-17 15:42:36 +01:00
parent 860dec3428
commit e0dfa9519a
2 changed files with 4 additions and 14 deletions

View File

@ -11,6 +11,7 @@ COPY ./packages/twenty-emails/package.json /app/packages/twenty-emails/
COPY ./packages/twenty-server/package.json /app/packages/twenty-server/ COPY ./packages/twenty-server/package.json /app/packages/twenty-server/
COPY ./packages/twenty-server/patches /app/packages/twenty-server/patches COPY ./packages/twenty-server/patches /app/packages/twenty-server/patches
COPY ./packages/twenty-ui/package.json /app/packages/twenty-ui/ COPY ./packages/twenty-ui/package.json /app/packages/twenty-ui/
COPY ./packages/twenty-shared/package.json /app/packages/twenty-shared/
COPY ./packages/twenty-front/package.json /app/packages/twenty-front/ COPY ./packages/twenty-front/package.json /app/packages/twenty-front/
# Install all dependencies # Install all dependencies
@ -22,6 +23,7 @@ FROM common-deps as twenty-server-build
# Copy sourcecode after installing dependences to accelerate subsequents builds # Copy sourcecode after installing dependences to accelerate subsequents builds
COPY ./packages/twenty-emails /app/packages/twenty-emails COPY ./packages/twenty-emails /app/packages/twenty-emails
COPY ./packages/twenty-shared /app/packages/twenty-shared
COPY ./packages/twenty-server /app/packages/twenty-server COPY ./packages/twenty-server /app/packages/twenty-server
RUN npx nx run twenty-server:build RUN npx nx run twenty-server:build
@ -31,7 +33,7 @@ RUN mv /app/packages/twenty-server/dist/package.json /app/packages/twenty-server
RUN rm -rf /app/packages/twenty-server/dist RUN rm -rf /app/packages/twenty-server/dist
RUN mv /app/packages/twenty-server/build /app/packages/twenty-server/dist RUN mv /app/packages/twenty-server/build /app/packages/twenty-server/dist
RUN yarn workspaces focus --production twenty-emails twenty-server RUN yarn workspaces focus --production twenty-emails twenty-shared twenty-server
# Build the front # Build the front
@ -41,6 +43,7 @@ ARG REACT_APP_SERVER_BASE_URL
COPY ./packages/twenty-front /app/packages/twenty-front COPY ./packages/twenty-front /app/packages/twenty-front
COPY ./packages/twenty-ui /app/packages/twenty-ui COPY ./packages/twenty-ui /app/packages/twenty-ui
COPY ./packages/twenty-shared /app/packages/twenty-shared
RUN npx nx build twenty-front RUN npx nx build twenty-front

View File

@ -8,7 +8,6 @@ import { useDebouncedCallback } from 'use-debounce';
import { v4 } from 'uuid'; import { v4 } from 'uuid';
import { useUpsertActivity } from '@/activities/hooks/useUpsertActivity'; import { useUpsertActivity } from '@/activities/hooks/useUpsertActivity';
import { activityBodyFamilyState } from '@/activities/states/activityBodyFamilyState';
import { activityTitleHasBeenSetFamilyState } from '@/activities/states/activityTitleHasBeenSetFamilyState'; import { activityTitleHasBeenSetFamilyState } from '@/activities/states/activityTitleHasBeenSetFamilyState';
import { canCreateActivityState } from '@/activities/states/canCreateActivityState'; import { canCreateActivityState } from '@/activities/states/canCreateActivityState';
import { ActivityEditorHotkeyScope } from '@/activities/types/ActivityEditorHotkeyScope'; import { ActivityEditorHotkeyScope } from '@/activities/types/ActivityEditorHotkeyScope';
@ -55,12 +54,6 @@ export const RichTextEditor = ({
}), }),
); );
const [activityBody, setActivityBody] = useRecoilState(
activityBodyFamilyState({
activityId: activityId,
}),
);
const { objectMetadataItem: objectMetadataItemActivity } = const { objectMetadataItem: objectMetadataItemActivity } =
useObjectMetadataItem({ useObjectMetadataItem({
objectNameSingular: activityObjectNameSingular, objectNameSingular: activityObjectNameSingular,
@ -241,12 +234,6 @@ export const RichTextEditor = ({
const handleBodyChangeDebounced = useDebouncedCallback(handleBodyChange, 500); const handleBodyChangeDebounced = useDebouncedCallback(handleBodyChange, 500);
// See https://github.com/twentyhq/twenty/issues/6724 for explanation
const setActivityBodyDebouncedToAvoidDragBug = useDebouncedCallback(
setActivityBody,
100,
);
const handleEditorChange = () => { const handleEditorChange = () => {
const newStringifiedBody = JSON.stringify(editor.document) ?? ''; const newStringifiedBody = JSON.stringify(editor.document) ?? '';