The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
fix(front): scroll long content in rich text editor (#20319)
Nick51202d5a3225
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/RichTextFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/RichTextFieldInput.tsxindex ab5ca9a697e..752ec6e7e95 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/RichTextFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/RichTextFieldInput.tsx@@ -31,16 +31,26 @@ const RichTextFieldEditor = lazy(() =>);const StyledContainer = styled.div`+ align-items: flex-start;background-color: ${themeCssVariables.background.primary};box-sizing: border-box;display: flex;margin: 0 0 0 calc(-1 * ${themeCssVariables.spacing[5]});+ max-height: min(60vh, 500px);+ overflow: hidden;padding: ${themeCssVariables.spacing[2]} ${themeCssVariables.spacing[2]}${themeCssVariables.spacing[2]} ${themeCssVariables.spacing[12]};position: relative;width: 480px;`;+const StyledEditorScroll = styled.div`+ align-self: stretch;+ flex: 1;+ min-height: 0;+ overflow-y: auto;+`;+const StyledCollapseButton = styled.div`border-radius: ${themeCssVariables.border.radius.md};color: ${themeCssVariables.font.color.light};@@ -104,20 +114,22 @@ export const RichTextFieldInput = () => {return (<StyledContainer ref={containerRef}>- <Suspense fallback={<LoadingSkeleton />}>- {isActivityObject(objectNameSingular) ? (- <ActivityRichTextEditor- activityId={recordId}- activityObjectNameSingular={objectNameSingular}- />- ) : (- <RichTextFieldEditor- recordId={recordId}- objectNameSingular={objectNameSingular}- fieldName={fieldName}- />- )}- </Suspense>+ <StyledEditorScroll>+ <Suspense fallback={<LoadingSkeleton />}>+ {isActivityObject(objectNameSingular) ? (+ <ActivityRichTextEditor+ activityId={recordId}+ activityObjectNameSingular={objectNameSingular}+ />+ ) : (+ <RichTextFieldEditor+ recordId={recordId}+ objectNameSingular={objectNameSingular}+ fieldName={fieldName}+ />+ )}+ </Suspense>+ </StyledEditorScroll><StyledCollapseButton><FloatingIconButtonIcon={IconLayoutSidebarLeftCollapse}diff --git a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellEditMode.tsx b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellEditMode.tsxindex 87ffb3a9ed6..84da5c1130d 100644--- a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellEditMode.tsx+++ b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellEditMode.tsx@@ -12,6 +12,7 @@ import {autoUpdate,flip,offset,+ shift,useFloating,type MiddlewareState,} from '@floating-ui/react';@@ -82,6 +83,7 @@ export const RecordInlineCellEditMode = ({crossAxis: -5,},),+ shift({ padding: 8 }),setFieldInputLayoutDirectionMiddleware,],whileElementsMounted: autoUpdate,diff --git a/packages/twenty-front/src/modules/side-panel/components/SidePanelContainer.tsx b/packages/twenty-front/src/modules/side-panel/components/SidePanelContainer.tsxindex 1da5279e103..c8934a601e8 100644--- a/packages/twenty-front/src/modules/side-panel/components/SidePanelContainer.tsx+++ b/packages/twenty-front/src/modules/side-panel/components/SidePanelContainer.tsx@@ -22,6 +22,7 @@ const StyledSidePanelContainer = styled.div<{ isMobile: boolean }>`return `calc(100% - ${mobileOffset})`;}};+ min-height: 0;`;type SidePanelContainerProps = {diff --git a/packages/twenty-front/src/modules/side-panel/components/SidePanelRouter.tsx b/packages/twenty-front/src/modules/side-panel/components/SidePanelRouter.tsxindex f55168ae8d3..55faff84ac0 100644--- a/packages/twenty-front/src/modules/side-panel/components/SidePanelRouter.tsx+++ b/packages/twenty-front/src/modules/side-panel/components/SidePanelRouter.tsx@@ -15,6 +15,7 @@ import { ThemeContext } from 'twenty-ui/theme-constants';const StyledSidePanelContent = styled.div`flex: 1;+ min-height: 0;overflow-y: auto;`;