Skip to content

Feat/redesign avatar - #832

Merged
TorinAsakura merged 44 commits into
feat/redesign-linkfrom
feat/redesign-avatar
Nov 21, 2026
Merged

TorinAsakura merged 44 commits into
feat/redesign-linkfrom
feat/redesign-avatar

Conversation

@comfrt1k

Copy link
Copy Markdown
Contributor

Таска

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

  1. Контекст: Storybook → Components → Avatar → Docs
    Действие: переключить Shape и Form
    Ожидаемый результат: размеры xs/sm/md/lg — 60/80/100/120 px; формы circle и square соответствуют Figma

  2. Контекст: Controls компонента Avatar
    Действие: очистить src или указать недоступное изображение, затем вернуть рабочий URL
    Ожидаемый результат: отображается fallback; после успешной загрузки его заменяет изображение

  3. Контекст: Controls компонента Avatar
    Действие: включить Loading и Disabled
    Ожидаемый результат: Loading показывает затемнение и CircleProgress; Disabled применяет соответствующий appearance и блокирует интерактивную кнопку

  4. Контекст: интерактивный Avatar
    Действие: навести курсор, перейти к компоненту клавишей Tab, нажать Enter или Space
    Ожидаемый результат: отображаются hover, focused и pressed состояния; клавиатура активирует нативную кнопку

  5. Контекст: Controls компонента Avatar
    Действие: выключить Clickable
    Ожидаемый результат: Avatar становится статичным изображением и не участвует в Tab-навигации

Пруфы

Details
2026-11-13.19.45.32.mov

comfrt1k and others added 13 commits November 6, 2026 10:54
BREAKING CHANGE: Replace tooltip container, arrow and animated props with the new API.
Text is required and shape and appearance use new models.
BREAKING CHANGE: Replace AvatarImage/AvatarFallback composition and children with Avatar src,
imageProps, fallback, loading, and loader props. The alt prop is now required.
Replace size and string shape props with AvatarShape data and avatarShapes.xs/sm/md/lg.
Default sizes change from 40/48/56 to 60/80/100/120. Use shape.box.radius for circle/square.
Remove asChild; use clickable for a native button. The ref targets that button or a static span.
Remove AvatarVariants, AvatarFallbackVariants, ImageProps, and FallbackProps exports.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 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-21T12:55:07.214180Z f36de38 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.

)
}
return (
<span ref={ref} {...boxProps}>

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.

При clickable=false те же props попадают на span. В Chromium статичный Avatar с tabIndex=0 получил фокус по Tab, а при disabled клик всё равно вызвал onClick, несмотря на aria-disabled=true. Раздели props статичного и интерактивного вариантов и проверь переключение clickable с сохранённым обработчиком.

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.

Apply buttonProps only to clickable avatars so static avatars do not
receive button handlers or focus attributes.

BREAKING CHANGE: Move root DOM event handlers and button/focus attributes
into buttonProps. These props apply only when clickable is true.
Keep disabled, ref, className, style and shared ARIA attributes on Avatar.
The native button type remains button.
@TorinAsakura
TorinAsakura changed the base branch from feat/redesign-progress to feat/redesign-link November 17, 2026 18:39
@TorinAsakura
TorinAsakura added this pull request to stack #834 November 17, 2026 18:39
@TorinAsakura
TorinAsakura merged commit 82292ba into feat/v2 Nov 21, 2026
2 checks passed
@TorinAsakura
TorinAsakura deleted the feat/redesign-avatar branch November 21, 2026 12:56
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