chore(react-avatar): Adding warnings on use of AvatarGroup and AvatarGroupItem#23498
Merged
sopranopillow merged 2 commits intomicrosoft:masterfrom Jun 10, 2022
Merged
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:
|
Collaborator
📊 Bundle size reportUnchanged fixtures
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 5ea871d03d388b192a83e2e5c0e0717e7dc61add (build) |
Collaborator
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 |
khmakoto
approved these changes
Jun 10, 2022
marwan38
pushed a commit
to marwan38/fluentui
that referenced
this pull request
Jun 13, 2022
…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
Member
|
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>
);
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current Behavior
New Behavior
Related Issue(s)
#22240