Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Select,List): graceful replacement list item view of the List #1540

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

IsaevAlexandr
Copy link
Contributor

No description provided.

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@gravity-ui-bot
Copy link
Contributor

Playwright Test Component is ready.

@IsaevAlexandr IsaevAlexandr force-pushed the replace-list-item-view branch from b15fd59 to ee7dcfb Compare April 23, 2024 17:01
@IsaevAlexandr
Copy link
Contributor Author

@korvin89 @amje @ValeraS Hi, when will it be possible to watch pr?

@@ -53,7 +63,13 @@ export type ListItemProps<T> = {
itemIndex: number;
active: boolean;
selected: boolean;
// TODO: написать soft миграцию
newListView?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicated prop

@@ -26,6 +27,8 @@ type SelectListProps = {
virtualized?: boolean;
loading?: boolean;
onLoadMore?: () => void;
// TODO: надпись про soft миграцию
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo

@@ -6,4 +6,25 @@ $block: '.#{variables.$ns}select-popup';
display: flex;
flex-direction: column;
max-height: 90vh;

&_newListView {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use kebab-case in css code


&_size_xl {
border-radius: var(--g-list-container-border-radius, 10px);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be shorten to:

border-radius: var(--g-list-container-border-radius, --_--border-radius);

&_size_s {
    --_--border-radius: 5px;
}

// &_size_m

@@ -85,6 +85,8 @@ export type SelectProps<T = any> = QAProps &
width?: 'auto' | 'max' | number;
popupWidth?: 'fit' | number;
virtualizationThreshold?: number;
// TODO: про soft миграцию
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo

@@ -29,6 +29,7 @@ export interface ThemeProviderProps extends React.PropsWithChildren<{}> {
scoped?: boolean;
rootClassName?: string;
layout?: Omit<PrivateLayoutProviderProps, 'children'>;
experiments?: {_newListView?: boolean};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why prefix names with underscore? If experiments not prefixed neither should keys inside it

@@ -8,4 +8,8 @@ export interface ThemeContextProps {
theme: Theme;
themeValue: RealTheme;
direction: Direction;
/**
* Ability to define soft migration for new list item view
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's clarify that the property is not for public usage

Suggested change
* Ability to define soft migration for new list item view
* DO NOT USE. Internally used for soft migration to the new list item view

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants