Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 63fe9ebe8d | |||
| 13155640a5 | |||
| 65d83319ef | |||
| 8216171fa4 | |||
| 53e072279c | |||
| a3f5345a65 | |||
| 95fea5a111 | |||
| 2b72904d22 |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "twenty-e2e-testing",
|
||||
"version": "0.42.0-canary",
|
||||
"version": "0.43.4",
|
||||
"description": "",
|
||||
"author": "",
|
||||
"private": true,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "twenty-emails",
|
||||
"version": "0.42.0-canary",
|
||||
"version": "0.43.4",
|
||||
"description": "",
|
||||
"author": "",
|
||||
"private": true,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "twenty-front",
|
||||
"version": "0.42.0-canary",
|
||||
"version": "0.43.4",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -20,7 +20,7 @@ export const useSearchRecords = () => {
|
||||
variables: {
|
||||
searchInput: deferredCommandMenuSearch ?? '',
|
||||
limit: MAX_SEARCH_RESULTS,
|
||||
excludedObjectNameSingulars: [],
|
||||
excludedObjectNameSingulars: ['workspaceMember'],
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ export type RecordChipProps = {
|
||||
maxWidth?: number;
|
||||
to?: string | undefined;
|
||||
size?: ChipSize;
|
||||
isLabelHidden?: boolean;
|
||||
};
|
||||
|
||||
export const RecordChip = ({
|
||||
@@ -34,7 +33,6 @@ export const RecordChip = ({
|
||||
to,
|
||||
size,
|
||||
forceDisableClick = false,
|
||||
isLabelHidden = false,
|
||||
}: RecordChipProps) => {
|
||||
const { recordChipData } = useRecordChipData({
|
||||
objectNameSingular,
|
||||
@@ -78,7 +76,6 @@ export const RecordChip = ({
|
||||
maxWidth={maxWidth}
|
||||
placeholderColorSeed={record.id}
|
||||
name={recordChipData.name}
|
||||
isLabelHidden={isLabelHidden}
|
||||
avatarType={recordChipData.avatarType}
|
||||
avatarUrl={recordChipData.avatarUrl ?? ''}
|
||||
className={className}
|
||||
|
||||
-4
@@ -1,5 +1,4 @@
|
||||
import { RecordChip } from '@/object-record/components/RecordChip';
|
||||
import { useIsChipFieldDisplayLabelHidden } from '@/object-record/record-field/meta-types/display/hooks/useIsChipFieldDisplayLabelHidden';
|
||||
import { useChipFieldDisplay } from '@/object-record/record-field/meta-types/hooks/useChipFieldDisplay';
|
||||
import { isDefined } from 'twenty-shared';
|
||||
import { ChipSize } from 'twenty-ui';
|
||||
@@ -8,8 +7,6 @@ export const ChipFieldDisplay = () => {
|
||||
const { recordValue, objectNameSingular, labelIdentifierLink } =
|
||||
useChipFieldDisplay();
|
||||
|
||||
const isChipFieldDisplayLabelHidden = useIsChipFieldDisplayLabelHidden();
|
||||
|
||||
if (!isDefined(recordValue)) {
|
||||
return null;
|
||||
}
|
||||
@@ -20,7 +17,6 @@ export const ChipFieldDisplay = () => {
|
||||
record={recordValue}
|
||||
size={ChipSize.Small}
|
||||
to={labelIdentifierLink}
|
||||
isLabelHidden={isChipFieldDisplayLabelHidden}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
+9
-17
@@ -5,7 +5,6 @@ import { CoreObjectNamePlural } from '@/object-metadata/types/CoreObjectNamePlur
|
||||
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
||||
import { ChipFieldDisplay } from '@/object-record/record-field/meta-types/display/components/ChipFieldDisplay';
|
||||
import { RecordIndexContextProvider } from '@/object-record/record-index/contexts/RecordIndexContext';
|
||||
import { RecordTableComponentInstanceContext } from '@/object-record/record-table/states/context/RecordTableComponentInstanceContext';
|
||||
import { ChipGeneratorsDecorator } from '~/testing/decorators/ChipGeneratorsDecorator';
|
||||
import { getFieldDecorator } from '~/testing/decorators/getFieldDecorator';
|
||||
import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';
|
||||
@@ -23,25 +22,18 @@ const meta: Meta = {
|
||||
)!;
|
||||
|
||||
return (
|
||||
<RecordTableComponentInstanceContext.Provider
|
||||
<RecordIndexContextProvider
|
||||
value={{
|
||||
instanceId,
|
||||
onColumnsChange: () => {},
|
||||
indexIdentifierUrl: () => '',
|
||||
onIndexRecordsLoaded: () => {},
|
||||
objectNamePlural: CoreObjectNamePlural.Company,
|
||||
objectNameSingular: CoreObjectNameSingular.Company,
|
||||
objectMetadataItem: companyObjectMetadataItem,
|
||||
recordIndexId: instanceId,
|
||||
}}
|
||||
>
|
||||
<RecordIndexContextProvider
|
||||
value={{
|
||||
indexIdentifierUrl: () => '',
|
||||
onIndexRecordsLoaded: () => {},
|
||||
objectNamePlural: CoreObjectNamePlural.Company,
|
||||
objectNameSingular: CoreObjectNameSingular.Company,
|
||||
objectMetadataItem: companyObjectMetadataItem,
|
||||
recordIndexId: instanceId,
|
||||
}}
|
||||
>
|
||||
<Story />
|
||||
</RecordIndexContextProvider>
|
||||
</RecordTableComponentInstanceContext.Provider>
|
||||
<Story />
|
||||
</RecordIndexContextProvider>
|
||||
);
|
||||
},
|
||||
MemoryRouterDecorator,
|
||||
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
import { RecordTableCellContext } from '@/object-record/record-table/contexts/RecordTableCellContext';
|
||||
import { isRecordTableScrolledLeftComponentState } from '@/object-record/record-table/states/isRecordTableScrolledLeftComponentState';
|
||||
import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2';
|
||||
import { useContext } from 'react';
|
||||
import { useIsMobile } from 'twenty-ui';
|
||||
|
||||
export const useIsChipFieldDisplayLabelHidden = () => {
|
||||
const isMobile = useIsMobile();
|
||||
|
||||
const isRecordTableScrolledLeft = useRecoilComponentValueV2(
|
||||
isRecordTableScrolledLeftComponentState,
|
||||
);
|
||||
|
||||
const { columnDefinition } = useContext(RecordTableCellContext);
|
||||
|
||||
const isLabelIdentifierInRecordTable = columnDefinition?.isLabelIdentifier;
|
||||
|
||||
const isLabelHidden =
|
||||
isMobile && !isRecordTableScrolledLeft && isLabelIdentifierInRecordTable;
|
||||
|
||||
return isLabelHidden;
|
||||
};
|
||||
+13
@@ -1,4 +1,5 @@
|
||||
import styled from '@emotion/styled';
|
||||
import { MOBILE_VIEWPORT } from 'twenty-ui';
|
||||
|
||||
const StyledTbody = styled.tbody`
|
||||
&.first-columns-sticky {
|
||||
@@ -21,6 +22,18 @@ const StyledTbody = styled.tbody`
|
||||
z-index: 5;
|
||||
transition: 0.3s ease;
|
||||
|
||||
@media (max-width: ${MOBILE_VIEWPORT}px) {
|
||||
& [data-testid='editable-cell-display-mode'] {
|
||||
[data-testid='tooltip'] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
[data-testid='chip'] {
|
||||
gap: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:not(.disable-shadow)::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
|
||||
+2
-6
@@ -1,6 +1,6 @@
|
||||
import { ReactElement, useContext, useEffect, useRef } from 'react';
|
||||
import { useRecoilValue } from 'recoil';
|
||||
import { IconArrowUpRight, useIsMobile } from 'twenty-ui';
|
||||
import { IconArrowUpRight } from 'twenty-ui';
|
||||
|
||||
import { useGetButtonIcon } from '@/object-record/record-field/hooks/useGetButtonIcon';
|
||||
import { useIsFieldEmpty } from '@/object-record/record-field/hooks/useIsFieldEmpty';
|
||||
@@ -80,12 +80,8 @@ export const RecordTableCellSoftFocusMode = ({
|
||||
? IconArrowUpRight // IconLayoutSidebarRightExpand - Disabling sidepanel access for now
|
||||
: customButtonIcon;
|
||||
|
||||
const isMobile = useIsMobile();
|
||||
const showButton =
|
||||
isDefined(buttonIcon) &&
|
||||
!editModeContentOnly &&
|
||||
!isFieldReadOnly &&
|
||||
!(isMobile && isFirstColumn);
|
||||
isDefined(buttonIcon) && !editModeContentOnly && !isFieldReadOnly;
|
||||
|
||||
const dontShowContent = isEmpty && isFieldReadOnly;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "twenty-server",
|
||||
"version": "0.42.0-canary",
|
||||
"version": "0.43.4",
|
||||
"description": "",
|
||||
"author": "",
|
||||
"private": true,
|
||||
|
||||
+2
-3
@@ -123,13 +123,12 @@ export abstract class ActiveOrSuspendedWorkspacesMigrationCommandRunner<
|
||||
`Running command on workspace ${workspaceId} ${index + 1}/${activeWorkspaceIds.length}`,
|
||||
);
|
||||
|
||||
const dataSource =
|
||||
try {
|
||||
const dataSource =
|
||||
await this.twentyORMGlobalManager.getDataSourceForWorkspace(
|
||||
workspaceId,
|
||||
false,
|
||||
);
|
||||
|
||||
try {
|
||||
await this.runOnWorkspace({
|
||||
options,
|
||||
workspaceId,
|
||||
|
||||
+1
@@ -230,6 +230,7 @@ export class MigrateRichTextContentPatchCommand extends ActiveOrSuspendedWorkspa
|
||||
const workspaceDataSource =
|
||||
await this.twentyORMGlobalManager.getDataSourceForWorkspace(
|
||||
workspaceId,
|
||||
false,
|
||||
);
|
||||
|
||||
const rows = await workspaceDataSource.query(
|
||||
|
||||
+1
@@ -80,6 +80,7 @@ export class UpdateDefaultViewRecordOpeningOnWorkflowObjectsCommand extends Acti
|
||||
await this.twentyORMGlobalManager.getRepositoryForWorkspace(
|
||||
workspaceId,
|
||||
'view',
|
||||
false,
|
||||
);
|
||||
|
||||
await viewRepository.update(
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import { Entity } from '@microsoft/microsoft-graph-types';
|
||||
import { getLogoUrlFromDomainName } from 'twenty-shared';
|
||||
import { FieldMetadataType, getLogoUrlFromDomainName } from 'twenty-shared';
|
||||
import { Brackets } from 'typeorm';
|
||||
|
||||
import { ObjectRecord } from 'src/engine/api/graphql/workspace-query-builder/interfaces/object-record.interface';
|
||||
@@ -109,7 +109,7 @@ export class GlobalSearchService {
|
||||
objectMetadataItem.labelIdentifierFieldMetadataId
|
||||
];
|
||||
|
||||
if (objectMetadataItem.nameSingular === 'person') {
|
||||
if (labelIdentifierField.type === FieldMetadataType.FULL_NAME) {
|
||||
return [
|
||||
`${labelIdentifierField.name}FirstName`,
|
||||
`${labelIdentifierField.name}LastName`,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "twenty-shared",
|
||||
"version": "0.42.0-canary",
|
||||
"version": "0.43.4",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "./dist/index.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "twenty-ui",
|
||||
"version": "0.42.0-canary",
|
||||
"version": "0.43.4",
|
||||
"type": "module",
|
||||
"main": "./src/index.ts",
|
||||
"exports": {
|
||||
|
||||
@@ -8,7 +8,6 @@ export type LinkAvatarChipProps = Omit<AvatarChipsCommonProps, 'clickable'> & {
|
||||
to: string;
|
||||
onClick?: LinkChipProps['onClick'];
|
||||
variant?: AvatarChipVariant;
|
||||
isLabelHidden?: boolean;
|
||||
};
|
||||
|
||||
export const LinkAvatarChip = ({
|
||||
@@ -25,13 +24,11 @@ export const LinkAvatarChip = ({
|
||||
placeholderColorSeed,
|
||||
size,
|
||||
variant,
|
||||
isLabelHidden,
|
||||
}: LinkAvatarChipProps) => (
|
||||
<LinkChip
|
||||
to={to}
|
||||
onClick={onClick}
|
||||
label={name}
|
||||
isLabelHidden={isLabelHidden}
|
||||
variant={
|
||||
//Regular but Highlighted -> missleading
|
||||
variant === AvatarChipVariant.Regular
|
||||
|
||||
@@ -26,7 +26,6 @@ export type ChipProps = {
|
||||
disabled?: boolean;
|
||||
clickable?: boolean;
|
||||
label: string;
|
||||
isLabelHidden?: boolean;
|
||||
maxWidth?: number;
|
||||
variant?: ChipVariant;
|
||||
accent?: ChipAccent;
|
||||
@@ -125,7 +124,6 @@ const StyledContainer = withTheme(styled.div<
|
||||
export const Chip = ({
|
||||
size = ChipSize.Small,
|
||||
label,
|
||||
isLabelHidden = false,
|
||||
disabled = false,
|
||||
clickable = true,
|
||||
variant = ChipVariant.Regular,
|
||||
@@ -147,9 +145,7 @@ export const Chip = ({
|
||||
maxWidth={maxWidth}
|
||||
>
|
||||
{leftComponent?.()}
|
||||
{!isLabelHidden && (
|
||||
<OverflowingTextWithTooltip size={size} text={label} />
|
||||
)}
|
||||
<OverflowingTextWithTooltip size={size} text={label} />
|
||||
{rightComponent?.()}
|
||||
</StyledContainer>
|
||||
);
|
||||
|
||||
@@ -27,7 +27,6 @@ export const LinkChip = ({
|
||||
to,
|
||||
size = ChipSize.Small,
|
||||
label,
|
||||
isLabelHidden = false,
|
||||
variant = ChipVariant.Regular,
|
||||
leftComponent = null,
|
||||
rightComponent = null,
|
||||
@@ -41,7 +40,6 @@ export const LinkChip = ({
|
||||
<Chip
|
||||
size={size}
|
||||
label={label}
|
||||
isLabelHidden={isLabelHidden}
|
||||
clickable={true}
|
||||
variant={variant}
|
||||
leftComponent={leftComponent}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "twenty-website",
|
||||
"version": "0.42.0-canary",
|
||||
"version": "0.43.4",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"nx": "NX_DEFAULT_PROJECT=twenty-website node ../../node_modules/nx/bin/nx.js",
|
||||
|
||||
Reference in New Issue
Block a user