Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 0.32 bis #8346

Merged
merged 2 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/twenty-front/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const StyledContainer = styled.div`

const StyledContainerWithPadding = styled.div`
height: calc(100% - 40px);
margin-left: ${({ theme }) => theme.spacing(2)};
width: 100%;
`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});

Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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"
Expand All @@ -24,5 +33,7 @@ export const SupportButton = () => {
Icon={IconHelpCircle}
/>
</StyledButtonContainer>
) : null;
) : (
<LightIconButton Icon={IconHelpCircle} />
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
IconChevronUp,
IconComponent,
IconX,
LightIconButton,
MOBILE_VIEWPORT,
OverflowingTextWithTooltip,
} from 'twenty-ui';
Expand Down Expand Up @@ -119,10 +120,10 @@ export const PageHeader = ({
</StyledTopBarButtonContainer>
)}
{hasClosePageButton && (
<IconButton
<LightIconButton
Icon={IconX}
size="small"
variant="tertiary"
accent="tertiary"
onClick={() => onClosePage?.()}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
`;
Expand All @@ -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;
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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 = {
Expand All @@ -41,13 +39,13 @@ export const NavigationDrawerCollapseButton = ({
)
}
>
<IconButton
<LightIconButton
Icon={
direction === 'left'
? IconLayoutSidebarLeftCollapse
: IconLayoutSidebarRightCollapse
}
variant="tertiary"
accent="tertiary"
size="small"
/>
</StyledCollapseButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
);
};
Loading