Skip to content

YH-2049: add skeleton for CollectionCreatePage#1282

Open
CreateYourDream wants to merge 6 commits into
developfrom
feature/YH-2049
Open

YH-2049: add skeleton for CollectionCreatePage#1282
CreateYourDream wants to merge 6 commits into
developfrom
feature/YH-2049

Conversation

@CreateYourDream

Copy link
Copy Markdown
Collaborator
  • Добавлен skeleton для CollectionForm
  • Добавлен skeleton для страницы CollectionCreatePage
  • CollectionCreateFormSkeleton подключен в SkeletonGenerator

Дополнительные изменения:

  • Добавлен пропс height для ButtonSkeleton

@CreateYourDream CreateYourDream added review the task is currently being reviewed feature New functionality or improvements labels Jun 4, 2026
roles={['admin', 'author']}
hasData
stubs={{}}
skeleton={<CollectionCreateFormSkeleton />}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[ISSUE] - Сюда скелетон нет смысла указыать так как мы не загружаем ничего здесь. skeleton работает в паре с isLoading. А isLoading мы тут не используем

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

убрал

return (
<Flex componentType="main" direction="column" gap="24">
<CollectionCreateFormHeaderSkeleton />
<Card>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[SUGGESTION] - Вместо Card используй CardSkeleton. Фактически разницы не будет конкретно здесь, но надо сделать так

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

исправил


import { CollectionFormSkeleton } from '@/entities/collection';

import { CollectionCreateFormHeaderSkeleton } from '@/features/collections/createCollection';

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[SUGGESTION] - Импорт относительный надо сделать

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

исправил

export { PreviewCollectionsItemSkeleton } from './ui/PreviewCollectionItem/PreviewCollectionsItem.skeleton';
export { CollectionsPreviewSkeleton } from './ui/CollectionPreview/CollectionPreview.sekeleton';
export { CollectionSelect } from './ui/CollectionSelect/CollectionSelect';
export { CollectionFormSkeleton } from './ui/CollectionForm/CollectionForm.skeleton';

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[SUGGESTION] - Глуппый с моей стороны коммент, но подвинь этот импорт под основной компонент, чтобы было так

Image

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

исправил

dataTestId={dataTestId}
borderRadius={12}
width={width}
height={height}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[ISSUE] - Высоту вручную прокидывать нет смысла, так как она регулируется с помощью пропса size

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

исправил

<FormFieldSkeleton>
<FormControlSkeleton className={styles['skeleton-checkbox-control']}>
<Flex gap="26" maxWidth={true} align="center">
<Skeleton width={170} height={20} borderRadius={20} />

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[ISSUE] - Тут для Radio

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

исправил


<FormFieldSkeleton>
<FormControlSkeleton>
<DropdownSkeleton

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[ISSUE] - Тут для SpecializationSelect

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

исправил

<FormFieldSkeleton>
<FormControlSkeleton>
<Flex direction="column" gap="28">
<DropdownSkeleton size="S" />

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[ISSUE] - Тут для KeywordSelect и KeywordInput

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

исправил

<FormFieldSkeleton>
<FormControlSkeleton className={styles['skeleton-actions-control']}>
<Flex gap="8" justify="between">
<TextSkeleton width={200} variant="body5" className={styles['skeleton-actions-text']} />

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[ISSUE] - Тут и ниже похожие будут скелетоны для ChooseQuestionsDrawer и ChooseTasksDrawer.
И formFieldSkeleton получается не нужны тут так как внутри этих компонент нужно будет указать скелетоны для текстов

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

исправил

max-width: 408px;
}

.skeleton-title-control {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[ISSUE] - Слишком много ненужных стилей относящихся к скелетонам. По идее их должно быть 0. Так как в скелетонах переиспользуются стили основного компонента

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

  • оставил стиль 'skeleton-textarea' который устанавливает margin для TextAreaSkeleton подобно реализации TextArea в CollectionForm
  • оставил стиль 'skeleton-form-field' т.к FormFieldSkeleton создает лишний отступ при countTextFields=1, хотя при значении countTextFields > 2 все встает ровно по контентной части
  • оставил 'skeleton-keywords-control' который добавляет отступ чтобы скелетон соответствовал макету, поскольку в KeywordInput при пустом keywordsArray рендериться пустой div и gap до этого div дает этот самый отступ, поэтому решил задать отступ сверху

@PerelomaDenis PerelomaDenis added comments Code improvements are required and removed review the task is currently being reviewed labels Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comments Code improvements are required feature New functionality or improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants