Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions e2e/components/AvatarPair.test.ts

This file was deleted.

3 changes: 0 additions & 3 deletions packages/react/src/SkeletonAvatar/SkeletonAvatar.docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
},
{
"id": "components-skeleton-skeletonavatar-features--in-a-stack"
},
{
"id": "components-skeleton-skeletonavatar-features--in-an-avatar-pair"
}
],
"importPath": "@primer/react/experimental",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import type {Meta} from '@storybook/react-vite'
import type {ComponentProps} from '../utils/types'
import {SkeletonAvatar} from './SkeletonAvatar'
import AvatarStack from '../AvatarStack'
import AvatarPair from '../AvatarPair'

export default {
title: 'Components/Skeleton/SkeletonAvatar/Features',
Expand Down Expand Up @@ -51,10 +50,3 @@ export const InAStack = () => (
<SkeletonAvatar />
</AvatarStack>
)

export const InAnAvatarPair = () => (
<AvatarPair>
<SkeletonAvatar />
<SkeletonAvatar />
</AvatarPair>
)
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ exports[`@primer/react > should not update exports without a semver change 1`] =
"type AutocompleteMenuProps",
"type AutocompleteOverlayProps",
"Avatar",
"AvatarPair",
"type AvatarPairProps",
"type AvatarProps",
"AvatarStack",
"type AvatarStackProps",
Expand Down Expand Up @@ -232,6 +230,8 @@ exports[`@primer/react/deprecated > should not update exports without a semver c
"type ActionListProps",
"ActionMenu",
"type ActionMenuProps",
"AvatarPair",
"type AvatarPairProps",
"Dialog",
"type DialogHeaderProps",
"type DialogProps",
Expand Down
1 change: 0 additions & 1 deletion packages/react/src/__tests__/storybook.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const allowlist = [
'Autocomplete',
'Avatar',
'AvatarStack',
'AvatarPair',
'Breadcrumbs',
'BranchName',
'Blankslate',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
import React, {type HTMLProps} from 'react'
import type {AvatarProps} from '../Avatar'
import Avatar from '../Avatar'
import {SkeletonAvatar} from '../SkeletonAvatar'
import type {AvatarProps} from '../../Avatar'
import Avatar from '../../Avatar'
import {SkeletonAvatar} from '../../SkeletonAvatar'
import classes from './AvatarPair.module.css'
import {clsx} from 'clsx'

/**
* @deprecated AvatarPair is deprecated. Please see https://github.com/github/primer/issues/5533 for migration guidance.
*/
export type AvatarPairProps = HTMLProps<HTMLDivElement>

/**
* @deprecated AvatarPair is deprecated. Please see https://github.com/github/primer/issues/5533 for migration guidance.
*/
const AvatarPair = ({children, className, ...rest}: AvatarPairProps) => {
const avatars = React.Children.map(children, (child, i) => {
if (!React.isValidElement(child)) {
Expand Down
5 changes: 5 additions & 0 deletions packages/react/src/deprecated/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,8 @@ export type {TabNavProps, TabNavLinkProps} from '../TabNav'
export {default as Tooltip} from '../Tooltip/Tooltip'
export type {TooltipProps} from '../Tooltip/Tooltip'
// end of v37.0.0

// Deprecated in v37.31.0 - https://github.com/github/primer/issues/5533
export {default as AvatarPair} from './AvatarPair'
export type {AvatarPairProps} from './AvatarPair'
// end of v37.31.0
2 changes: 0 additions & 2 deletions packages/react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ export {default as Autocomplete} from './Autocomplete'
export type {AutocompleteMenuProps, AutocompleteInputProps, AutocompleteOverlayProps} from './Autocomplete'
export {default as Avatar} from './Avatar'
export type {AvatarProps} from './Avatar'
export {default as AvatarPair} from './AvatarPair'
export type {AvatarPairProps} from './AvatarPair'
export {default as AvatarStack} from './AvatarStack'
export type {AvatarStackProps} from './AvatarStack'
export {default as BranchName} from './BranchName'
Expand Down
1 change: 1 addition & 0 deletions results.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Copy link
Contributor

Choose a reason for hiding this comment

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

Delete this file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Deleted the results.json file as requested. Commit: 3b760cb

20 changes: 1 addition & 19 deletions script/generate-e2e-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,25 +184,7 @@ const components = new Map([
],
},
],
[
'AvatarPair',
{
stories: [
{
id: 'components-avatarpair--default',
name: 'Default',
},
{
id: 'components-avatarpair-features--parent-circle',
name: 'Parent Circle',
},
{
id: 'components-avatarpair-features--parent-square',
name: 'Parent Square',
},
],
},
],
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we do this now or when we remove the component?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the AvatarPair entry from the e2e test generation script as part of deprecation since we're removing all internal usage. This helps maintain consistency - the component is deprecated and should not have new e2e tests generated. Commit: 3b760cb


[
'BranchName',
{
Expand Down
Loading