From 5404a8ba2d5b7ad5383b8c3a7f80bf423b34c630 Mon Sep 17 00:00:00 2001 From: NitinPSingh <71833171+NitinPSingh@users.noreply.github.com> Date: Fri, 16 Aug 2024 19:01:04 +0530 Subject: [PATCH] fixes #6499 alignment issue on workspace switcher (#6589) fix #6499 - fix the size of workspace switcher to 32px from 40px ![Screenshot 2024-08-09 140212](https://github.com/user-attachments/assets/425c9089-8969-4d59-82ef-10572cfa7027) - fix alignment issues ![Screenshot 2024-08-09 142357](https://github.com/user-attachments/assets/2e3e76f2-8a81-48e9-86ff-691c11215583) --------- Co-authored-by: Lucas Bordeau --- packages/twenty-front/src/hooks/useIsMatchingLocation.ts | 2 +- .../src/loading/components/LeftPanelSkeletonLoader.tsx | 2 +- .../emails/components/MessageThreadSubscribersChip.tsx | 2 +- .../utils/generateDefaultRecordChipData.ts | 2 +- .../input/components/MultiSelectFieldInput.tsx | 4 ++-- .../components/RecordDetailRelationSection.tsx | 2 +- .../utils/findUnmatchedRequiredFields.ts | 9 ++++----- .../src/modules/ui/input/components/Toggle.tsx | 2 +- .../navigation-drawer/components/NavigationDrawer.tsx | 2 +- .../components/NavigationDrawerHeader.tsx | 2 -- 10 files changed, 13 insertions(+), 16 deletions(-) diff --git a/packages/twenty-front/src/hooks/useIsMatchingLocation.ts b/packages/twenty-front/src/hooks/useIsMatchingLocation.ts index 044a34406..aa57dbb43 100644 --- a/packages/twenty-front/src/hooks/useIsMatchingLocation.ts +++ b/packages/twenty-front/src/hooks/useIsMatchingLocation.ts @@ -9,7 +9,7 @@ export const useIsMatchingLocation = () => { return useCallback( (path: string, basePath?: AppBasePath) => { const constructedPath = basePath - ? new URL(basePath + path, document.location.origin).pathname ?? '' + ? (new URL(basePath + path, document.location.origin).pathname ?? '') : path; return !!matchPath(constructedPath, location.pathname); diff --git a/packages/twenty-front/src/loading/components/LeftPanelSkeletonLoader.tsx b/packages/twenty-front/src/loading/components/LeftPanelSkeletonLoader.tsx index 9a94373ce..38803c9ef 100644 --- a/packages/twenty-front/src/loading/components/LeftPanelSkeletonLoader.tsx +++ b/packages/twenty-front/src/loading/components/LeftPanelSkeletonLoader.tsx @@ -17,7 +17,7 @@ const StyledItemsContainer = styled.div` align-items: center; display: flex; flex-direction: column; - gap: 12px; + gap: 14px; height: calc(100dvh - 32px); margin-bottom: auto; max-width: 204px; diff --git a/packages/twenty-front/src/modules/activities/emails/components/MessageThreadSubscribersChip.tsx b/packages/twenty-front/src/modules/activities/emails/components/MessageThreadSubscribersChip.tsx index d10827215..6ef97d07b 100644 --- a/packages/twenty-front/src/modules/activities/emails/components/MessageThreadSubscribersChip.tsx +++ b/packages/twenty-front/src/modules/activities/emails/components/MessageThreadSubscribersChip.tsx @@ -45,7 +45,7 @@ export const MessageThreadSubscribersChip = ({ ? `+${numberOfMessageThreadSubscribers - MAX_NUMBER_OF_AVATARS}` : null; - const label = isPrivateThread ? privateLabel : moreAvatarsLabel ?? ''; + const label = isPrivateThread ? privateLabel : (moreAvatarsLabel ?? ''); return ( { const name = isFieldFullNameValue(record.name) ? record.name.firstName + ' ' + record.name.lastName - : record.name ?? ''; + : (record.name ?? ''); return { name, diff --git a/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/MultiSelectFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/MultiSelectFieldInput.tsx index d36b2b9fb..c6134f911 100644 --- a/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/MultiSelectFieldInput.tsx +++ b/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/MultiSelectFieldInput.tsx @@ -42,8 +42,8 @@ export const MultiSelectFieldInput = ({ const [searchFilter, setSearchFilter] = useState(''); const containerRef = useRef(null); - const selectedOptions = fieldDefinition.metadata.options.filter( - (option) => fieldValues?.includes(option.value), + const selectedOptions = fieldDefinition.metadata.options.filter((option) => + fieldValues?.includes(option.value), ); const optionsInDropDown = fieldDefinition.metadata.options; diff --git a/packages/twenty-front/src/modules/object-record/record-show/record-detail-section/components/RecordDetailRelationSection.tsx b/packages/twenty-front/src/modules/object-record/record-show/record-detail-section/components/RecordDetailRelationSection.tsx index e59ca3be7..426078f80 100644 --- a/packages/twenty-front/src/modules/object-record/record-show/record-detail-section/components/RecordDetailRelationSection.tsx +++ b/packages/twenty-front/src/modules/object-record/record-show/record-detail-section/components/RecordDetailRelationSection.tsx @@ -69,7 +69,7 @@ export const RecordDetailRelationSection = ({ const relationRecords: ObjectRecord[] = fieldValue && isToOneObject ? [fieldValue as ObjectRecord] - : (fieldValue as ObjectRecord[]) ?? []; + : ((fieldValue as ObjectRecord[]) ?? []); const relationRecordIds = relationRecords.map(({ id }) => id); diff --git a/packages/twenty-front/src/modules/spreadsheet-import/utils/findUnmatchedRequiredFields.ts b/packages/twenty-front/src/modules/spreadsheet-import/utils/findUnmatchedRequiredFields.ts index e7219f70b..71af18402 100644 --- a/packages/twenty-front/src/modules/spreadsheet-import/utils/findUnmatchedRequiredFields.ts +++ b/packages/twenty-front/src/modules/spreadsheet-import/utils/findUnmatchedRequiredFields.ts @@ -6,11 +6,10 @@ export const findUnmatchedRequiredFields = ( columns: Columns, ) => fields - .filter( - (field) => - field.fieldValidationDefinitions?.some( - (validation) => validation.rule === 'required', - ), + .filter((field) => + field.fieldValidationDefinitions?.some( + (validation) => validation.rule === 'required', + ), ) .filter( (field) => diff --git a/packages/twenty-front/src/modules/ui/input/components/Toggle.tsx b/packages/twenty-front/src/modules/ui/input/components/Toggle.tsx index 9aadab0eb..f723e93e1 100644 --- a/packages/twenty-front/src/modules/ui/input/components/Toggle.tsx +++ b/packages/twenty-front/src/modules/ui/input/components/Toggle.tsx @@ -16,7 +16,7 @@ type ContainerProps = { const StyledContainer = styled.div` align-items: center; background-color: ${({ theme, isOn, color }) => - isOn ? color ?? theme.color.blue : theme.background.quaternary}; + isOn ? (color ?? theme.color.blue) : theme.background.quaternary}; border-radius: 10px; cursor: pointer; display: flex; diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawer.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawer.tsx index 406402377..92b020a7d 100644 --- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawer.tsx +++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawer.tsx @@ -32,7 +32,7 @@ const StyledContainer = styled.div<{ isSubMenu?: boolean }>` box-sizing: border-box; display: flex; flex-direction: column; - gap: ${({ theme }) => theme.spacing(3)}; + gap: ${({ theme }) => theme.spacing(3.5)}; height: 100%; min-width: ${DESKTOP_NAV_DRAWER_WIDTHS.menu}px; padding: ${({ theme }) => theme.spacing(3, 2, 4)}; diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerHeader.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerHeader.tsx index d6bbf8100..03ae1fcd0 100644 --- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerHeader.tsx +++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerHeader.tsx @@ -15,8 +15,6 @@ const StyledContainer = styled.div<{ isMultiWorkspace: boolean }>` display: flex; gap: ${({ theme, isMultiWorkspace }) => !isMultiWorkspace ? theme.spacing(2) : null}; - padding: ${({ theme, isMultiWorkspace }) => - !isMultiWorkspace ? theme.spacing(1) : null}; height: ${({ theme }) => theme.spacing(8)}; user-select: none; `;