Skip to content

Feat/redesign upload - #840

Merged
TorinAsakura merged 16 commits into
feat/v2from
feat/redesign-upload
Nov 26, 2026
Merged

TorinAsakura merged 16 commits into
feat/v2from
feat/redesign-upload

Conversation

@comfrt1k

@comfrt1k comfrt1k commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Таска

Как проверять

Upload

  1. Контекст: Storybook → Components/Upload → Base.
    Действие: выбрать PNG или JPEG, дождаться завершения демопрогресса, удалить файл.
    Ожидаемый результат: файл появляется в списке, проходит загрузку и удаляется по нажатию кнопки.

  2. Контекст: та же сторис.
    Действие: выбрать TXT.
    Ожидаемый результат: показывается сообщение о неподходящем формате, файл не добавляется.

  3. Контекст: Controls Upload.
    Действие: включить failUpload и выбрать подходящий файл.
    Ожидаемый результат: после демопрогресса FileItem переходит в состояние ошибки; файл можно удалить.

  4. Контекст: Storybook → Components/Upload/FileItem → Base.
    Действие: переключить loading/uploaded/error, задать длинное имя файла.
    Ожидаемый результат: прогресс отображается при загрузке, ошибка выделяется цветом, удаление доступно после загрузки и при ошибке; имя переносится внутри контейнера.

Пруфы

Details
2026-11-24.21.14.32.mov

@comfrt1k
comfrt1k marked this pull request as ready for review November 24, 2026 18:26
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T21:03:51.210533Z 709a3e6 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Comment thread ui-parts/upload/src/constants.ts Outdated
@@ -0,0 +1,3 @@
export const DEFAULT_LABEL = 'Click or drag file to this area to upload'
export const LOADING_LABEL = 'Loading\nfile...'
export const ERROR_LABEL = 'Some error text about something'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Наведи TXT на зону, которая принимает PNG/JPEG. Пока файл над зоной, компонент показывает Some error text about something. Понятная подсказка появляется только после сброса, когда её подставляет onReject в Storybook. Давай заменим заглушку из макета на сообщение, из которого понятно, что файл не подходит.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

default: colors,
hover: colors,
pressed: colors,
focused: colors,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

После загрузки нажми Tab до корзины. Кнопка получает :focus-visible, но обводка остаётся прозрачной и кнопка выглядит так же, как без фокуса. Добавь видимый фокус для удаления файла.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

action={action}
progress={indicator}
>
<Name text={name} shape={resolvedShape.name} appearance={colors.name[state]} />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Сравни загрузку файла с failUpload=false и true. При ошибке меняются цвета имени и корзины, а Chromium отдаёт скринридеру то же имя и ту же кнопку удаления, что после успеха. Добавь текстовый статус ошибки, связанный с этим файлом.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@TorinAsakura
TorinAsakura merged commit 8a2f080 into feat/v2 Nov 26, 2026
2 checks passed
@TorinAsakura
TorinAsakura deleted the feat/redesign-upload branch November 26, 2026 10:36
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.

2 participants