Skip to content

Refactor Avatar to use Box #2019

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Closed

Refactor Avatar to use Box #2019

wants to merge 6 commits into from

Conversation

siddharthkp
Copy link
Member

@siddharthkp siddharthkp commented Apr 12, 2022

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

@changeset-bot
Copy link

changeset-bot bot commented Apr 12, 2022

⚠️ 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
Copy link
Contributor

github-actions bot commented Apr 12, 2022

size-limit report 📦

Path Size
dist/browser.esm.js 65.93 KB (+0.04% 🔺)
dist/browser.umd.js 66.21 KB (+0.04% 🔺)

@siddharthkp siddharthkp 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 jfuchs April 12, 2022 13:07
@siddharthkp siddharthkp 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
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

Copy link
Member Author

@siddharthkp siddharthkp Apr 29, 2022

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
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-actions bot added the Stale label Jul 17, 2022
@github-actions github-actions bot closed this Jul 24, 2022
@github-actions github-actions bot 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
Member Author

noooooo!

@siddharthkp siddharthkp reopened this Jul 25, 2022
@siddharthkp siddharthkp marked this pull request as draft July 25, 2022 15:48
@github-actions github-actions bot removed the Stale label Jul 25, 2022
@github-actions
Copy link
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-actions bot added the Stale label Sep 23, 2022
@@ -12,33 +11,31 @@ type StyledAvatarProps = {
src: string
/** Provide alt text when the Avatar is used without the user's name next to it. */
alt?: string
} & SxProp
} & SxProp &
Omit<React.ComponentProps<'img'>, 'ref'>
Copy link
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 github-actions bot removed the Stale label Sep 29, 2022
@github-actions
Copy link
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-actions bot added the Stale label Nov 28, 2022
@github-actions github-actions bot closed this Dec 5, 2022
@github-actions github-actions bot deleted the avatar-with-box branch December 5, 2022 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip changeset This change does not need a changelog Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants