[REFACTOR] Twenty UI multi barrel (#11301)
# Introduction closes https://github.com/twentyhq/core-team-issues/issues/591 Same than for `twenty-shared` made in https://github.com/twentyhq/twenty/pull/11083. ## TODO - [x] Manual migrate twenty-website twenty-ui imports ## What's next: - Generate barrel and migration script factorization within own package + tests - Refactoring using preconstruct ? TimeBox - Lint circular dependencies - Lint import from barrel and forbid them ### Preconstruct We need custom rollup plugins addition, but preconstruct does not expose its rollup configuration. It might be possible to handle this using the babel overrides. But was a big tunnel. We could give it a try afterwards ! ( allowing cjs interop and stuff like that ) Stuck to vite lib app Closed related PRs: - https://github.com/twentyhq/twenty/pull/11294 - https://github.com/twentyhq/twenty/pull/11203
This commit is contained in:
@ -1,14 +1,12 @@
|
||||
import styled from '@emotion/styled';
|
||||
import { ReactElement, useCallback, useEffect, useRef, useState } from 'react';
|
||||
import {
|
||||
AnimatedContainer,
|
||||
ChipSize,
|
||||
OverflowingTextWithTooltip,
|
||||
} from 'twenty-ui';
|
||||
|
||||
import { ExpandedListDropdown } from '@/ui/layout/expandable-list/components/ExpandedListDropdown';
|
||||
import { isFirstOverflowingChildElement } from '@/ui/layout/expandable-list/utils/isFirstOverflowingChildElement';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
import { AnimatedContainer } from 'twenty-ui/utilities';
|
||||
import { ChipSize } from 'twenty-ui/components';
|
||||
import { OverflowingTextWithTooltip } from 'twenty-ui/display';
|
||||
|
||||
const StyledContainer = styled.div`
|
||||
align-items: center;
|
||||
|
||||
@ -4,8 +4,10 @@ import { Meta, StoryObj } from '@storybook/react';
|
||||
import { userEvent, within } from '@storybook/test';
|
||||
|
||||
import { ExpandableList } from '@/ui/layout/expandable-list/components/ExpandableList';
|
||||
import { ComponentDecorator, MAIN_COLOR_NAMES, Tag } from 'twenty-ui';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
import { Tag } from 'twenty-ui/components';
|
||||
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||
import { MAIN_COLOR_NAMES } from 'twenty-ui/theme';
|
||||
|
||||
const StyledContainer = styled.div`
|
||||
padding: ${({ theme }) => theme.spacing(1)};
|
||||
@ -58,7 +60,7 @@ export const WithExpandedList: Story = {
|
||||
|
||||
const rootCanvas = within(root);
|
||||
|
||||
const chipCount = await rootCanvas.findByText('+3');
|
||||
const chipCount = await rootCanvas.findByText(/^\+\d+$/);
|
||||
|
||||
await userEvent.click(chipCount);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user