Rename twenty-ui to twenty-ui-deprecated and twenty-new-ui to twenty-ui to prepare package release (#21315)
## Description Promotes the next-gen UI library (formerly `twenty-new-ui`) to the name **`twenty-ui`** (v0.1.0, publishable) and renames the old package to **`twenty-ui-deprecated`**. Rewrites ~1,730 `twenty-ui` imports → `twenty-ui-deprecated`, updates all configs/CI/Docker/deps, and migrates twenty-front's `Toggle` to the new package (first consumer) as a drop-in. ## Next steps - Wire the `ui/v*` publish dispatch (`cd-deploy-tag.yaml` + `.yarnrc.yml`), then tag `ui/v0.1.0` to publish. - Continue migrating components from `twenty-ui-deprecated` → `twenty-ui`.
This commit is contained in:
+6
-2
@@ -14,8 +14,12 @@ import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomStat
|
||||
import { useLingui } from '@lingui/react/macro';
|
||||
import { useState } from 'react';
|
||||
import { isFieldMetadataDateKind } from 'twenty-shared/utils';
|
||||
import { IconChevronLeft, IconSettings, useIcons } from 'twenty-ui/display';
|
||||
import { MenuItem, MenuItemSelect } from 'twenty-ui/navigation';
|
||||
import {
|
||||
IconChevronLeft,
|
||||
IconSettings,
|
||||
useIcons,
|
||||
} from 'twenty-ui-deprecated/display';
|
||||
import { MenuItem, MenuItemSelect } from 'twenty-ui-deprecated/navigation';
|
||||
|
||||
export const ObjectOptionsDropdownCalendarFieldsContent = () => {
|
||||
const { t } = useLingui();
|
||||
|
||||
+3
-3
@@ -13,14 +13,14 @@ import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomState
|
||||
import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';
|
||||
import { useUpdateCurrentView } from '@/views/hooks/useUpdateCurrentView';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Pill } from 'twenty-ui/components';
|
||||
import { Pill } from 'twenty-ui-deprecated/components';
|
||||
import {
|
||||
IconCalendarMonth,
|
||||
IconCalendarWeek,
|
||||
IconChevronLeft,
|
||||
IconTimelineEvent,
|
||||
} from 'twenty-ui/display';
|
||||
import { MenuItemSelect } from 'twenty-ui/navigation';
|
||||
} from 'twenty-ui-deprecated/display';
|
||||
import { MenuItemSelect } from 'twenty-ui-deprecated/navigation';
|
||||
import { ViewCalendarLayout } from '~/generated-metadata/graphql';
|
||||
|
||||
export const ObjectOptionsDropdownCalendarViewContent = () => {
|
||||
|
||||
+2
-2
@@ -31,8 +31,8 @@ import {
|
||||
IconListDetails,
|
||||
IconShare,
|
||||
IconTrash,
|
||||
} from 'twenty-ui/display';
|
||||
import { MenuItem } from 'twenty-ui/navigation';
|
||||
} from 'twenty-ui-deprecated/display';
|
||||
import { MenuItem } from 'twenty-ui-deprecated/navigation';
|
||||
import { ViewCalendarLayout } from '~/generated-metadata/graphql';
|
||||
|
||||
interface ObjectOptionsDropdownCustomViewProps {
|
||||
|
||||
+2
-2
@@ -19,8 +19,8 @@ import {
|
||||
IconListDetails,
|
||||
IconLock,
|
||||
useIcons,
|
||||
} from 'twenty-ui/display';
|
||||
import { MenuItem } from 'twenty-ui/navigation';
|
||||
} from 'twenty-ui-deprecated/display';
|
||||
import { MenuItem } from 'twenty-ui-deprecated/navigation';
|
||||
import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';
|
||||
|
||||
export const ObjectOptionsDropdownDefaultView = () => {
|
||||
|
||||
+2
-2
@@ -10,8 +10,8 @@ import { ViewFieldsVisibleDropdownSection } from '@/views/components/ViewFieldsV
|
||||
import { useLingui } from '@lingui/react/macro';
|
||||
import { isNonEmptyString } from '@sniptt/guards';
|
||||
import { useState } from 'react';
|
||||
import { IconChevronLeft, IconEyeOff } from 'twenty-ui/display';
|
||||
import { MenuItemNavigate } from 'twenty-ui/navigation';
|
||||
import { IconChevronLeft, IconEyeOff } from 'twenty-ui-deprecated/display';
|
||||
import { MenuItemNavigate } from 'twenty-ui-deprecated/navigation';
|
||||
|
||||
export const ObjectOptionsDropdownFieldsContent = () => {
|
||||
const { t } = useLingui();
|
||||
|
||||
+2
-2
@@ -14,8 +14,8 @@ import { ViewFieldsHiddenDropdownSection } from '@/views/components/ViewFieldsHi
|
||||
import { useLingui } from '@lingui/react/macro';
|
||||
import { SettingsPath } from 'twenty-shared/types';
|
||||
import { getSettingsPath } from 'twenty-shared/utils';
|
||||
import { IconChevronLeft, IconSettings } from 'twenty-ui/display';
|
||||
import { MenuItem, UndecoratedLink } from 'twenty-ui/navigation';
|
||||
import { IconChevronLeft, IconSettings } from 'twenty-ui-deprecated/display';
|
||||
import { MenuItem, UndecoratedLink } from 'twenty-ui-deprecated/navigation';
|
||||
|
||||
export const ObjectOptionsDropdownHiddenFieldsContent = () => {
|
||||
const { t } = useLingui();
|
||||
|
||||
+2
-2
@@ -23,8 +23,8 @@ import { useLocation } from 'react-router-dom';
|
||||
import { VIEW_GROUP_VISIBLE_OPTIONS_MAX } from 'twenty-shared/constants';
|
||||
import { SettingsPath } from 'twenty-shared/types';
|
||||
import { getSettingsPath } from 'twenty-shared/utils';
|
||||
import { IconChevronLeft, IconSettings } from 'twenty-ui/display';
|
||||
import { MenuItem, UndecoratedLink } from 'twenty-ui/navigation';
|
||||
import { IconChevronLeft, IconSettings } from 'twenty-ui-deprecated/display';
|
||||
import { MenuItem, UndecoratedLink } from 'twenty-ui-deprecated/navigation';
|
||||
|
||||
export const ObjectOptionsDropdownHiddenRecordGroupsContent = () => {
|
||||
const { t } = useLingui();
|
||||
|
||||
+6
-2
@@ -34,8 +34,12 @@ import {
|
||||
IconLayoutSidebarRight,
|
||||
IconTable,
|
||||
OverflowingTextWithTooltip,
|
||||
} from 'twenty-ui/display';
|
||||
import { MenuItem, MenuItemSelect, MenuItemToggle } from 'twenty-ui/navigation';
|
||||
} from 'twenty-ui-deprecated/display';
|
||||
import {
|
||||
MenuItem,
|
||||
MenuItemSelect,
|
||||
MenuItemToggle,
|
||||
} from 'twenty-ui-deprecated/navigation';
|
||||
import {
|
||||
ViewCalendarLayout,
|
||||
ViewOpenRecordIn,
|
||||
|
||||
+2
-2
@@ -20,8 +20,8 @@ import {
|
||||
IconChevronLeft,
|
||||
IconLayoutNavbar,
|
||||
IconLayoutSidebarRight,
|
||||
} from 'twenty-ui/display';
|
||||
import { MenuItemSelect } from 'twenty-ui/navigation';
|
||||
} from 'twenty-ui-deprecated/display';
|
||||
import { MenuItemSelect } from 'twenty-ui-deprecated/navigation';
|
||||
|
||||
export const ObjectOptionsDropdownLayoutOpenInContent = () => {
|
||||
const { onContentChange } = useObjectOptionsDropdown();
|
||||
|
||||
+8
-2
@@ -15,8 +15,14 @@ import { viewPickerSelectedIconComponentState } from '@/views/view-picker/states
|
||||
import { styled } from '@linaria/react';
|
||||
import { useContext, useEffect, useRef, useState } from 'react';
|
||||
import { Key } from 'ts-key-enum';
|
||||
import { OverflowingTextWithTooltip, useIcons } from 'twenty-ui/display';
|
||||
import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';
|
||||
import {
|
||||
OverflowingTextWithTooltip,
|
||||
useIcons,
|
||||
} from 'twenty-ui-deprecated/display';
|
||||
import {
|
||||
ThemeContext,
|
||||
themeCssVariables,
|
||||
} from 'twenty-ui-deprecated/theme-constants';
|
||||
import { useDebouncedCallback } from 'use-debounce';
|
||||
|
||||
const StyledDropdownMenuIconAndNameContainer = styled.div`
|
||||
|
||||
+6
-2
@@ -23,12 +23,16 @@ import { useLingui } from '@lingui/react/macro';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
import { SettingsPath } from 'twenty-shared/types';
|
||||
import { getSettingsPath, isDefined } from 'twenty-shared/utils';
|
||||
import { IconChevronLeft, IconSettings, useIcons } from 'twenty-ui/display';
|
||||
import {
|
||||
IconChevronLeft,
|
||||
IconSettings,
|
||||
useIcons,
|
||||
} from 'twenty-ui-deprecated/display';
|
||||
import {
|
||||
MenuItem,
|
||||
MenuItemSelect,
|
||||
UndecoratedLink,
|
||||
} from 'twenty-ui/navigation';
|
||||
} from 'twenty-ui-deprecated/navigation';
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
|
||||
export const ObjectOptionsDropdownRecordGroupFieldsContent = () => {
|
||||
|
||||
+2
-2
@@ -21,8 +21,8 @@ import {
|
||||
IconHandMove,
|
||||
IconSortAZ,
|
||||
IconSortZA,
|
||||
} from 'twenty-ui/display';
|
||||
import { MenuItemSelect } from 'twenty-ui/navigation';
|
||||
} from 'twenty-ui-deprecated/display';
|
||||
import { MenuItemSelect } from 'twenty-ui-deprecated/navigation';
|
||||
|
||||
export const ObjectOptionsDropdownRecordGroupSortContent = () => {
|
||||
const { currentContentId, onContentChange } = useObjectOptionsDropdown();
|
||||
|
||||
+2
-2
@@ -29,12 +29,12 @@ import {
|
||||
IconEyeOff,
|
||||
IconLayoutList,
|
||||
IconSortDescending,
|
||||
} from 'twenty-ui/display';
|
||||
} from 'twenty-ui-deprecated/display';
|
||||
import {
|
||||
MenuItem,
|
||||
MenuItemNavigate,
|
||||
MenuItemToggle,
|
||||
} from 'twenty-ui/navigation';
|
||||
} from 'twenty-ui-deprecated/navigation';
|
||||
|
||||
export const ObjectOptionsDropdownRecordGroupsContent = () => {
|
||||
const { t } = useLingui();
|
||||
|
||||
+2
-2
@@ -22,8 +22,8 @@ import {
|
||||
IconCircle,
|
||||
IconCircleDashed,
|
||||
IconCopy,
|
||||
} from 'twenty-ui/display';
|
||||
import { MenuItem, MenuItemSelect } from 'twenty-ui/navigation';
|
||||
} from 'twenty-ui-deprecated/display';
|
||||
import { MenuItem, MenuItemSelect } from 'twenty-ui-deprecated/navigation';
|
||||
import {
|
||||
ViewVisibility,
|
||||
PermissionFlagType,
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ import { ViewComponentInstanceContext } from '@/views/states/contexts/ViewCompon
|
||||
import { ViewType } from '@/views/types/ViewType';
|
||||
import { useEffect } from 'react';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||
import { ComponentDecorator } from 'twenty-ui-deprecated/testing';
|
||||
import { ContextStoreDecorator } from '~/testing/decorators/ContextStoreDecorator';
|
||||
import { IconsProviderDecorator } from '~/testing/decorators/IconsProviderDecorator';
|
||||
import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';
|
||||
|
||||
Reference in New Issue
Block a user