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:
+1
-1
@@ -9,7 +9,7 @@ import { sidePanelPageState } from '@/side-panel/states/sidePanelPageState';
|
||||
import { jotaiStore } from '@/ui/utilities/state/jotai/jotaiStore';
|
||||
import { ContextStoreViewType } from '@/context-store/types/ContextStoreViewType';
|
||||
import { SidePanelPages } from 'twenty-shared/types';
|
||||
import { Icon123, useIcons } from 'twenty-ui/display';
|
||||
import { Icon123, useIcons } from 'twenty-ui-deprecated/display';
|
||||
import { getJestMetadataAndApolloMocksAndCommandMenuWrapper } from '~/testing/jest/getJestMetadataAndApolloMocksAndCommandMenuWrapper';
|
||||
import { getTestEnrichedObjectMetadataItemsMock } from '~/testing/utils/getTestEnrichedObjectMetadataItemsMock';
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import { useOpenAskAiPageInSidePanel } from '@/side-panel/hooks/useOpenAskAiPage
|
||||
import { isSidePanelOpenedState } from '@/side-panel/states/isSidePanelOpenedState';
|
||||
import { jotaiStore } from '@/ui/utilities/state/jotai/jotaiStore';
|
||||
import { SidePanelPages } from 'twenty-shared/types';
|
||||
import { IconSparkles } from 'twenty-ui/display';
|
||||
import { IconSparkles } from 'twenty-ui-deprecated/display';
|
||||
|
||||
const navigateSidePanelMenuMock = jest.fn();
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import { viewableRecordIdComponentState } from '@/side-panel/pages/record-page/s
|
||||
import { ContextStoreViewType } from '@/context-store/types/ContextStoreViewType';
|
||||
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
|
||||
import { SidePanelPages } from 'twenty-shared/types';
|
||||
import { IconCalendarEvent } from 'twenty-ui/display';
|
||||
import { IconCalendarEvent } from 'twenty-ui-deprecated/display';
|
||||
import { getJestMetadataAndApolloMocksAndCommandMenuWrapper } from '~/testing/jest/getJestMetadataAndApolloMocksAndCommandMenuWrapper';
|
||||
import { getTestEnrichedObjectMetadataItemsMock } from '~/testing/utils/getTestEnrichedObjectMetadataItemsMock';
|
||||
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ import { sidePanelNavigationMorphItemsByPageState } from '@/side-panel/states/si
|
||||
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
|
||||
import { jotaiStore } from '@/ui/utilities/state/jotai/jotaiStore';
|
||||
import { ContextStorePageType, SidePanelPages } from 'twenty-shared/types';
|
||||
import { useIcons } from 'twenty-ui/display';
|
||||
import { useIcons } from 'twenty-ui-deprecated/display';
|
||||
import { getJestMetadataAndApolloMocksAndCommandMenuWrapper } from '~/testing/jest/getJestMetadataAndApolloMocksAndCommandMenuWrapper';
|
||||
import { getTestEnrichedObjectMetadataItemsMock } from '~/testing/utils/getTestEnrichedObjectMetadataItemsMock';
|
||||
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomState
|
||||
import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';
|
||||
import { jotaiStore } from '@/ui/utilities/state/jotai/jotaiStore';
|
||||
import { SidePanelPages } from 'twenty-shared/types';
|
||||
import { IconList } from 'twenty-ui/display';
|
||||
import { IconList } from 'twenty-ui-deprecated/display';
|
||||
|
||||
const mockCloseDropdown = jest.fn();
|
||||
const mockResetSelectedItem = jest.fn();
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ import { sidePanelPageState } from '@/side-panel/states/sidePanelPageState';
|
||||
import { isSidePanelOpenedState } from '@/side-panel/states/isSidePanelOpenedState';
|
||||
import { jotaiStore } from '@/ui/utilities/state/jotai/jotaiStore';
|
||||
import { SidePanelPages } from 'twenty-shared/types';
|
||||
import { IconList, IconSearch } from 'twenty-ui/display';
|
||||
import { IconList, IconSearch } from 'twenty-ui-deprecated/display';
|
||||
|
||||
const Wrapper = ({ children }: { children: React.ReactNode }) => (
|
||||
<JotaiProvider store={jotaiStore}>
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import { renderHook } from '@testing-library/react';
|
||||
import { Provider as JotaiProvider } from 'jotai';
|
||||
import { act } from 'react';
|
||||
import { SidePanelPages } from 'twenty-shared/types';
|
||||
import { IconArrowDown, IconDotsVertical } from 'twenty-ui/display';
|
||||
import { IconArrowDown, IconDotsVertical } from 'twenty-ui-deprecated/display';
|
||||
|
||||
const mockedPageInfo = {
|
||||
title: 'Initial Title',
|
||||
|
||||
@@ -14,7 +14,7 @@ import { FocusComponentType } from '@/ui/utilities/focus/types/FocusComponentTyp
|
||||
import { useStore } from 'jotai';
|
||||
import { useCallback } from 'react';
|
||||
import { type SidePanelPages } from 'twenty-shared/types';
|
||||
import { type IconComponent } from 'twenty-ui/display';
|
||||
import { type IconComponent } from 'twenty-ui-deprecated/display';
|
||||
import { v4 } from 'uuid';
|
||||
|
||||
export type SidePanelNavigationStackItem = {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomState
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { useCallback } from 'react';
|
||||
import { SidePanelPages } from 'twenty-shared/types';
|
||||
import { IconSparkles } from 'twenty-ui/display';
|
||||
import { IconSparkles } from 'twenty-ui-deprecated/display';
|
||||
import { v4 } from 'uuid';
|
||||
|
||||
export const useOpenAskAiPageInSidePanel = () => {
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import { viewableRecordIdComponentState } from '@/side-panel/pages/record-page/s
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { useCallback } from 'react';
|
||||
import { SidePanelPages } from 'twenty-shared/types';
|
||||
import { IconCalendarEvent } from 'twenty-ui/display';
|
||||
import { IconCalendarEvent } from 'twenty-ui-deprecated/display';
|
||||
import { v4 } from 'uuid';
|
||||
import { useStore } from 'jotai';
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import {
|
||||
type IconComponent,
|
||||
IconArrowBackUp,
|
||||
IconMail,
|
||||
} from 'twenty-ui/display';
|
||||
} from 'twenty-ui-deprecated/display';
|
||||
import { v4 } from 'uuid';
|
||||
|
||||
import { useSidePanelMenu } from '@/side-panel/hooks/useSidePanelMenu';
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import { viewableFrontComponentIdComponentState } from '@/side-panel/pages/front
|
||||
import { viewableFrontComponentRecordContextComponentState } from '@/side-panel/pages/front-component/states/viewableFrontComponentRecordContextComponentState';
|
||||
import { useStore } from 'jotai';
|
||||
import { SidePanelPages } from 'twenty-shared/types';
|
||||
import { type IconComponent } from 'twenty-ui/display';
|
||||
import { type IconComponent } from 'twenty-ui-deprecated/display';
|
||||
import { v4 } from 'uuid';
|
||||
|
||||
export const useOpenFrontComponentInSidePanel = () => {
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ import { SidePanelPages } from 'twenty-shared/types';
|
||||
|
||||
import { msg, t } from '@lingui/core/macro';
|
||||
import { useCallback } from 'react';
|
||||
import { IconArrowMerge } from 'twenty-ui/display';
|
||||
import { IconArrowMerge } from 'twenty-ui-deprecated/display';
|
||||
import { v4 } from 'uuid';
|
||||
import { useStore } from 'jotai';
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import { t } from '@lingui/core/macro';
|
||||
import { useStore } from 'jotai';
|
||||
import { useCallback } from 'react';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
import { useIcons } from 'twenty-ui/display';
|
||||
import { useIcons } from 'twenty-ui-deprecated/display';
|
||||
import { v4 } from 'uuid';
|
||||
|
||||
export const useOpenRecordInSidePanel = () => {
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import { isSidePanelOpenedState } from '@/side-panel/states/isSidePanelOpenedSta
|
||||
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { SidePanelPages } from 'twenty-shared/types';
|
||||
import { IconSearch } from 'twenty-ui/display';
|
||||
import { IconSearch } from 'twenty-ui-deprecated/display';
|
||||
import { v4 } from 'uuid';
|
||||
|
||||
export const useOpenRecordsSearchPageInSidePanel = () => {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { t } from '@lingui/core/macro';
|
||||
import { useStore } from 'jotai';
|
||||
import { useCallback } from 'react';
|
||||
import { SidePanelPages } from 'twenty-shared/types';
|
||||
import { IconPencil } from 'twenty-ui/display';
|
||||
import { IconPencil } from 'twenty-ui-deprecated/display';
|
||||
|
||||
export const useOpenRichTextInSidePanel = () => {
|
||||
const { navigateSidePanelMenu, openSidePanelMenu } = useSidePanelMenu();
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import { SidePanelPages } from 'twenty-shared/types';
|
||||
|
||||
import { msg, t } from '@lingui/core/macro';
|
||||
import { useCallback } from 'react';
|
||||
import { IconBoxMultiple } from 'twenty-ui/display';
|
||||
import { IconBoxMultiple } from 'twenty-ui-deprecated/display';
|
||||
|
||||
type UseOpenUpdateMultipleRecordsPageInSidePanelProps = {
|
||||
contextStoreInstanceId: string;
|
||||
|
||||
@@ -12,7 +12,10 @@ import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomState
|
||||
import { useContext, useMemo } from 'react';
|
||||
import { SidePanelPages } from 'twenty-shared/types';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';
|
||||
import {
|
||||
ThemeContext,
|
||||
themeCssVariables,
|
||||
} from 'twenty-ui-deprecated/theme-constants';
|
||||
|
||||
export const useSidePanelContextChips = () => {
|
||||
const { theme } = useContext(ThemeContext);
|
||||
|
||||
@@ -17,7 +17,10 @@ import { useStore } from 'jotai';
|
||||
import { useCallback } from 'react';
|
||||
import { SidePanelPages } from 'twenty-shared/types';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
import { IconColumnInsertRight, IconDotsVertical } from 'twenty-ui/display';
|
||||
import {
|
||||
IconColumnInsertRight,
|
||||
IconDotsVertical,
|
||||
} from 'twenty-ui-deprecated/display';
|
||||
|
||||
export const useSidePanelMenu = () => {
|
||||
const store = useStore();
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import { sidePanelNavigationStackState } from '@/side-panel/states/sidePanelNavigationStackState';
|
||||
import { sidePanelPageInfoState } from '@/side-panel/states/sidePanelPageInfoState';
|
||||
import { useCallback } from 'react';
|
||||
import { type IconComponent, IconDotsVertical } from 'twenty-ui/display';
|
||||
import {
|
||||
type IconComponent,
|
||||
IconDotsVertical,
|
||||
} from 'twenty-ui-deprecated/display';
|
||||
import { useStore } from 'jotai';
|
||||
|
||||
export const useUpdateSidePanelPageInfo = () => {
|
||||
|
||||
Reference in New Issue
Block a user