Skip to content

feat: Avatar component#104

Open
daBack wants to merge 5 commits intomainfrom
10-avatar
Open

feat: Avatar component#104
daBack wants to merge 5 commits intomainfrom
10-avatar

Conversation

@daBack
Copy link
Copy Markdown
Contributor

@daBack daBack commented Mar 15, 2026

I hope the assets work now :D

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 15, 2026

🦋 Changeset detected

Latest commit: 887b9a8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@scouterna/ui-webc Major
@scouterna/ui-react Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 15, 2026

Deploy Preview for scouterna-ui ready!

Name Link
🔨 Latest commit 887b9a8
🔍 Latest deploy log https://app.netlify.com/projects/scouterna-ui/deploys/69c004ed8883be00089d2cde
😎 Deploy Preview https://deploy-preview-104--scouterna-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@daBack daBack marked this pull request as ready for review March 22, 2026 14:28
Copilot AI review requested due to automatic review settings March 22, 2026 14:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new scout-avatar Stencil component to the design system and wires it into Storybook for documentation/demo, including a fallback image asset.

Changes:

  • Introduces scout-avatar component implementation (TSX) and styling (CSS).
  • Adds a Storybook story for the React wrapper (ScoutAvatar).
  • Updates Storybook static asset configuration to serve component assets.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
packages/ui-webc/src/components/avatar/avatar.tsx Implements the Avatar component with props and fallback-image logic.
packages/ui-webc/src/components/avatar/avatar.css Adds base layout and circular styling for the avatar image.
packages/ui-webc/src/components/avatar/readme.md Adds generated component documentation for Avatar.
packages/storybook/src/stories/avatar.stories.tsx Adds Storybook story to render and preview the Avatar component.
packages/storybook/.storybook/main.ts Extends staticDirs so Storybook can serve built UI-webc assets.

Comment on lines +4 to +6
getAssetPath,
h,
Prop,
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

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

Minor grammar: “scales to fit container” reads like it’s missing an article. Since this JSDoc is used for generated docs, please fix the wording here (and regenerate) rather than editing the generated readme directly.

Copilot uses AI. Check for mistakes.
display: flex;
aspect-ratio: 1 / 1;
}
img {
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

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

The component claims it “scales to fit container”, but the <img> isn’t styled to fill the host. Without width/height: 100% (and usually object-fit: cover), the image will render at its intrinsic size and may not scale/crop correctly inside the container.

Suggested change
img {
img {
width: 100%;
height: 100%;
object-fit: cover;

Copilot uses AI. Check for mistakes.
@daBack daBack requested a review from scriptcoded March 22, 2026 14:45
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.

3 participants