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
@@ -4,7 +4,7 @@ import { TextBubbleMenu } from '@/advanced-text-editor/components/TextBubbleMenu
import { FORM_FIELD_PLACEHOLDER_STYLES } from '@/object-record/record-field/ui/form-types/constants/FormFieldPlaceholderStyles';
import { styled } from '@linaria/react';
import { EditorContent, type Editor } from '@tiptap/react';
import { themeCssVariables } from 'twenty-ui/theme-constants';
import { themeCssVariables } from 'twenty-ui-deprecated/theme-constants';
const StyledEditorContainer = styled.div<{
readonly?: boolean;
@@ -1,8 +1,8 @@
import { styled } from '@linaria/react';
import React from 'react';
import type { IconComponent } from 'twenty-ui/display';
import { FloatingIconButton } from 'twenty-ui/input';
import { themeCssVariables } from 'twenty-ui/theme-constants';
import type { IconComponent } from 'twenty-ui-deprecated/display';
import { FloatingIconButton } from 'twenty-ui-deprecated/input';
import { themeCssVariables } from 'twenty-ui-deprecated/theme-constants';
type BubbleMenuIconButtonProps = {
className?: string;
@@ -9,7 +9,7 @@ import { isNonEmptyString } from '@sniptt/guards';
import { type Editor } from '@tiptap/core';
import { useId, useState, type FocusEvent, type FormEvent } from 'react';
import { getSafeUrl, isDefined } from 'twenty-shared/utils';
import { IconLink, IconPencil } from 'twenty-ui/display';
import { IconLink, IconPencil } from 'twenty-ui-deprecated/display';
type EditLinkPopoverProps = {
defaultValue: string | undefined;
@@ -8,7 +8,7 @@ import {
IconAlignLeft,
IconAlignRight,
IconTrash,
} from 'twenty-ui/display';
} from 'twenty-ui-deprecated/display';
type ImageBubbleMenuProps = {
editor: Editor;
@@ -4,7 +4,7 @@ import { StyledBubbleMenuContainer } from '@/advanced-text-editor/components/Tex
import { type Editor } from '@tiptap/core';
import { useEditorState } from '@tiptap/react';
import { BubbleMenu } from '@tiptap/react/menus';
import { IconExternalLink, IconLinkOff } from 'twenty-ui/display';
import { IconExternalLink, IconLinkOff } from 'twenty-ui-deprecated/display';
import { getSafeUrl } from 'twenty-shared/utils';
type LinkBubbleMenuProps = {
@@ -13,8 +13,8 @@ import {
IconListNumbers,
IconStrikethrough,
IconUnderline,
} from 'twenty-ui/display';
import { themeCssVariables } from 'twenty-ui/theme-constants';
} from 'twenty-ui-deprecated/display';
import { themeCssVariables } from 'twenty-ui-deprecated/theme-constants';
export const StyledBubbleMenuContainer = styled.div`
backdrop-filter: blur(20px);
@@ -7,9 +7,12 @@ import { styled } from '@linaria/react';
import { t } from '@lingui/core/macro';
import { type Editor } from '@tiptap/react';
import { useContext, useId } from 'react';
import { IconPilcrow } from 'twenty-ui/display';
import { MenuItem } from 'twenty-ui/navigation';
import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';
import { IconPilcrow } from 'twenty-ui-deprecated/display';
import { MenuItem } from 'twenty-ui-deprecated/navigation';
import {
ThemeContext,
themeCssVariables,
} from 'twenty-ui-deprecated/theme-constants';
const StyledMenuItem = styled.button`
align-items: center;
@@ -8,8 +8,11 @@ import { useLingui } from '@lingui/react/macro';
import { useContext } from 'react';
import { isDefined } from 'twenty-shared/utils';
import { type WorkflowAttachment } from 'twenty-shared/workflow';
import { IconUpload } from 'twenty-ui/display';
import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';
import { IconUpload } from 'twenty-ui-deprecated/display';
import {
ThemeContext,
themeCssVariables,
} from 'twenty-ui-deprecated/theme-constants';
type WorkflowSendEmailAttachmentsProps = {
files: WorkflowAttachment[];
@@ -3,7 +3,10 @@ import { useAdvancedTextEditor } from '@/advanced-text-editor/hooks/useAdvancedT
import { type Meta, type StoryObj } from '@storybook/react-vite';
import { expect, fn, userEvent, waitFor } from 'storybook/test';
import { isDefined } from 'twenty-shared/utils';
import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';
import {
ComponentDecorator,
RouterDecorator,
} from 'twenty-ui-deprecated/testing';
import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
import { WorkflowStepActionDrawerDecorator } from '~/testing/decorators/WorkflowStepActionDrawerDecorator';
@@ -2,7 +2,7 @@ import { styled } from '@linaria/react';
import { type NodeViewProps, NodeViewWrapper } from '@tiptap/react';
import React, { useCallback, useRef, useState } from 'react';
import { isDefined } from 'twenty-shared/utils';
import { themeCssVariables } from 'twenty-ui/theme-constants';
import { themeCssVariables } from 'twenty-ui-deprecated/theme-constants';
const IMAGE_MIN_WIDTH = 32;
const IMAGE_MAX_WIDTH = 600;
@@ -9,7 +9,7 @@ import {
IconList,
IconListNumbers,
IconPilcrow,
} from 'twenty-ui/display';
} from 'twenty-ui-deprecated/display';
export type SlashCommandConfig = {
id: string;
@@ -1,7 +1,7 @@
import { i18n } from '@lingui/core';
import { Extension, type Editor, type Range } from '@tiptap/core';
import Suggestion, { type SuggestionOptions } from '@tiptap/suggestion';
import { type IconComponent } from 'twenty-ui/display';
import { type IconComponent } from 'twenty-ui-deprecated/display';
import {
DEFAULT_SLASH_COMMANDS,
@@ -1,6 +1,6 @@
import { type Editor, type Range } from '@tiptap/core';
import { forwardRef, useCallback, useState } from 'react';
import { MenuItemSuggestion } from 'twenty-ui/navigation';
import { MenuItemSuggestion } from 'twenty-ui-deprecated/navigation';
import { type SlashCommandItem } from '@/advanced-text-editor/extensions/slash-command/SlashCommand';
import { SuggestionMenu } from '@/ui/suggestion/components/SuggestionMenu';
@@ -6,7 +6,7 @@ import {
IconH2,
IconH3,
IconPilcrow,
} from 'twenty-ui/display';
} from 'twenty-ui-deprecated/display';
export type TurnIntoBlockOptions = {
title: string;