Skip to content

The open alternative to Salesforce, designed for AI.

fix: Misalignment and Excessive Padding in Relation Card (#8292)

Harshit Singhd44f7a46b60d
diff --git a/packages/twenty-front/src/modules/object-record/record-inline-cell/property-box/components/PropertyBox.tsx b/packages/twenty-front/src/modules/object-record/record-inline-cell/property-box/components/PropertyBox.tsx
index 2750351e51f..6da09af2032 100644
--- a/packages/twenty-front/src/modules/object-record/record-inline-cell/property-box/components/PropertyBox.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-inline-cell/property-box/components/PropertyBox.tsx
@@ -12,6 +12,7 @@ export const StyledPropertyBoxContainer = styled.div`
flex-direction: column;
gap: ${({ theme }) => theme.spacing(2)};
padding: ${({ theme }) => theme.spacing(3)};
+ padding-right: ${({ theme }) => theme.spacing(2)};
`;
export const PropertyBox = ({ children, className }: PropertyBoxProps) => (
diff --git a/packages/twenty-front/src/modules/object-record/record-show/record-detail-section/components/RecordDetailRelationRecordsListItem.tsx b/packages/twenty-front/src/modules/object-record/record-show/record-detail-section/components/RecordDetailRelationRecordsListItem.tsx
index 899c0ddd39a..3d51e9d3823 100644
--- a/packages/twenty-front/src/modules/object-record/record-show/record-detail-section/components/RecordDetailRelationRecordsListItem.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-show/record-detail-section/components/RecordDetailRelationRecordsListItem.tsx
@@ -62,6 +62,14 @@ const StyledListItem = styled(RecordDetailRecordsListItem)<{
}
`;
+const StyledPropertyBox = styled(PropertyBox)`
+ align-items: flex-start;
+ display: flex;
+ padding-left: ${({ theme }) => theme.spacing(0)};
+ padding-top: ${({ theme }) => theme.spacing(1)};
+ padding-right: ${({ theme }) => theme.spacing(0)};
+`;
+
const StyledClickableZone = styled.div`
align-items: center;
cursor: pointer;
@@ -233,7 +241,7 @@ export const RecordDetailRelationRecordsListItem = ({
)}
</StyledListItem>
<AnimatedEaseInOut isOpen={isExpanded}>
- <PropertyBox>
+ <StyledPropertyBox>
{availableRelationFieldMetadataItems.map(
(fieldMetadataItem, index) => (
<FieldContext.Provider
@@ -258,7 +266,7 @@ export const RecordDetailRelationRecordsListItem = ({
</FieldContext.Provider>
),
)}
- </PropertyBox>
+ </StyledPropertyBox>
</AnimatedEaseInOut>
</>
);