mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-02 10:04:09 +03:00
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 <bordeau.lucas@gmail.com>
This commit is contained in:
parent
08c7947b3b
commit
5404a8ba2d
@ -9,7 +9,7 @@ export const useIsMatchingLocation = () => {
|
|||||||
return useCallback(
|
return useCallback(
|
||||||
(path: string, basePath?: AppBasePath) => {
|
(path: string, basePath?: AppBasePath) => {
|
||||||
const constructedPath = basePath
|
const constructedPath = basePath
|
||||||
? new URL(basePath + path, document.location.origin).pathname ?? ''
|
? (new URL(basePath + path, document.location.origin).pathname ?? '')
|
||||||
: path;
|
: path;
|
||||||
|
|
||||||
return !!matchPath(constructedPath, location.pathname);
|
return !!matchPath(constructedPath, location.pathname);
|
||||||
|
@ -17,7 +17,7 @@ const StyledItemsContainer = styled.div`
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 12px;
|
gap: 14px;
|
||||||
height: calc(100dvh - 32px);
|
height: calc(100dvh - 32px);
|
||||||
margin-bottom: auto;
|
margin-bottom: auto;
|
||||||
max-width: 204px;
|
max-width: 204px;
|
||||||
|
@ -45,7 +45,7 @@ export const MessageThreadSubscribersChip = ({
|
|||||||
? `+${numberOfMessageThreadSubscribers - MAX_NUMBER_OF_AVATARS}`
|
? `+${numberOfMessageThreadSubscribers - MAX_NUMBER_OF_AVATARS}`
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
const label = isPrivateThread ? privateLabel : moreAvatarsLabel ?? '';
|
const label = isPrivateThread ? privateLabel : (moreAvatarsLabel ?? '');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Chip
|
<Chip
|
||||||
|
@ -4,7 +4,7 @@ import { ObjectRecord } from '@/object-record/types/ObjectRecord';
|
|||||||
export const generateDefaultRecordChipData = (record: ObjectRecord) => {
|
export const generateDefaultRecordChipData = (record: ObjectRecord) => {
|
||||||
const name = isFieldFullNameValue(record.name)
|
const name = isFieldFullNameValue(record.name)
|
||||||
? record.name.firstName + ' ' + record.name.lastName
|
? record.name.firstName + ' ' + record.name.lastName
|
||||||
: record.name ?? '';
|
: (record.name ?? '');
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name,
|
name,
|
||||||
|
@ -42,8 +42,8 @@ export const MultiSelectFieldInput = ({
|
|||||||
const [searchFilter, setSearchFilter] = useState('');
|
const [searchFilter, setSearchFilter] = useState('');
|
||||||
const containerRef = useRef<HTMLDivElement>(null);
|
const containerRef = useRef<HTMLDivElement>(null);
|
||||||
|
|
||||||
const selectedOptions = fieldDefinition.metadata.options.filter(
|
const selectedOptions = fieldDefinition.metadata.options.filter((option) =>
|
||||||
(option) => fieldValues?.includes(option.value),
|
fieldValues?.includes(option.value),
|
||||||
);
|
);
|
||||||
|
|
||||||
const optionsInDropDown = fieldDefinition.metadata.options;
|
const optionsInDropDown = fieldDefinition.metadata.options;
|
||||||
|
@ -69,7 +69,7 @@ export const RecordDetailRelationSection = ({
|
|||||||
const relationRecords: ObjectRecord[] =
|
const relationRecords: ObjectRecord[] =
|
||||||
fieldValue && isToOneObject
|
fieldValue && isToOneObject
|
||||||
? [fieldValue as ObjectRecord]
|
? [fieldValue as ObjectRecord]
|
||||||
: (fieldValue as ObjectRecord[]) ?? [];
|
: ((fieldValue as ObjectRecord[]) ?? []);
|
||||||
|
|
||||||
const relationRecordIds = relationRecords.map(({ id }) => id);
|
const relationRecordIds = relationRecords.map(({ id }) => id);
|
||||||
|
|
||||||
|
@ -6,11 +6,10 @@ export const findUnmatchedRequiredFields = <T extends string>(
|
|||||||
columns: Columns<T>,
|
columns: Columns<T>,
|
||||||
) =>
|
) =>
|
||||||
fields
|
fields
|
||||||
.filter(
|
.filter((field) =>
|
||||||
(field) =>
|
field.fieldValidationDefinitions?.some(
|
||||||
field.fieldValidationDefinitions?.some(
|
(validation) => validation.rule === 'required',
|
||||||
(validation) => validation.rule === 'required',
|
),
|
||||||
),
|
|
||||||
)
|
)
|
||||||
.filter(
|
.filter(
|
||||||
(field) =>
|
(field) =>
|
||||||
|
@ -16,7 +16,7 @@ type ContainerProps = {
|
|||||||
const StyledContainer = styled.div<ContainerProps>`
|
const StyledContainer = styled.div<ContainerProps>`
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: ${({ theme, isOn, color }) =>
|
background-color: ${({ theme, isOn, color }) =>
|
||||||
isOn ? color ?? theme.color.blue : theme.background.quaternary};
|
isOn ? (color ?? theme.color.blue) : theme.background.quaternary};
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -32,7 +32,7 @@ const StyledContainer = styled.div<{ isSubMenu?: boolean }>`
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: ${({ theme }) => theme.spacing(3)};
|
gap: ${({ theme }) => theme.spacing(3.5)};
|
||||||
height: 100%;
|
height: 100%;
|
||||||
min-width: ${DESKTOP_NAV_DRAWER_WIDTHS.menu}px;
|
min-width: ${DESKTOP_NAV_DRAWER_WIDTHS.menu}px;
|
||||||
padding: ${({ theme }) => theme.spacing(3, 2, 4)};
|
padding: ${({ theme }) => theme.spacing(3, 2, 4)};
|
||||||
|
@ -15,8 +15,6 @@ const StyledContainer = styled.div<{ isMultiWorkspace: boolean }>`
|
|||||||
display: flex;
|
display: flex;
|
||||||
gap: ${({ theme, isMultiWorkspace }) =>
|
gap: ${({ theme, isMultiWorkspace }) =>
|
||||||
!isMultiWorkspace ? theme.spacing(2) : null};
|
!isMultiWorkspace ? theme.spacing(2) : null};
|
||||||
padding: ${({ theme, isMultiWorkspace }) =>
|
|
||||||
!isMultiWorkspace ? theme.spacing(1) : null};
|
|
||||||
height: ${({ theme }) => theme.spacing(8)};
|
height: ${({ theme }) => theme.spacing(8)};
|
||||||
user-select: none;
|
user-select: none;
|
||||||
`;
|
`;
|
||||||
|
Loading…
Reference in New Issue
Block a user