Skip to content

improvement(ui): reuse avatars for owners and members - #8079

Open
BillLeoutsakosvl346 wants to merge 6 commits into
codex/typography-consolidationfrom
codex/control-fix-member-avatars
Open

BillLeoutsakosvl346 wants to merge 6 commits into
codex/typography-consolidationfrom
codex/control-fix-member-avatars

Conversation

@BillLeoutsakosvl346

@BillLeoutsakosvl346 BillLeoutsakosvl346 commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Use the existing Avatar family for owner and member photos, initials and failed-image fallback.
  • Give the existing xs size 8px initials centrally. Preserve the 14px footprint, image alt/referrer behavior, other sizes and explicit fallback overrides.

Type of Change

  • Refactor / maintainability improvement

Testing

  • Full workspace type checks, lint, repository audits (including import and API validation), generators and docs checks pass.
  • Complete EMCN test suite and relevant existing consumer suites pass.
  • Before/after browser fixtures cover light/dark styling, narrow layouts and the affected interaction patterns. Fixtures are isolated controls, not full authenticated product flows.
  • No landing-page changes or audit tooling included.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Sep 21, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
docs Ready Ready Preview Sep 22, 2026 8:20am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge with no outstanding correctness, security, or repository-rule issues.

Summary

The PR consolidates owner, member, and presence-avatar rendering around the shared EMCN Avatar components while preserving the 14px footprint, image metadata, fallback behavior, and caller overrides.

  • Replaces duplicated owner and member avatar markup with Avatar, AvatarImage, and AvatarFallback.
  • Propagates avatar size through context so xs fallbacks use 8px initials.
  • Adds focused tests for default, xs, and explicitly overridden fallback sizes.
  • Updates presence avatars to inherit shared xs sizing and use the equivalent named gray token.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Avatar size prop] --> B[AvatarSizeContext]
  B --> C[AvatarFallback]
  C --> D{Size is xs?}
  D -- Yes --> E[8px initials]
  D -- No --> F[text-xs initials]
  G[Caller className] --> C
  C --> H[Explicit caller override wins]
Loading

Reviews (3) · Last reviewed commit: "Merge branch 'codex/typography-consolida..."

Comment thread packages/emcn/src/components/avatar/avatar.tsx

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 3 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 4 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

Before / after visual comparison

Member/owner avatars reuse Avatar. Failed images now show initials; the photo example shows the normal state.

Left = before; right = after.

Rendered component fixtures with application CSS and local data, rather than authenticated product-page screenshots. These are representative visual examples, not end-to-end behavior coverage.

The broken-image symbol on the left is intentional: it illustrates the missing fallback that the shared Avatar fixes.

Current PR head checked at posting: daba366cb4.

Before and after: light avatar broken

Additional theme/state comparisons

Before and after: dark avatar broken

Before and after: light avatar photo

Before and after: dark avatar photo

@BillLeoutsakosvl346
BillLeoutsakosvl346 changed the base branch from codex/emcn-consolidation to codex/typography-consolidation September 22, 2026 08:18
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 5 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

This branch was successfully deployed

1 active deployment
Preview cfb736e6 Deployed Sep 22, 2026 by vercel[bot]
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.

1 participant