-
Notifications
You must be signed in to change notification settings - Fork 2.9k
chore(react-avatar): Adding warnings on use of AvatarGroup and AvatarGroupItem #23498
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
chore(react-avatar): Adding warnings on use of AvatarGroup and AvatarGroupItem #23498
Conversation
… AvatarGroupItem and for AvatarGroupItem to check if it's being used inside an AvatarGroup.
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 84819d3:
|
📊 Bundle size reportUnchanged fixtures
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 5ea871d03d388b192a83e2e5c0e0717e7dc61add (build) |
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 886 | 912 | 5000 | |
| Button | mount | 540 | 557 | 5000 | |
| FluentProvider | mount | 1819 | 1872 | 5000 | |
| FluentProviderWithTheme | mount | 294 | 288 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 208 | 221 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 319 | 307 | 10 | |
| MakeStyles | mount | 1544 | 1570 | 50000 |
…GroupItem (microsoft#23498) * chore: Added warning for AvatarGroup to check if children are of type AvatarGroupItem and for AvatarGroupItem to check if it's being used inside an AvatarGroup. * change files
|
Please consider to revert this PR as it breaks composition patterns in React 🙁 For example, the snippet below will produce warnings on valid component's usage: function CustomAvatarGroupItem(props) {
return <AvatarGroupItem {...defaultProps} {...props} />;
}
function App() {
return (
<AvatarGroup>
<CustomAvatarGroupItem />
</AvatarGroup>
);
} |
Current Behavior
New Behavior
Related Issue(s)
#22240