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:
Raphaël Bosi
2026-06-08 18:12:28 +02:00
committed by GitHub
parent a91e737e69
commit c596a5e342
2320 changed files with 6313 additions and 4856 deletions
@@ -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();
@@ -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 = () => {
@@ -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 {
@@ -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 = () => {
@@ -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();
@@ -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();
@@ -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();
@@ -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,
@@ -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();
@@ -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`
@@ -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 = () => {
@@ -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();
@@ -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();
@@ -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,
@@ -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';