Skip to content

Refactor Avatar to use Box - #2019

Closed
siddharthkp wants to merge 6 commits into
mainfrom
avatar-with-box
Closed

Refactor Avatar to use Box#2019
siddharthkp wants to merge 6 commits into
mainfrom
avatar-with-box

Conversation

@siddharthkp

@siddharthkpsiddharthkp commented Apr 12, 2022

Copy link
Copy Markdown
Member

Refactor Avatar to use Box + sx as recommended in #2020

@changeset-bot

changeset-botBot commented Apr 12, 2022

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f1fcc62

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@github-actions

github-actionsBot commented Apr 12, 2022

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
dist/browser.esm.js65.93 KB (+0.04% 🔺)
dist/browser.umd.js66.21 KB (+0.04% 🔺)

@siddharthkpsiddharthkp added the skip changeset This change does not need a changelog label Apr 12, 2022
@siddharthkp
siddharthkp marked this pull request as ready for review April 12, 2022 13:07
@siddharthkp
siddharthkp requested review from a team and jfuchsApril 12, 2022 13:07
@siddharthkpsiddharthkp self-assigned this Apr 12, 2022
Comment on lines +26 to +32
export function CustomSize(): JSX.Element {
return <Avatar size={48} alt="Primer logo" src="https://avatars.githubusercontent.com/primer" />
}

export function SquareAvatar(): JSX.Element {
return <Avatar square alt="Primer logo" src="https://avatars.githubusercontent.com/primer" />
}

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.

These could just be Storybook controls

@siddharthkpsiddharthkpApr 29, 2022

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

True! I'm creating extra stories so that they can be part of our visual regression testing suite :)

Should I also add a story with all the controls? (.langermank calls it the playground story in primer-css)

@mperrotti
mperrotti temporarily deployed to github-pages April 28, 2022 21:05 Inactive
@siddharthkp
siddharthkp temporarily deployed to github-pages May 18, 2022 10:37 Inactive
@github-actions

Copy link
Copy Markdown
Contributor

Hi! This pull request has been marked as stale because it has been open with no activity for 60 days. You can comment on the pull request or remove the stale label to keep it open. If you do nothing, this pull request will be closed in 7 days.

@github-actions
github-actionsBot deleted the avatar-with-box branch July 24, 2022 11:04
@siddharthkp
siddharthkp restored the avatar-with-box branch July 25, 2022 15:47
@siddharthkp

Copy link
Copy Markdown
MemberAuthor

noooooo!

@siddharthkp
siddharthkp marked this pull request as draft July 25, 2022 15:48
@github-actions

Copy link
Copy Markdown
Contributor

Hi! This pull request has been marked as stale because it has been open with no activity for 60 days. You can comment on the pull request or remove the stale label to keep it open. If you do nothing, this pull request will be closed in 7 days.

Comment threadsrc/Avatar.tsx
alt?: string
} & SxProp
} & SxProp &
Omit<React.ComponentProps<'img'>, 'ref'>

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.

We could use ComponentPropsWithoutRef here

Suggested change
Omit<React.ComponentProps<'img'>,'ref'>
React.ComponentPropsWithoutRef<'img'>

@github-actions

Copy link
Copy Markdown
Contributor

Hi! This pull request has been marked as stale because it has been open with no activity for 60 days. You can comment on the pull request or remove the stale label to keep it open. If you do nothing, this pull request will be closed in 7 days.

@github-actions
github-actionsBot deleted the avatar-with-box branch December 5, 2022 18:04
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changesetThis change does not need a changelogStale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@siddharthkp@mperrotti@colebemis