Skip to content

FE-1295: Add avatar to ds - #9123

Open
alex-e-leon wants to merge 14 commits into
mainfrom
FE-1295-add-avatar-to-ds
Open

FE-1295: Add avatar to ds#9123
alex-e-leon wants to merge 14 commits into
mainfrom
FE-1295-add-avatar-to-ds

Conversation

@alex-e-leon

@alex-e-leon alex-e-leon commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

🌟 What is the purpose of this PR?

Rebuild Avatar component in DS. Note the old Avatar component that this replaces was not previously used anywhere, so this is a safe update.

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • does not modify any publishable blocks or libraries, or modifications do not need publishing

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
petrinaut Ready Ready Preview Jul 31, 2026 4:55pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
hash Ignored Ignored Preview Jul 31, 2026 4:55pm
hashdotdesign-tokens Ignored Ignored Preview Jul 31, 2026 4:55pm

@cursor

cursor Bot commented Jul 30, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Breaking API and export changes in a publishable library (minor bump), though the prior Avatar reportedly had no consumers; adoption will need prop migrations.

Overview
Replaces the Ark UI–based Avatar with a custom implementation and a new minor public API (@hashintel/ds-components changeset).

API: Required alt and structured placeholder (initials | icon | custom); sizes align with form tokens (xxslg, custom via --avatar-size); tone (neutral | brand); optional interactivity as button (onClick) or link (href). Removed pixel string sizes, freeform fallback, status indicator, onStatusChange, and exported AvatarProps.

Behavior & UI: Manual load/error handling keeps the placeholder visible until the image loads (including cached images); images use referrerPolicy="no-referrer". Styling moves to avatar.recipe.ts (sva) with hover/focus for interactive avatars. Adds solid user icon for placeholder icons.

Stories: Moved from Legacy to Components/Avatar with matrix stories for placeholders, sizes, and image edge cases. Package entry now exports Avatar only (no AvatarProps type).

Reviewed by Cursor Bugbot for commit 1d7891c. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions github-actions Bot added area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team area/apps > hash.design Affects the `hash.design` design site (app) labels Jul 30, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit acc9e8c. Configure here.

Comment thread libs/@hashintel/ds-components/src/components/Avatar/avatar.tsx Outdated
@github-actions github-actions Bot added the area/infra Relates to version control, CI, CD or IaC (area) label Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apps > hash.design Affects the `hash.design` design site (app) area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

1 participant