Skip to content

The open alternative to Salesforce, designed for AI.

Fix 0.32 bis (#8346)

Charles Bochet88ba057b2cc1
diff --git a/packages/twenty-front/src/index.css b/packages/twenty-front/src/index.css
index 30952751bd2..22b25687aaf 100644
--- a/packages/twenty-front/src/index.css
+++ b/packages/twenty-front/src/index.css
@@ -9,6 +9,10 @@ html {
font-size: 13px;
}
+button {
+ font-size: 13px;
+}
+
/* https://stackoverflow.com/questions/44543157/how-to-hide-the-google-invisible-recaptcha-badge */
.grecaptcha-badge {
visibility: hidden !important;
diff --git a/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/MultiItemFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/MultiItemFieldInput.tsx
index c23b31bc21e..6934e915793 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/MultiItemFieldInput.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/MultiItemFieldInput.tsx
@@ -20,8 +20,8 @@ import { toSpliced } from '~/utils/array/toSpliced';
import { turnIntoEmptyStringIfWhitespacesOnly } from '~/utils/string/turnIntoEmptyStringIfWhitespacesOnly';
const StyledDropdownMenu = styled(DropdownMenu)`
- left: -1px;
- top: -1px;
+ margin-left: -1px;
+ margin-top: -1px;
`;
type MultiItemFieldInputProps<T> = {
diff --git a/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexContainer.tsx b/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexContainer.tsx
index a31e2597c7e..14e1d9f729a 100644
--- a/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexContainer.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexContainer.tsx
@@ -51,6 +51,7 @@ const StyledContainer = styled.div`
const StyledContainerWithPadding = styled.div`
height: calc(100% - 40px);
+ margin-left: ${({ theme }) => theme.spacing(2)};
width: 100%;
`;
diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellEditMode.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellEditMode.tsx
index 0e083492f09..305230b3f7d 100644
--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellEditMode.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellEditMode.tsx
@@ -34,7 +34,13 @@ export const RecordTableCellEditMode = ({
}: RecordTableCellEditModeProps) => {
const { refs, floatingStyles } = useFloating({
placement: 'top-start',
- middleware: [flip(), offset(-32)],
+ middleware: [
+ flip(),
+ offset({
+ mainAxis: -32,
+ crossAxis: 0,
+ }),
+ ],
whileElementsMounted: autoUpdate,
});
diff --git a/packages/twenty-front/src/modules/support/components/SupportButton.tsx b/packages/twenty-front/src/modules/support/components/SupportButton.tsx
index 5634c842dfa..2c38dccdcf3 100644
--- a/packages/twenty-front/src/modules/support/components/SupportButton.tsx
+++ b/packages/twenty-front/src/modules/support/components/SupportButton.tsx
@@ -1,8 +1,10 @@
import styled from '@emotion/styled';
-import { Button, IconHelpCircle } from 'twenty-ui';
+import { Button, IconHelpCircle, LightIconButton } from 'twenty-ui';
import { SupportButtonSkeletonLoader } from '@/support/components/SupportButtonSkeletonLoader';
import { useSupportChat } from '@/support/hooks/useSupportChat';
+import { isNavigationDrawerExpandedState } from '@/ui/navigation/states/isNavigationDrawerExpanded';
+import { useRecoilValue } from 'recoil';
const StyledButtonContainer = styled.div`
display: flex;
@@ -11,11 +13,18 @@ const StyledButtonContainer = styled.div`
export const SupportButton = () => {
const { loading, isFrontChatLoaded } = useSupportChat();
+ const isNavigationDrawerExpanded = useRecoilValue(
+ isNavigationDrawerExpandedState,
+ );
if (loading) {
return <SupportButtonSkeletonLoader />;
}
- return isFrontChatLoaded ? (
+ if (!isFrontChatLoaded) {
+ return;
+ }
+
+ return isNavigationDrawerExpanded ? (
<StyledButtonContainer>
<Button
variant="tertiary"
@@ -24,5 +33,7 @@ export const SupportButton = () => {
Icon={IconHelpCircle}
/>
</StyledButtonContainer>
- ) : null;
+ ) : (
+ <LightIconButton Icon={IconHelpCircle} />
+ );
};
diff --git a/packages/twenty-front/src/modules/ui/layout/page/components/PageHeader.tsx b/packages/twenty-front/src/modules/ui/layout/page/components/PageHeader.tsx
index 8bcaf9676e2..9b9827b54ee 100644
--- a/packages/twenty-front/src/modules/ui/layout/page/components/PageHeader.tsx
+++ b/packages/twenty-front/src/modules/ui/layout/page/components/PageHeader.tsx
@@ -8,6 +8,7 @@ import {
IconChevronUp,
IconComponent,
IconX,
+ LightIconButton,
MOBILE_VIEWPORT,
OverflowingTextWithTooltip,
} from 'twenty-ui';
@@ -119,10 +120,10 @@ export const PageHeader = ({
</StyledTopBarButtonContainer>
)}
{hasClosePageButton && (
- <IconButton
+ <LightIconButton
Icon={IconX}
size="small"
- variant="tertiary"
+ accent="tertiary"
onClick={() => onClosePage?.()}
/>
)}
diff --git a/packages/twenty-front/src/modules/ui/layout/top-bar/components/TopBar.tsx b/packages/twenty-front/src/modules/ui/layout/top-bar/components/TopBar.tsx
index 87bee383cbd..004236cc337 100644
--- a/packages/twenty-front/src/modules/ui/layout/top-bar/components/TopBar.tsx
+++ b/packages/twenty-front/src/modules/ui/layout/top-bar/components/TopBar.tsx
@@ -12,6 +12,7 @@ type TopBarProps = {
const StyledContainer = styled.div`
border-bottom: ${({ theme }) => `1px solid ${theme.border.color.light}`};
display: flex;
+ margin-left: ${({ theme }) => theme.spacing(2)};
flex-direction: column;
`;
@@ -27,7 +28,6 @@ const StyledTopBar = styled.div`
height: 39px;
justify-content: space-between;
padding-right: ${({ theme }) => theme.spacing(2)};
- padding-left: ${({ theme }) => theme.spacing(2)};
z-index: 7;
`;
diff --git a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerCollapseButton.tsx b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerCollapseButton.tsx
index 348a3d6c87d..5945bc7ba0e 100644
--- a/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerCollapseButton.tsx
+++ b/packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawerCollapseButton.tsx
@@ -2,9 +2,9 @@ import { isNavigationDrawerExpandedState } from '@/ui/navigation/states/isNaviga
import styled from '@emotion/styled';
import { useSetRecoilState } from 'recoil';
import {
- IconButton,
IconLayoutSidebarLeftCollapse,
IconLayoutSidebarRightCollapse,
+ LightIconButton,
} from 'twenty-ui';
const StyledCollapseButton = styled.div`
@@ -13,10 +13,8 @@ const StyledCollapseButton = styled.div`
color: ${({ theme }) => theme.font.color.light};
cursor: pointer;
display: flex;
- height: ${({ theme }) => theme.spacing(4)};
justify-content: center;
user-select: none;
- width: ${({ theme }) => theme.spacing(4)};
`;
type NavigationDrawerCollapseButtonProps = {
@@ -41,13 +39,13 @@ export const NavigationDrawerCollapseButton = ({
)
}
>
- <IconButton
+ <LightIconButton
Icon={
direction === 'left'
? IconLayoutSidebarLeftCollapse
: IconLayoutSidebarRightCollapse
}
- variant="tertiary"
+ accent="tertiary"
size="small"
/>
</StyledCollapseButton>
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 5805576d550..52477ff39f9 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
@@ -7,10 +7,10 @@ import { DEFAULT_WORKSPACE_LOGO } from '@/ui/navigation/navigation-drawer/consta
import { DEFAULT_WORKSPACE_NAME } from '@/ui/navigation/navigation-drawer/constants/DefaultWorkspaceName';
import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';
+import { NavigationDrawerAnimatedCollapseWrapper } from '@/ui/navigation/navigation-drawer/components/NavigationDrawerAnimatedCollapseWrapper';
import { isNavigationDrawerExpandedState } from '@/ui/navigation/states/isNavigationDrawerExpanded';
import { isNonEmptyString } from '@sniptt/guards';
import { NavigationDrawerCollapseButton } from './NavigationDrawerCollapseButton';
-import { NavigationDrawerAnimatedCollapseWrapper } from '@/ui/navigation/navigation-drawer/components/NavigationDrawerAnimatedCollapseWrapper';
const StyledContainer = styled.div`
align-items: center;
diff --git a/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerListContent.tsx b/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerListContent.tsx
index 5463bf58461..f63cdc10d5e 100644
--- a/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerListContent.tsx
+++ b/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerListContent.tsx
@@ -1,7 +1,13 @@
import styled from '@emotion/styled';
import { DropResult } from '@hello-pangea/dnd';
import { MouseEvent, useCallback } from 'react';
-import { IconLock, IconPencil, IconPlus, useIcons } from 'twenty-ui';
+import {
+ IconLock,
+ IconPencil,
+ IconPlus,
+ LightIconButtonAccent,
+ useIcons,
+} from 'twenty-ui';
import { DraggableItem } from '@/ui/layout/draggable-list/components/DraggableItem';
import { DraggableList } from '@/ui/layout/draggable-list/components/DraggableList';
@@ -109,6 +115,7 @@ export const ViewPickerListContent = () => {
Icon: IconPencil,
onClick: (event: MouseEvent<HTMLButtonElement>) =>
handleEditViewButtonClick(event, view.id),
+ accent: 'tertiary' as LightIconButtonAccent,
},
].filter(isDefined)}
isIconDisplayedOnHoverOnly={true}
diff --git a/packages/twenty-ui/src/input/button/components/IconButton.tsx b/packages/twenty-ui/src/input/button/components/IconButton.tsx
index f10a748601a..93bc7e79f7a 100644
--- a/packages/twenty-ui/src/input/button/components/IconButton.tsx
+++ b/packages/twenty-ui/src/input/button/components/IconButton.tsx
@@ -217,7 +217,7 @@ const StyledButton = styled.button<
return '0';
}
}};
- box-sizing: content-box;
+ box-sizing: border-box;
cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};
display: flex;
flex-direction: row;
diff --git a/packages/twenty-ui/src/input/button/components/LightIconButton.tsx b/packages/twenty-ui/src/input/button/components/LightIconButton.tsx
index b81ee5b8487..0f5c53c80d5 100644
--- a/packages/twenty-ui/src/input/button/components/LightIconButton.tsx
+++ b/packages/twenty-ui/src/input/button/components/LightIconButton.tsx
@@ -105,7 +105,11 @@ export const LightIconButton = ({
active={active}
title={title}
>
- {Icon && <Icon size={theme.icon.size.sm} />}
+ {Icon && (
+ <Icon
+ size={size === 'medium' ? theme.icon.size.md : theme.icon.size.sm}
+ />
+ )}
</StyledButton>
);
};