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

fixes #6499 alignment issue on workspace switcher #6589

Merged
merged 3 commits into from
Aug 16, 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
2 changes: 1 addition & 1 deletion packages/twenty-front/src/hooks/useIsMatchingLocation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const MessageThreadSubscribersChip = ({
? `+${numberOfMessageThreadSubscribers - MAX_NUMBER_OF_AVATARS}`
: null;

const label = isPrivateThread ? privateLabel : moreAvatarsLabel ?? '';
const label = isPrivateThread ? privateLabel : (moreAvatarsLabel ?? '');

return (
<Chip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ObjectRecord } from '@/object-record/types/ObjectRecord';
export const generateDefaultRecordChipData = (record: ObjectRecord) => {
const name = isFieldFullNameValue(record.name)
? record.name.firstName + ' ' + record.name.lastName
: record.name ?? '';
: (record.name ?? '');

return {
name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ export const MultiSelectFieldInput = ({
const [searchFilter, setSearchFilter] = useState('');
const containerRef = useRef<HTMLDivElement>(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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ export const findUnmatchedRequiredFields = <T extends string>(
columns: Columns<T>,
) =>
fields
.filter(
(field) =>
field.fieldValidationDefinitions?.some(
(validation) => validation.rule === 'required',
),
.filter((field) =>
field.fieldValidationDefinitions?.some(
(validation) => validation.rule === 'required',
),
)
.filter(
(field) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type ContainerProps = {
const StyledContainer = styled.div<ContainerProps>`
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
`;
Expand Down
Loading