diff --git a/packages/twenty-front/src/modules/action-menu/components/RecordIndexActionMenuDropdown.tsx b/packages/twenty-front/src/modules/action-menu/components/RecordIndexActionMenuDropdown.tsx index ed7fa1d7d5..1b91826c20 100644 --- a/packages/twenty-front/src/modules/action-menu/components/RecordIndexActionMenuDropdown.tsx +++ b/packages/twenty-front/src/modules/action-menu/components/RecordIndexActionMenuDropdown.tsx @@ -1,8 +1,3 @@ -import styled from '@emotion/styled'; -import { useRecoilValue } from 'recoil'; - -import { PositionType } from '../types/PositionType'; - import { actionMenuEntriesComponentSelector } from '@/action-menu/states/actionMenuEntriesComponentSelector'; import { ActionMenuComponentInstanceContext } from '@/action-menu/states/contexts/ActionMenuComponentInstanceContext'; import { recordIndexActionMenuDropdownPositionComponentState } from '@/action-menu/states/recordIndexActionMenuDropdownPositionComponentState'; @@ -13,7 +8,10 @@ import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/Drop import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow'; import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2'; import { extractComponentState } from '@/ui/utilities/state/component-state/utils/extractComponentState'; +import styled from '@emotion/styled'; +import { useRecoilValue } from 'recoil'; import { MenuItem } from 'twenty-ui'; +import { PositionType } from '../types/PositionType'; type StyledContainerProps = { position: PositionType; diff --git a/packages/twenty-front/src/modules/favorites/favorite-folder-picker/components/FavoriteFolderPicker.tsx b/packages/twenty-front/src/modules/favorites/favorite-folder-picker/components/FavoriteFolderPicker.tsx index a8b58b34f4..d64b04cbf1 100644 --- a/packages/twenty-front/src/modules/favorites/favorite-folder-picker/components/FavoriteFolderPicker.tsx +++ b/packages/twenty-front/src/modules/favorites/favorite-folder-picker/components/FavoriteFolderPicker.tsx @@ -99,6 +99,7 @@ export const FavoriteFolderPicker = ({ toggleFolderSelection={toggleFolderSelection} /> + ); diff --git a/packages/twenty-front/src/modules/favorites/favorite-folder-picker/components/FavoriteFolderPickerFooter.tsx b/packages/twenty-front/src/modules/favorites/favorite-folder-picker/components/FavoriteFolderPickerFooter.tsx index b43b045a20..1f60d986c6 100644 --- a/packages/twenty-front/src/modules/favorites/favorite-folder-picker/components/FavoriteFolderPickerFooter.tsx +++ b/packages/twenty-front/src/modules/favorites/favorite-folder-picker/components/FavoriteFolderPickerFooter.tsx @@ -4,16 +4,9 @@ import { useDropdown } from '@/ui/layout/dropdown/hooks/useDropdown'; import { useNavigationSection } from '@/ui/navigation/navigation-drawer/hooks/useNavigationSection'; import { isNavigationDrawerExpandedState } from '@/ui/navigation/states/isNavigationDrawerExpanded'; import { useTheme } from '@emotion/react'; -import styled from '@emotion/styled'; import { useRecoilState, useSetRecoilState } from 'recoil'; import { IconPlus, MenuItem } from 'twenty-ui'; -const StyledFooter = styled.div` - border-bottom-left-radius: ${({ theme }) => theme.border.radius.md}; - border-bottom-right-radius: ${({ theme }) => theme.border.radius.md}; - border-top: 1px solid ${({ theme }) => theme.border.color.light}; -`; - export const FavoriteFolderPickerFooter = ({ dropdownId, }: { @@ -30,20 +23,18 @@ export const FavoriteFolderPickerFooter = ({ const { closeDropdown } = useDropdown(dropdownId); return ( - - - { - setIsNavigationDrawerExpanded(true); - openNavigationSection(); - setIsFavoriteFolderCreating(true); - closeDropdown(); - }} - text="Add folder" - LeftIcon={() => } - /> - - + + { + setIsNavigationDrawerExpanded(true); + openNavigationSection(); + setIsFavoriteFolderCreating(true); + closeDropdown(); + }} + text="Add folder" + LeftIcon={() => } + /> + ); }; diff --git a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownFieldsContent.tsx b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownFieldsContent.tsx index 69eda6e55a..efb1c84668 100644 --- a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownFieldsContent.tsx +++ b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownFieldsContent.tsx @@ -62,7 +62,7 @@ export const ObjectOptionsDropdownFieldsContent = () => { showDragGrip={true} /> - + onContentChange('hiddenFields')} LeftIcon={IconEyeOff} diff --git a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownHiddenFieldsContent.tsx b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownHiddenFieldsContent.tsx index 15a87ed2fa..05aa96d883 100644 --- a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownHiddenFieldsContent.tsx +++ b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownHiddenFieldsContent.tsx @@ -87,7 +87,7 @@ export const ObjectOptionsDropdownHiddenFieldsContent = () => { closeDropdown(); }} > - + diff --git a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownMenuContent.tsx b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownMenuContent.tsx index 99e21cd9d0..0cfa046491 100644 --- a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownMenuContent.tsx +++ b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownMenuContent.tsx @@ -98,7 +98,7 @@ export const ObjectOptionsDropdownMenuContent = () => { {/** TODO: Should be removed when view settings contains more options */} {viewType === ViewType.Kanban && ( <> - + onContentChange('viewSettings')} LeftIcon={IconLayout} @@ -109,7 +109,7 @@ export const ObjectOptionsDropdownMenuContent = () => { )} - + onContentChange('fields')} LeftIcon={IconTag} diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderPlusButtonContent.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderPlusButtonContent.tsx index 95db8d71f2..a6c628bcfe 100644 --- a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderPlusButtonContent.tsx +++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderPlusButtonContent.tsx @@ -53,7 +53,7 @@ export const RecordTableHeaderPlusButtonContent = () => { ))} - + {isDefined(onCreate) && ( - + {createNewButton} )} @@ -181,7 +181,7 @@ export const MultiRecordSelect = ({ )} {isDefined(onCreate) && ( - + {createNewButton} )} diff --git a/packages/twenty-front/src/modules/object-record/relation-picker/components/SingleRecordSelectMenuItemsWithSearch.tsx b/packages/twenty-front/src/modules/object-record/relation-picker/components/SingleRecordSelectMenuItemsWithSearch.tsx index a9331c4c71..a971eecff2 100644 --- a/packages/twenty-front/src/modules/object-record/relation-picker/components/SingleRecordSelectMenuItemsWithSearch.tsx +++ b/packages/twenty-front/src/modules/object-record/relation-picker/components/SingleRecordSelectMenuItemsWithSearch.tsx @@ -69,7 +69,7 @@ export const SingleRecordSelectMenuItemsWithSearch = ({ <> {dropdownPlacement?.includes('end') && ( <> - + {createNewButton} {records.recordsToSelect.length > 0 && } @@ -117,7 +117,7 @@ export const SingleRecordSelectMenuItemsWithSearch = ({ )} {isDefined(onCreate) && ( - + {createNewButton} )} diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/components/SettingsDataModelFieldSelectFormOptionRow.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/components/SettingsDataModelFieldSelectFormOptionRow.tsx index ffe61d6c4f..6f3002e785 100644 --- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/components/SettingsDataModelFieldSelectFormOptionRow.tsx +++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/select/components/SettingsDataModelFieldSelectFormOptionRow.tsx @@ -8,7 +8,6 @@ import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/Drop import { useDropdown } from '@/ui/layout/dropdown/hooks/useDropdown'; import { useTheme } from '@emotion/react'; import styled from '@emotion/styled'; -import { useMemo } from 'react'; import { ColorSample, IconCheck, @@ -21,7 +20,6 @@ import { MenuItem, MenuItemSelectColor, } from 'twenty-ui'; -import { v4 } from 'uuid'; import { computeOptionValueFromLabel } from '~/pages/settings/data-model/utils/compute-option-value-from-label.utils'; type SettingsDataModelFieldSelectFormOptionRowProps = { @@ -81,17 +79,14 @@ export const SettingsDataModelFieldSelectFormOptionRow = ({ }: SettingsDataModelFieldSelectFormOptionRowProps) => { const theme = useTheme(); - const dropdownIds = useMemo(() => { - const baseScopeId = `select-field-option-row-${v4()}`; - return { - color: `${baseScopeId}-color`, - actions: `${baseScopeId}-actions`, - }; - }, []); + const SELECT_COLOR_DROPDOWN_ID = 'select-color-dropdown'; + const SELECT_ACTIONS_DROPDOWN_ID = 'select-actions-dropdown'; - const { closeDropdown: closeColorDropdown } = useDropdown(dropdownIds.color); + const { closeDropdown: closeColorDropdown } = useDropdown( + SELECT_COLOR_DROPDOWN_ID, + ); const { closeDropdown: closeActionsDropdown } = useDropdown( - dropdownIds.actions, + SELECT_ACTIONS_DROPDOWN_ID, ); const handleInputEnter = () => { @@ -120,28 +115,26 @@ export const SettingsDataModelFieldSelectFormOptionRow = ({ /> } dropdownComponents={ - - - {MAIN_COLOR_NAMES.map((colorName) => ( - { - onChange({ ...option, color: colorName }); - closeColorDropdown(); - }} - color={colorName} - selected={colorName === option.color} - /> - ))} - - + + {MAIN_COLOR_NAMES.map((colorName) => ( + { + onChange({ ...option, color: colorName }); + closeColorDropdown(); + }} + color={colorName} + selected={colorName === option.color} + /> + ))} + } /> diff --git a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectSummaryCard.tsx b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectSummaryCard.tsx index f818cded81..5567a3bf9a 100644 --- a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectSummaryCard.tsx +++ b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectSummaryCard.tsx @@ -16,7 +16,6 @@ import { SettingsSummaryCard } from '@/settings/components/SettingsSummaryCard'; import { SettingsDataModelObjectTypeTag } from '@/settings/data-model/objects/components/SettingsDataModelObjectTypeTag'; import { getObjectTypeLabel } from '@/settings/data-model/utils/getObjectTypeLabel'; import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown'; -import { DropdownMenu } from '@/ui/layout/dropdown/components/DropdownMenu'; import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer'; import { useDropdown } from '@/ui/layout/dropdown/hooks/useDropdown'; @@ -86,21 +85,20 @@ export const SettingsObjectSummaryCard = ({ accent="tertiary" /> } + dropdownMenuWidth={160} dropdownComponents={ - - - - - - + + + + } dropdownHotkeyScope={{ scope: dropdownId, diff --git a/packages/twenty-front/src/modules/settings/integrations/database-connection/components/SettingsIntegrationDatabaseConnectionSummaryCard.tsx b/packages/twenty-front/src/modules/settings/integrations/database-connection/components/SettingsIntegrationDatabaseConnectionSummaryCard.tsx index 8d0b1bbc1f..26a56c983a 100644 --- a/packages/twenty-front/src/modules/settings/integrations/database-connection/components/SettingsIntegrationDatabaseConnectionSummaryCard.tsx +++ b/packages/twenty-front/src/modules/settings/integrations/database-connection/components/SettingsIntegrationDatabaseConnectionSummaryCard.tsx @@ -1,7 +1,6 @@ import { SettingsSummaryCard } from '@/settings/components/SettingsSummaryCard'; import { SettingsIntegrationDatabaseConnectionSyncStatus } from '@/settings/integrations/database-connection/components/SettingsIntegrationDatabaseConnectionSyncStatus'; import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown'; -import { DropdownMenu } from '@/ui/layout/dropdown/components/DropdownMenu'; import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer'; import styled from '@emotion/styled'; import { @@ -64,18 +63,16 @@ export const SettingsIntegrationDatabaseConnectionSummaryCard = ({ } dropdownComponents={ - - - - - - - - + + + + + + } /> diff --git a/packages/twenty-front/src/modules/ui/input/components/Select.tsx b/packages/twenty-front/src/modules/ui/input/components/Select.tsx index 9c60672106..929eed1c02 100644 --- a/packages/twenty-front/src/modules/ui/input/components/Select.tsx +++ b/packages/twenty-front/src/modules/ui/input/components/Select.tsx @@ -165,7 +165,7 @@ export const Select = ({ )} {!!callToActionButton && ( - + { const id = useId(); - return withoutScrollWrapper === true ? ( + return scrollable !== true ? ( - - handleSelect(CoreObjectNameSingular.Note)} - accent="default" - LeftIcon={IconNotes} - text="Note" - /> - handleSelect(CoreObjectNameSingular.Task)} - accent="default" - LeftIcon={IconCheckbox} - text="Task" - /> - - + + handleSelect(CoreObjectNameSingular.Note)} + accent="default" + LeftIcon={IconNotes} + text="Note" + /> + handleSelect(CoreObjectNameSingular.Task)} + accent="default" + LeftIcon={IconCheckbox} + text="Task" + /> + } dropdownHotkeyScope={{ scope: PageHotkeyScope.ShowPage, diff --git a/packages/twenty-front/src/modules/ui/layout/show-page/components/ShowPageSubContainer.tsx b/packages/twenty-front/src/modules/ui/layout/show-page/components/ShowPageSubContainer.tsx index 80c69b86a8..587ed2e861 100644 --- a/packages/twenty-front/src/modules/ui/layout/show-page/components/ShowPageSubContainer.tsx +++ b/packages/twenty-front/src/modules/ui/layout/show-page/components/ShowPageSubContainer.tsx @@ -7,13 +7,13 @@ import { SummaryCard } from '@/object-record/record-show/components/SummaryCard' import { RecordLayout } from '@/object-record/record-show/types/RecordLayout'; import { recordStoreFamilyState } from '@/object-record/record-store/states/recordStoreFamilyState'; import { ObjectRecord } from '@/object-record/types/ObjectRecord'; +import { RightDrawerFooter } from '@/ui/layout/right-drawer/components/RightDrawerFooter'; import { ShowPageLeftContainer } from '@/ui/layout/show-page/components/ShowPageLeftContainer'; import { SingleTabProps, TabList } from '@/ui/layout/tab/components/TabList'; import { useTabList } from '@/ui/layout/tab/hooks/useTabList'; import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile'; import styled from '@emotion/styled'; import { useRecoilState, useRecoilValue } from 'recoil'; -import { RightDrawerFooter } from '@/ui/layout/right-drawer/components/RightDrawerFooter'; const StyledShowPageRightContainer = styled.div<{ isMobile: boolean }>` display: flex; diff --git a/packages/twenty-front/src/modules/views/components/UpdateViewButtonGroup.tsx b/packages/twenty-front/src/modules/views/components/UpdateViewButtonGroup.tsx index e9001faf75..4d0e22b108 100644 --- a/packages/twenty-front/src/modules/views/components/UpdateViewButtonGroup.tsx +++ b/packages/twenty-front/src/modules/views/components/UpdateViewButtonGroup.tsx @@ -112,15 +112,13 @@ export const UpdateViewButtonGroup = ({ /> } dropdownComponents={ - <> - - - - + + + } /> diff --git a/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerContentCreateMode.tsx b/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerContentCreateMode.tsx index 84f655a28b..27618cea7a 100644 --- a/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerContentCreateMode.tsx +++ b/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerContentCreateMode.tsx @@ -190,7 +190,7 @@ export const ViewPickerContentCreateMode = () => { )} - + diff --git a/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerContentEditMode.tsx b/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerContentEditMode.tsx index 1e3b588f96..41dc8b6da6 100644 --- a/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerContentEditMode.tsx +++ b/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerContentEditMode.tsx @@ -89,7 +89,7 @@ export const ViewPickerContentEditMode = () => { - + 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 85e0619876..aae3dc2d71 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 @@ -97,7 +97,7 @@ export const ViewPickerListContent = () => { /> - +